OFFSET
1,1
LINKS
Klaus Brockhaus, Table of n, a(n) for n=1..1000. [From Klaus Brockhaus, Jun 17 2009]
EXAMPLE
A(2)= 377 is equal to 168+169 = 111+112+114 = 82+84+85+86.
MATHEMATICA
composite[ n_Integer ] := (k = n + PrimePi[ n ] + 1; While[ k - PrimePi[ k ] - 1 != n, k++ ]; k); a = b = c = {}; Do[ p = Sum[ composite[ n + m ], {m, 0, 1} ]; If[ PrimeQ[ p ], a = Append[ a, p ] ]; p = Sum[ composite[ n + m ], {m, 0, 2} ]; If[ PrimeQ[ p ], b = Append[ b, p ] ]; p = Sum[ composite[ n + m ], {m, 0, 3} ]; If[ PrimeQ[ p ], c = Append[ c, p ] ], {n, 1, 25000} ]; Intersection[ a, b, c ]
Module[{cmp=Select[Range[20000], CompositeQ], c2, c3, c4}, c2=Total/@ Partition[ cmp, 2, 1]; c3=Total/@Partition[cmp, 3, 1]; c4=Total/@ Partition[ cmp, 4, 1]; Select[ Intersection[c2, c3, c4], PrimeQ]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 01 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Mar 30 2001
EXTENSIONS
Definition clarified by Harvey P. Dale, Jul 01 2020
STATUS
approved