OFFSET
1,1
COMMENTS
Primes p such that floor((p-2)/3) and floor((p-2)/3)+2 are composite. - Robert Israel, Dec 03 2017
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
25 + 26 + 27 + 1 = 79,
33 + 34 + 35 - 1 = 101,
33 + 34 + 35 + 1 = 103, etc.
MAPLE
filter:= proc(n) local k;
if not isprime(n) then return false fi;
k:= floor((n-2)/3);
not isprime(k) and not isprime(k+1) and not isprime(k+2)
end proc:
select(filter, [seq(i, i=5..2000, 2)]); # Robert Israel, Dec 03 2017
MATHEMATICA
Select[Join @@ Map[{{Total@ # - 1, #}, {Total@ # + 1, #}} &, Partition[Range@ 350, 3, 1]], And[PrimeQ@ First@ #, AllTrue[Last@ #, CompositeQ]] &][[All, 1]] (* Michael De Vlieger, Dec 03 2017 *)
PROG
(Python)
from __future__ import division
from sympy import nextprime, isprime
A296012_list, p = [], 2
while len(A296012_list) < 10000:
k = (p-2)//3
if not (isprime(k) or isprime(k+2)):
A296012_list.append(p)
p = nextprime(p) # Chai Wah Wu, Jan 24 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Martin Michael Musatov, Dec 02 2017
STATUS
approved