OFFSET
1,4
COMMENTS
Conjecture: No entry is zero for n >10. There are only four terms which are zero.
The conjecture is false as a(31) is zero. There is, however, no further zero up to a(26754), so the conjecture may be rephrased as: no entry is zero for n>31 and there are only five terms which are zero. - Harvey P. Dale, May 04 2015
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
Composite(6) = 12 and 12+10+9 = 31 hence a(6) = 31.
MATHEMATICA
With[{c=Reverse[Select[Range[100], CompositeQ]]}, SelectFirst[#, PrimeQ]&/@Table[Accumulate[Take[c, -n]], {n, Length[c]}]]/.{Missing["NotFound"] -> 0} (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, May 04 2015 *)
PROG
(PARI) for (n = 4, 120, if (!isprime(n), s = n; k = n - 1; while (!isprime(s) && k > 3, if (!isprime(k), s += k); k--); print1(if (isprime(s), s, 0), " "))); \\ David Wasserman, Jan 27 2005
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 04 2003
EXTENSIONS
More terms from David Wasserman, Jan 27 2005
STATUS
approved