login
A065893
Which composite number is the square of n? Index of n^2 in A002808.
2
0, 1, 4, 9, 15, 24, 33, 45, 58, 74, 90, 109, 129, 151, 176, 201, 227, 257, 288, 321, 355, 391, 429, 470, 510, 553, 599, 646, 694, 745, 798, 851, 907, 964, 1024, 1085, 1149, 1215, 1280, 1348, 1417, 1489, 1565, 1640, 1718, 1796, 1879, 1961, 2043, 2132, 2222
OFFSET
1,3
LINKS
EXAMPLE
n = 5 and 25 is the 15th composite number: 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25.
MATHEMATICA
Table[n^2-(PrimePi[n^2])-1, {n, 128}]
PROG
(PARI) { default(primelimit, 4294965247); for (n=1, 1000, f=n^2; a=f - primepi(f) - 1; write("b065893.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 04 2009
(Magma) [n^2 -1 -#PrimesUpTo(n^2): n in [1..130]]; // G. C. Greubel, Aug 24 2024
(SageMath) [n^2 -1 -prime_pi(n^2) for n in range(1, 131)] # G. C. Greubel, Aug 24 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 28 2001
STATUS
approved