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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

4, 8, 9, 25, 27, 32, 49, 121, 125, 128, 169, 243, 289, 343, 361, 529, 841, 961, 1331, 1369, 1681, 1849, 2048, 2187, 2197, 2209, 2809, 3125, 3481, 3721, 4489, 4913, 5041, 5329, 6241, 6859, 6889, 7921, 8192, 9409, 10201, 10609, 11449, 11881, 12167
Offset: 1

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

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

Crossrefs

Cf. A203967; subsequence of A000961.
Cf. A113877 (similar for semiprimes).

Programs

  • Haskell
    a053810 n = a053810_list !! (n-1)
    a053810_list = filter ((== 1) . a010051 . a100995) $ tail a000961_list
    -- Reinhard Zumkeller, Jun 05 2013
    
  • Maple
    h := proc(n) local P; P := NumberTheory:-PrimeFactors(n); nops(P) = 1 and isprime(padic:-ordp(n, P[1])) end:
    A053810List := upto -> seq(n, n = select(h, [seq(1..upto)])):  # Peter Luschny, Apr 14 2025
  • Mathematica
    pp={}; Do[if=FactorInteger[n]; If[Length[if]==1&&PrimeQ[if[[1, 1]]]&&PrimeQ[if[[1, 2]]], pp=Append[pp, n]], {n, 13000}]; pp
    Sort[ Flatten[ Table[ Prime[n]^Prime[i], {n, 1, PrimePi[ Sqrt[12800]]}, {i, 1, PrimePi[ Log[ Prime[n], 12800]]}]]]
  • PARI
    is(n)=isprime(isprimepower(n)) \\ Charles R Greathouse IV, Mar 19 2013
    
  • Python
    from sympy import primepi, integer_nthroot, primerange
    def A053810(n):
        def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 13 2024
    
  • SageMath
    def isA(n):
        p = prime_divisors(n)
        return len(p) == 1 and is_prime(valuation(n, p[0]))
    print([n for n in srange(1, 12222) if isA(n)])  # Peter Luschny, Apr 14 2025

Formula

a(n) = A053811(n)^A053812(n). - David Wasserman, Feb 17 2006
A010055(a(n)) * A010051(A100995(a(n))) = 1. - Reinhard Zumkeller, Jun 05 2013
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

Extensions

More terms from David Wasserman, Feb 17 2006
Name clarified by Peter Luschny, Apr 14 2025

A009087 Numbers whose number of divisors is prime (i.e., numbers of the form p^(q-1) for primes p,q).

Original entry on oeis.org

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

Views

Author

Simon Colton (simonco(AT)cs.york.ac.uk)

Keywords

Comments

Invented by the HR Automatic Concept Formation Program. If the sum of divisors is prime, then the number of divisors is prime, i.e., this is a supersequence of A023194.
A010055(a(n)) * A010051(A100995(a(n))+1) = 1. - Reinhard Zumkeller, Jun 06 2013

Examples

			tau(16)=5 and 5 is prime.
		

References

  • S. Colton, Automated Theory Formation in Pure Mathematics. New York: Springer (2002)

Crossrefs

Subsequence of A000961.

Programs

  • Haskell
    a009087 n = a009087_list !! (n-1)
    a009087_list = filter ((== 1) . a010051 . (+ 1) . a100995) a000961_list
    -- Reinhard Zumkeller, Jun 05 2013
    
  • Mathematica
    Select[Range[250],PrimeQ[DivisorSigma[0,#]]&] (* Harvey P. Dale, Sep 28 2011 *)
  • PARI
    is(n)=isprime(isprimepower(n)+1) \\ Charles R Greathouse IV, Sep 16 2015
    
  • Python
    from sympy import primepi, integer_nthroot, primerange
    def A009087(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k-1)[0]) for k in primerange(x.bit_length()+1)))
        return bisection(f,n,n) # Chai Wah Wu, Feb 22 2025

Formula

p^(q-1), p, q primes.

A302778 Number of "Fermi-Dirac primes" (A050376) <= n.

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 27, 27, 28, 28, 29, 29, 29, 29, 29, 29, 30
Offset: 1

Views

Author

Antti Karttunen, Apr 16 2018

Keywords

Crossrefs

Partial sums of A302777. A left inverse of A050376.
Differs from A203967 for the first time at n=64, where a(64) = 23, while A203967(64) = 24.
Cf. also A000720, A025528.

Programs

  • Mathematica
    s[n_] := Boole[n > 1 && Length[(f = FactorInteger[n])] == 1 && (e = f[[;; , 2]]) == 2^IntegerExponent[e, 2]]; Accumulate @ Array[s, 100] (* Amiram Eldar, Nov 27 2020 *)
  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A302777(n) = A209229(isprimepower(n));
    s=0; for(n=1,105,s+=A302777(n); print1(s,", "));
    
  • Python
    from sympy import primepi, integer_nthroot
    def A302778(n): return sum(primepi(integer_nthroot(n,1<Chai Wah Wu, Feb 18-19 2025

Formula

a(1) = 0; for n > 1, a(n) = A302777(n) + a(n-1).
For all n >= 1, a(A050376(n)) = n.
Showing 1-3 of 3 results.