cp's OEIS Frontend

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.

A062532 Odd nonprimes squared, or A014076(n)^2.

This page as a plain text file.
%I A062532 #21 Aug 01 2024 01:29:07
%S A062532 1,81,225,441,625,729,1089,1225,1521,2025,2401,2601,3025,3249,3969,
%T A062532 4225,4761,5625,5929,6561,7225,7569,8281,8649,9025,9801,11025,12321,
%U A062532 13225,13689,14161,14641,15129,15625,16641,17689,18225,19881,20449
%N A062532 Odd nonprimes squared, or A014076(n)^2.
%H A062532 Harry J. Smith, <a href="/A062532/b062532.txt">Table of n, a(n) for n = 1..1000</a>
%t A062532 With[{nn=500},Complement[Range[1,nn,2],Prime[Range[PrimePi[nn]]]]^2] (* _Harvey P. Dale_, Nov 12 2012 *)
%o A062532 (PARI) je=[]; forstep(n=1,301,2, if(isprime(n), n+1,je=concat(je,n^2))); je
%o A062532 (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
%o A062532 (Python)
%o A062532 from sympy import primepi
%o A062532 def A062532(n):
%o A062532     if n == 1: return 1
%o A062532     m, k = n-1, primepi(n) + n - 1 + (n>>1)
%o A062532     while m != k:
%o A062532         m, k = k, primepi(k) + n - 1 + (k>>1)
%o A062532     return m**2 # _Chai Wah Wu_, Jul 31 2024
%Y A062532 Cf. A014076.
%K A062532 easy,nonn
%O A062532 1,2
%A A062532 _Jason Earls_, Jul 10 2001