login
A062532
Odd nonprimes squared, or A014076(n)^2.
3
1, 81, 225, 441, 625, 729, 1089, 1225, 1521, 2025, 2401, 2601, 3025, 3249, 3969, 4225, 4761, 5625, 5929, 6561, 7225, 7569, 8281, 8649, 9025, 9801, 11025, 12321, 13225, 13689, 14161, 14641, 15129, 15625, 16641, 17689, 18225, 19881, 20449
OFFSET
1,2
LINKS
MATHEMATICA
With[{nn=500}, Complement[Range[1, nn, 2], Prime[Range[PrimePi[nn]]]]^2] (* Harvey P. Dale, Nov 12 2012 *)
PROG
(PARI) je=[]; forstep(n=1, 301, 2, if(isprime(n), n+1, je=concat(je, n^2))); je
(PARI) { n=0; forstep (m=1, 10^9, 2, if(!isprime(m), write("b062532.txt", n++, " ", m^2); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 08 2009
(Python)
from sympy import primepi
def A062532(n):
if n == 1: return 1
m, k = n-1, primepi(n) + n - 1 + (n>>1)
while m != k:
m, k = k, primepi(k) + n - 1 + (k>>1)
return m**2 # Chai Wah Wu, Jul 31 2024
CROSSREFS
Cf. A014076.
Sequence in context: A236877 A236721 A255110 * A075730 A184068 A211690
KEYWORD
easy,nonn
AUTHOR
Jason Earls, Jul 10 2001
STATUS
approved