login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A259408 a(1) = 1 thereafter a(n) = Sum_{m=1..n-1} prime(a(m)). 1
1, 2, 5, 16, 69, 416, 3277, 33590, 430131, 6700328, 124069971, 2680915918, 66579269891, 1876496610172, 59387269231505, 2091422223924852, 81321166136299741, 3467614972592015460 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..18.

FORMULA

a(n) = A014688(a(n-1)) for n>2, a(1)=1, a(2)=2.

MATHEMATICA

a = {1}; Do[AppendTo[a, Sum[Prime[a[[m]]], {m, n - 1}]], {n, 2, 15}];

a (* Michael De Vlieger, Aug 06 2015 *)

PROG

(PARI) a(n) = if (n==1, 1, sum(k=1, n-1, prime(a(k)))); \\ Michel Marcus, Jun 26 2015

(PARI) first(m)=my(v=vector(m)); v[1]=1; print1(1); for(i=2, m, v[i]=sum(k=1, i-1, prime(v[k])); print1(", ", v[i])); v; \\ Anders Hellström, Aug 01 2015

(PARI) first(n)=my(v=vector(n, i, i)); for(i=3, n, v[i]=v[i-1]+prime(v[i-1])); v \\ Charles R Greathouse IV, Aug 06 2015

(Perl) use bignum;

use Math::Prime::Util ':all';

print "1\n2\n";

my $a = 2;

while(1){

  $a += nth_prime($a);

  print "$a\n";

} # Charles R Greathouse IV, Aug 06 2015

CROSSREFS

Cf. A074271.

Sequence in context: A058673 A296675 A059295 * A251684 A129092 A110710

Adjacent sequences:  A259405 A259406 A259407 * A259409 A259410 A259411

KEYWORD

nonn,more

AUTHOR

Anders Hellström, Jun 26 2015

EXTENSIONS

a(15) from Michael De Vlieger, Jul 01 2015

a(16)-a(18) from Charles R Greathouse IV, Aug 06 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 19 00:55 EDT 2019. Contains 324217 sequences. (Running on oeis4.)