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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A063807 a(0) = 0, a(n+1) = a(n) + next prime larger than a(n). 3
0, 2, 5, 12, 25, 54, 113, 240, 481, 968, 1939, 3888, 7777, 15566, 31135, 62274, 124571, 249148, 498329, 996660, 1993349, 3986706, 7973417, 15946836, 31893677, 63787390, 127574781, 255149570, 510299161, 1020598332, 2041196671, 4082393354, 8164786741, 16329573512 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2500 (first 201 terms from Harry J. Smith)
EXAMPLE
0 + 2 = 2, 2 + 3 = 5, 5 + 7 = 12, 12 + 13 = 25, 25 + 29 = 54, ...
MAPLE
a:= proc(n) option remember; `if`(n=0, 0, (t->
t+nextprime(t))(a(n-1)))
end:
seq(a(n), n=0..35); # Alois P. Heinz, Sep 21 2021
MATHEMATICA
Join[{0}, NestList[# + NextPrime[#] &, 2, 50]] (* Updated by Jean-François Alcover, Apr 25 2022 for a(0)=0 *)
PROG
(PARI) s(n)=if(n<1, n=0, s(n-1)+nextprime(s(n-1)+1)); for(n=0, 21, print(s(n)))
(PARI) { for (n=0, 200, if (n, a+=nextprime(a + 1), a=0); write("b063807.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 31 2009
CROSSREFS
Sequence in context: A101836 A262667 A122439 * A182202 A116715 A117177
KEYWORD
nonn
AUTHOR
Pedro Ortiz-Villajos (perico1(AT)erols.com), Aug 20 2001
EXTENSIONS
More terms from Harvey P. Dale and Jason Earls, Aug 20 2001
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 10:28 EDT 2024. Contains 371779 sequences. (Running on oeis4.)