The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A330536 The partial sum a(1)+...+a(n) is prime, and so is the sum of the digits used by those n terms. 1
 2, 1, 4, 6, 24, 22, 8, 42, 28, 60, 26, 46, 44, 40, 68, 66, 112, 158, 64, 86, 84, 118, 62, 88, 20, 48, 156, 114, 136, 138, 132, 150, 116, 82, 192, 176, 190, 392, 198, 172, 152, 178, 240, 206, 174, 282, 244, 80, 154, 242, 204, 202, 228, 170, 246, 130, 648, 110, 756, 196, 194, 222, 208, 266, 286, 284, 280, 200 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS This is the lexicographically earliest sequence of distinct numbers > 0 with this property. LINKS Carole Dubois, Table of n, a(n) for n = 1..5000 Carole Dubois, Graph and trend curves for terms, digits sums, terms sums Rémy Sigrist, C++ program for A330536 EXAMPLE The successive partial sums of terms are prime: (2), (2 + 1) = 3, (2 + 1 + 4) = 7; (2 + 1 + 4 + 6) = 13; (2 + 1 + 4 + 6 + 24) = 37; etc. The successive partial sums of their digits are also prime: (2), (2 + 1) = 3, (2 + 1 + 4) = 7; (2 + 1 + 4 + 6) = 13; (2 + 1 + 4 + 6 + 2 + 4) = 19; etc. MATHEMATICA Nest[Append[#, Block[{k = 1}, While[Nand[FreeQ[#, k], PrimeQ[Total@ # + k], PrimeQ@ Total@ Flatten@ IntegerDigits[Append[#, k]]], k++]; k]] &, {}, 68] (* Michael De Vlieger, Dec 17 2019 *) PROG (C++) See Links section. CROSSREFS Cf. A054408 (smallest positive integer not already in sequence such that the partial sum a(1)+...+a(n) is prime). Sequence in context: A253918 A269415 A019142 * A268573 A145858 A328491 Adjacent sequences: A330533 A330534 A330535 * A330537 A330538 A330539 KEYWORD base,nonn AUTHOR Eric Angelini and Carole Dubois, Dec 17 2019 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 9 11:21 EST 2022. Contains 358700 sequences. (Running on oeis4.)