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.

A053810 Numbers of the form p^e where both p and e are prime numbers.

This page as a plain text file.
%I A053810 #56 Jun 07 2025 01:49:35
%S A053810 4,8,9,25,27,32,49,121,125,128,169,243,289,343,361,529,841,961,1331,
%T A053810 1369,1681,1849,2048,2187,2197,2209,2809,3125,3481,3721,4489,4913,
%U A053810 5041,5329,6241,6859,6889,7921,8192,9409,10201,10609,11449,11881,12167
%N A053810 Numbers of the form p^e where both p and e are prime numbers.
%C A053810 Possible orders of finite fields with exactly 2 subfields. In other words, possible orders of finite fields whose only proper subfield is the prime field. - _Jianing Song_, Jun 06 2025
%H A053810 T. D. Noe, <a href="/A053810/b053810.txt">Table of n, a(n) for n = 1..9965</a>
%F A053810 a(n) = A053811(n)^A053812(n). - _David Wasserman_, Feb 17 2006
%F A053810 A010055(a(n)) * A010051(A100995(a(n))) = 1. - _Reinhard Zumkeller_, Jun 05 2013
%F A053810 Sum_{n>=1} 1/a(n) = Sum_{p prime} P(p) = 0.6716752222..., where P is the prime zeta function. - _Amiram Eldar_, Nov 21 2020
%p A053810 h := proc(n) local P; P := NumberTheory:-PrimeFactors(n); nops(P) = 1 and isprime(padic:-ordp(n, P[1])) end:
%p A053810 A053810List := upto -> seq(n, n = select(h, [seq(1..upto)])):  # _Peter Luschny_, Apr 14 2025
%t A053810 pp={}; Do[if=FactorInteger[n]; If[Length[if]==1&&PrimeQ[if[[1, 1]]]&&PrimeQ[if[[1, 2]]], pp=Append[pp, n]], {n, 13000}]; pp
%t A053810 Sort[ Flatten[ Table[ Prime[n]^Prime[i], {n, 1, PrimePi[ Sqrt[12800]]}, {i, 1, PrimePi[ Log[ Prime[n], 12800]]}]]]
%o A053810 (PARI) is(n)=isprime(isprimepower(n)) \\ _Charles R Greathouse IV_, Mar 19 2013
%o A053810 (Haskell)
%o A053810 a053810 n = a053810_list !! (n-1)
%o A053810 a053810_list = filter ((== 1) . a010051 . a100995) $ tail a000961_list
%o A053810 -- _Reinhard Zumkeller_, Jun 05 2013
%o A053810 (Python)
%o A053810 from sympy import primepi, integer_nthroot, primerange
%o A053810 def A053810(n):
%o A053810     def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))
%o A053810     kmin, kmax = 1,2
%o A053810     while f(kmax) >= kmax:
%o A053810         kmax <<= 1
%o A053810     while True:
%o A053810         kmid = kmax+kmin>>1
%o A053810         if f(kmid) < kmid:
%o A053810             kmax = kmid
%o A053810         else:
%o A053810             kmin = kmid
%o A053810         if kmax-kmin <= 1:
%o A053810             break
%o A053810     return kmax # _Chai Wah Wu_, Aug 13 2024
%o A053810 (SageMath)
%o A053810 def isA(n):
%o A053810     p = prime_divisors(n)
%o A053810     return len(p) == 1 and is_prime(valuation(n, p[0]))
%o A053810 print([n for n in srange(1, 12222) if isA(n)])  # _Peter Luschny_, Apr 14 2025
%Y A053810 Cf. A000040, A000961, A053811, A053812.
%Y A053810 Cf. A203967; subsequence of A000961.
%Y A053810 Cf. A113877 (similar for semiprimes).
%K A053810 easy,nonn
%O A053810 1,1
%A A053810 _Henry Bottomley_, Mar 28 2000
%E A053810 More terms from _David Wasserman_, Feb 17 2006
%E A053810 Name clarified by _Peter Luschny_, Apr 14 2025