OFFSET
1,1
COMMENTS
Partial sums of A006450.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
FORMULA
a(n) = Sum_{k=1..n} prime(prime(k)).
a(n) ~ (n log n)^2 / 2. - Charles R Greathouse IV, Oct 20 2015
MATHEMATICA
Accumulate[Prime[Prime[Range[50]]]] (* Harvey P. Dale, Jun 24 2012 *)
PROG
(PARI) pipsum(n)=s=0; sr=0; for(x=1, n, y=prime(prime(x)); s+=y; print1(s" "); sr+=1.0/y; ); print(); print(sr)
(PARI) a(n)=my(i, j, s); forprime(p=2, , if(isprime(i++), s+=p; if(j++==n, return(s)))) \\ Charles R Greathouse IV, Oct 20 2015
(PARI) first(n)=my(v=vector(n), i, j, s); forprime(p=2, , if(isprime(i++), s+=p; v[j++]=s; if(j==n, return(v)))) \\ Charles R Greathouse IV, Oct 20 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Jun 01 2003
STATUS
approved