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 A291440 #42 Sep 08 2022 08:46:19 %S A291440 0,1,0,2,0,2,-1,2,6,9,5,9,3,8,12,18,12,17,8,14,21,28,18,24,33,41,48, %T A291440 56,46,54,41,51,60,70,79,89,75,84,96,107,94,105,87,99,110,123,104,117, %U A291440 132,142,153,168,153,165,178,189,201,218,198,214,195,208,225,240,254,270,248,263,280,293,275,290,264,281,298,316,338,352,327,350 %N A291440 a(n) = pi(n^2) - pi(n)^2, where pi(n) = A000720(n). %C A291440 The only zero values are a(1) = a(3) = a(5) = 0. The only negative value is a(7) = -1. In particular, pi(n^2) > pi(n)^2 for n > 7. These can be proved by the PNT with error term for large n and computation for smaller n. %C A291440 For prime(n)^2 - prime(n^2), see A123914. %C A291440 For pi(n^3) - pi(n)^3, see A291538. %C A291440 Mincu and Panaitopol (2008) prove that pi(m*n) >= pi(m)*pi(n) for all positive m and n except for m = 5, n = 7; m = 7, n = 5; and m = n = 7. This implies for m = n that a(n) >= 0 if n <> 7. - _Jonathan Sondow_, Nov 03 2017 %C A291440 Diagonal of the triangular array A294508. - _Jonathan Sondow_ and _Robert G. Wilson v_, Nov 08 2017 %H A291440 Robert Israel, <a href="/A291440/b291440.txt">Table of n, a(n) for n = 1..10000</a> %H A291440 Gabriel Mincu and Laurentiu Panaitopol, <a href="https://www.emis.de/journals/JIPAM/article951.html">Properties of some functions connected to prime numbers</a>, J. Inequal. Pure Appl. Math., 9 No. 1 (2008), Art. 12. %F A291440 a(n) = A000720(n^2) - A000720(n)^2. %F A291440 a(n) ~ (n^2 / log(n))*(1/2 - 1/log(n)) as n tends to infinity, by the PNT. %F A291440 From _Jonathan Sondow_ and _Robert G. Wilson v_, Nov 08 2017: (Start) %F A291440 a(n) = A294508(n*(n+1)/2). %F A291440 a(n) >= A294509(n). (End) %e A291440 a(7) = pi(7^2) - pi(7)^2 = 15 - 4^2 = -1. %p A291440 seq(numtheory:-pi(n^2)-numtheory:-pi(n)^2, n=1..100); # _Robert Israel_, Aug 25 2017 %t A291440 Table[PrimePi[n^2] - PrimePi[n]^2, {n, 80}] %o A291440 (Magma) [#PrimesUpTo(n^2)-#PrimesUpTo(n)^2: n in [1..80]]; // _Vincenzo Librandi_, Aug 26 2017 %o A291440 (PARI) a(n) = primepi(n^2) - primepi(n)^2; \\ _Michel Marcus_, Sep 10 2017 %Y A291440 Cf. A000720, A123914, A262199, A291538, A291539, A291540, A291541, A291542. %K A291440 sign %O A291440 1,4 %A A291440 _Jonathan Sondow_, Aug 23 2017