login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #31 Jun 06 2024 14:18:53

%S 2,53,16097,120739,334349,18703411700669

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

%C These are the prime terms in A055729.

%t Select[ Table[ PrimePi[ 3^n], {n, 0, 49}], PrimeQ@# &] (* _Robert G. Wilson v_, Feb 25 2010 *)

%o (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) }

%o (Python)

%o from itertools import islice

%o from sympy import isprime, primepi

%o def A087865_gen(): # generator of terms

%o k = 1

%o while True:

%o k *= 3

%o if isprime(p:=primepi(k)):

%o yield p

%o A087865_list = list(islice(A087865_gen(),5)) # _Chai Wah Wu_, Jun 06 2024

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

%K nonn,more,hard

%O 1,1

%A _Cino Hilliard_, Oct 27 2003

%E a(6) added by _David Baugh_, Mar 17 2015