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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A270654 a(1) = 0; a(n) is the sum of m < n for which a(m) + n is prime. 2
 0, 1, 1, 5, 1, 14, 1, 4, 14, 17, 1, 42, 9, 27, 23, 42, 44, 47, 37, 70, 0, 60, 76, 66, 59, 46, 109, 68, 132, 124, 146, 49, 181, 78, 163, 129, 173, 130, 118, 101, 153, 164, 190, 154, 174, 135, 213, 211, 288, 241, 161, 273, 186, 153, 252 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 LINKS Peter Kagey, Table of n, a(n) for n = 1..10000 EXAMPLE a(1) = 0; a(2) = 1 because 2 + a(1) is prime a(3) = 1 because 3 + a(1) is prime a(4) = 5 because 4 + a(2) = 4 + a(3) is prime; 2 + 3 = 5 PROG (PARI) lista(nn) = {va = vector(nn); print1(va[1], ", "); for (n=2, nn, va[n] = sum(k=1, n-1, k*(isprime(n+va[k]))); print1(va[n], ", "); ); } \\ Michel Marcus, Mar 28 2016 CROSSREFS Cf. A114898, which counts earlier terms m for which a(m) + n is prime. Cf. A270536, which is the sum of m < n for which a(m) + n is not prime. Sequence in context: A146620 A300291 A174504 * A067558 A104792 A120393 Adjacent sequences: A270651 A270652 A270653 * A270655 A270656 A270657 KEYWORD easy,nonn AUTHOR Alec Jones, Mar 20 2016 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 February 3 09:09 EST 2023. Contains 360034 sequences. (Running on oeis4.)