OFFSET
1,2
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
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
KEYWORD
easy,nonn
AUTHOR
Jason Earls, Jul 10 2001
STATUS
approved