%I #87 May 28 2014 02:28:46
%S -1,0,-1,0,-3,0,-1,10,17,20,33,40,59,90,117,140,163,218,237,286,345,
%T 390,443,502,551,614,701,784,881,976,1011,1112,1215,1330,1417,1550,
%U 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
%N Difference between sum of first n primes and prime(prime(n)).
%H Vincenzo Librandi, <a href="/A239731/b239731.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = A007504(n + 1) - A006450(n) = A007504(n + 1) - A000040(A000040(n)). - _Wesley Ivan Hurt_, Mar 30 2014
%F a(n) ~ (n^2 log n)/2. - _Charles R Greathouse IV_, Apr 08 2014
%e For n = 2 the a(2) = 0 solutions are prime(1) + prime(2) - prime(prime(2)) = 5 - 5 = 0.
%p A239731:=n->sum(ithprime(i), i=1..n) - ithprime(ithprime(n)); seq(A239731(n), n=1..50); # _Wesley Ivan Hurt_, Mar 30 2014
%t Table[Sum[Prime[i], {i, n}] - Prime[Prime[n]], {n, 50}] (* _Wesley Ivan Hurt_, Mar 30 2014 *)
%o (Sage)
%o [a - b for a, b in zip(oeis(7504)[1:], oeis(6450))] # _Lear Young_, Mar 30 2014
%o (PARI)
%o for(i = 1, 100, print1(sum(k = 1, i, prime(k)) - prime(prime(i))", ")) \\ _Lear Young_, Mar 30 2014
%Y Cf. A000040, A006450, A007504.
%K sign
%O 1,5
%A _Lear Young_, Mar 30 2014