This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A239731 #91 Apr 10 2025 17:22:17 %S A239731 -1,0,-1,0,-3,0,-1,10,17,20,33,40,59,90,117,140,163,218,237,286,345, %T A239731 390,443,502,551,614,701,784,881,976,1011,1112,1215,1330,1417,1550, %U A239731 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 A239731 Difference between sum of first n primes and prime(prime(n)). %H A239731 Vincenzo Librandi, <a href="/A239731/b239731.txt">Table of n, a(n) for n = 1..1000</a> %F A239731 a(n) = A007504(n + 1) - A006450(n) = A007504(n + 1) - A000040(A000040(n)). - _Wesley Ivan Hurt_, Mar 30 2014 %F A239731 a(n) ~ (n^2 log n)/2. - _Charles R Greathouse IV_, Apr 08 2014 %e A239731 For n = 2 the a(2) = 0 solutions are prime(1) + prime(2) - prime(prime(2)) = 5 - 5 = 0. %p A239731 A239731:=n->sum(ithprime(i), i=1..n) - ithprime(ithprime(n)); seq(A239731(n), n=1..50); # _Wesley Ivan Hurt_, Mar 30 2014 %t A239731 Table[Sum[Prime[i], {i, n}] - Prime[Prime[n]], {n, 50}] (* _Wesley Ivan Hurt_, Mar 30 2014 *) %t A239731 #[[1]]-#[[2]]&/@Module[{nn=70,prs},prs=Accumulate[Prime[Range[nn]]];Thread[{prs,Prime[Prime[Range[nn]]]}]] (* _Harvey P. Dale_, Apr 10 2025 *) %o A239731 (Sage) %o A239731 [a - b for a, b in zip(oeis(7504)[1:], oeis(6450))] # _Lear Young_, Mar 30 2014 %o A239731 (PARI) %o A239731 for(i = 1, 100, print1(sum(k = 1, i, prime(k)) - prime(prime(i))", ")) \\ _Lear Young_, Mar 30 2014 %Y A239731 Cf. A000040, A006450, A007504. %K A239731 sign %O A239731 1,5 %A A239731 _Lear Young_, Mar 30 2014