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!)
A239731 Difference between sum of first n primes and prime(prime(n)). 1
-1, 0, -1, 0, -3, 0, -1, 10, 17, 20, 33, 40, 59, 90, 117, 140, 163, 218, 237, 286, 345, 390, 443, 502, 551, 614, 701, 784, 881, 976, 1011, 1112, 1215, 1330, 1417, 1550, 1665, 1780, 1923, 2056, 2203, 2360, 2485, 2660, 2827, 3010, 3141, 3252, 3455, 3670, 3879, 4090, 4307, 4484, 4717, 4932, 5147, 5400, 5631, 5876, 6135, 6362, 6555, 6830, 7125, 7424, 7633, 7922 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
FORMULA
a(n) = A007504(n + 1) - A006450(n) = A007504(n + 1) - A000040(A000040(n)). - Wesley Ivan Hurt, Mar 30 2014
a(n) ~ (n^2 log n)/2. - Charles R Greathouse IV, Apr 08 2014
EXAMPLE
For n = 2 the a(2) = 0 solutions are prime(1) + prime(2) - prime(prime(2)) = 5 - 5 = 0.
MAPLE
A239731:=n->sum(ithprime(i), i=1..n) - ithprime(ithprime(n)); seq(A239731(n), n=1..50); # Wesley Ivan Hurt, Mar 30 2014
MATHEMATICA
Table[Sum[Prime[i], {i, n}] - Prime[Prime[n]], {n, 50}] (* Wesley Ivan Hurt, Mar 30 2014 *)
PROG
(Sage)
[a - b for a, b in zip(oeis(7504)[1:], oeis(6450))] # Lear Young, Mar 30 2014
(PARI)
for(i = 1, 100, print1(sum(k = 1, i, prime(k)) - prime(prime(i))", ")) \\ Lear Young, Mar 30 2014
CROSSREFS
Sequence in context: A348576 A307657 A269939 * A327027 A145881 A232223
KEYWORD
sign
AUTHOR
Lear Young, Mar 30 2014
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 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)