

A085106


Starting with composite(n) go on adding smaller composite numbers until one gets a prime. a(n) = this prime, or 0 if no such prime exists.


1



0, 0, 0, 17, 19, 31, 53, 29, 31, 0, 83, 41, 43, 67, 71, 97, 53, 173, 223, 349, 337, 67, 337, 71, 109, 113, 79, 359, 239, 89, 0, 139, 97, 193, 101, 103, 157, 109, 367, 113, 383, 443, 293, 761, 127, 1021, 131, 199, 137, 139, 211, 353, 149, 151, 647, 659, 311, 239, 163
(list;
graph;
refs;
listen;
history;
text;
internal format)



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), " "))); (Wasserman)


CROSSREFS

Cf. A085105.
Sequence in context: A290634 A182570 A292237 * A079592 A160027 A288407
Adjacent sequences: A085103 A085104 A085105 * A085107 A085108 A085109


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



