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.

Original entry on oeis.org

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

Views

Author

Jason Earls, Jul 10 2001

Keywords

Crossrefs

Cf. A014076.

Programs

  • Mathematica
    With[{nn=500},Complement[Range[1,nn,2],Prime[Range[PrimePi[nn]]]]^2] (* Harvey P. Dale, Nov 12 2012 *)
  • 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