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.

A087797 Primes, squares of primes and cubes of primes.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 17, 19, 23, 25, 27, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241
Offset: 1

Views

Author

Benoit Cloitre, Oct 10 2003

Keywords

Comments

Union of A000040 and A168363. - Chai Wah Wu, Aug 09 2024

Crossrefs

Programs

  • Mathematica
    m=400;Union[Prime[Range[PrimePi[m]]],Prime[Range[PrimePi[m^(1/2)]]]^2,Prime[Range[PrimePi[m^(1/3)]]]^3] (* Vladimir Joseph Stephan Orlovsky, Apr 11 2011 *)
    With[{nn=70},Take[Union[Flatten[{#,#^2,#^3}&/@Prime[Range[nn]]]],nn]] (* Harvey P. Dale, Oct 16 2012 *)
  • PARI
    is(n)=my(t=isprimepower(n)); t && t<4 \\ Charles R Greathouse IV, Oct 19 2015
    
  • Python
    from math import isqrt
    from sympy import primepi, integer_nthroot
    def A087797(n):
        def f(x): return n+x-primepi(x)-primepi(isqrt(x))-primepi(integer_nthroot(x,3)[0])
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return int(m) # Chai Wah Wu, Aug 09 2024

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Oct 19 2015