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.

A087865 Prime numbers of the form primepi(3^m), for some integer m.

Original entry on oeis.org

2, 53, 16097, 120739, 334349, 18703411700669
Offset: 1

Views

Author

Cino Hilliard, Oct 27 2003

Keywords

Comments

These are the prime terms in A055729.

Crossrefs

Cf. A055729 (number of primes <= 3^n).

Programs

  • Mathematica
    Select[ Table[ PrimePi[ 3^n], {n, 0, 49}], PrimeQ@# &] (* Robert G. Wilson v, Feb 25 2010 *)
  • PARI
    primeslessxn2(n, p) = /*primes < p^n if prime */ { sr=0; for(x=0, n, y=primepi(p^x); if(y<>0, sr+=1.0/y); if(isprime(y), print1(y", ")); ); print(); print(sr) }
    
  • Python
    from itertools import islice
    from sympy import isprime, primepi
    def A087865_gen(): # generator of terms
        k = 1
        while True:
            k *= 3
            if isprime(p:=primepi(k)):
                yield p
    A087865_list = list(islice(A087865_gen(),5)) # Chai Wah Wu, Jun 06 2024

Extensions

a(6) added by David Baugh, Mar 17 2015