OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MATHEMATICA
composite[ n_Integer ] := (k = n + PrimePi[ n ] + 1; While[ k - PrimePi[ k ] - 1 != n, k++ ]; k); a = {}; Do[ p = composite[ n ] + composite[ n + 1 ] + composite[ n + 2 ] + composite[ n + 3 ] + composite[ n + 4 ]; If[ PrimeQ[ p ], a = Append[ a, p ] ], {n, 1, 1500} ]; a
PROG
(PARI) list(lim)=my(v=List(), u=[4, 6, 8, 9, 0], i=5); forcomposite(n=10, lim\1, u[i]=n; if(i++>5, i=1); my(p=vecsum(u)); if(p>lim, break); if(i++>5, i=1); if(isprime(p), listput(v, p))); Vec(v) \\ Charles R Greathouse IV, Dec 27 2024
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Robert G. Wilson v, Mar 30 2001
STATUS
approved