login
A288107
Numbers k such that p = prime(k) + prime(k+1) + prime(k+2), q = p + prime(k+3) + prime(k+4) and r = q + prime(k+5) + prime(k+6) are all prime.
2
8, 10, 11, 16, 22, 75, 79, 146, 153, 212, 223, 297, 298, 319, 389, 406, 411, 479, 505, 527, 531, 603, 640, 650, 739, 765, 800, 824, 918, 925, 978, 1063, 1137, 1241, 1319, 1368, 1468, 1566, 1648, 1667, 1737, 1779, 1828, 1877, 1972, 1977, 2075, 2302, 2387, 2425, 2442, 2476, 2886
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MATHEMATICA
With[{nn = 4100}, Function[s, Select[Range[nn - 6], Block[{p, q, r}, r = Total@ {Set[q, Total@ {Set[p, Total@ {#1, #2, #3}], #4, #5}], #6, #7}; AllTrue[{p, q, r}, PrimeQ]] & @@ Take[s, {#, # + 6}] &]]@ Prime@ Range@ nn] (* Michael De Vlieger, Jun 06 2017, Version 10 *)
apQ[{a_, b_, c_, d_, e_, f_, g_}]:=Module[{p1=a+b+c, p2}, p2=p1+d+e; AllTrue[ {p1, p2, p2+f+g}, PrimeQ]]; PrimePi/@Select[Partition[Prime[Range[3000]], 7, 1], apQ][[;; , 1]] (* Harvey P. Dale, Apr 21 2023 *)
PROG
(PARI) list(lim)=my(v=List(), u=primes(7), n=1, p, q); forprime(s=u[7]+1, , if(n++>lim, break); u=concat(u[2..7], s); if(isprime(p=u[1]+u[2]+u[3]) && isprime(q=p+u[4]+u[5]) && isprime(q+u[6]+u[7]), listput(v, n))); Vec(v) \\ Charles R Greathouse IV, Jun 07 2017
CROSSREFS
Sequence in context: A256385 A274560 A122990 * A062372 A374349 A046031
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 05 2017
STATUS
approved