OFFSET
1,5
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
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
KEYWORD
sign
AUTHOR
Lear Young, Mar 30 2014
STATUS
approved