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-10 of 21 results. Next

A141242 a(n) is the number of divisors of the n-th positive integer with a prime number of divisors. In other words, a(n) is the number of divisors of A009087(n).

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 7, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Leroy Quet, Jun 16 2008

Keywords

Comments

A009087(n) is of the form p^(a(n)-1), where p is some prime.

Crossrefs

Programs

  • Mathematica
    DivisorSigma[0, #] &@ Select[Range@ 500, PrimeQ@ DivisorSigma[0, #] &] (* Michael De Vlieger, Aug 19 2017 *)
  • Python
    from sympy import primepi, integer_nthroot, primerange, factorint
    def A141242(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 list(factorint(bisection(f,n,n)).values())[0]+1 # Chai Wah Wu, Feb 22 2025

Formula

a(n) = A000005(A009087(n)).

Extensions

Extended by Ray Chandler, Jun 25 2009

A030629 Numbers with 11 divisors.

Original entry on oeis.org

1024, 59049, 9765625, 282475249, 25937424601, 137858491849, 2015993900449, 6131066257801, 41426511213649, 420707233300201, 819628286980801, 4808584372417849, 13422659310152401
Offset: 1

Views

Author

Keywords

Comments

Let p be a prime. Then the n-th number with p divisors is equal to prime(n)^(p-1). - Omar E. Pol, May 06 2008

Crossrefs

Programs

Formula

a(n) = A000040(n)^10, i.e. tenth power of n-th prime. - Henry Bottomley, Aug 20 2001
From Amiram Eldar, Jan 24 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = zeta(10)/zeta(20) = 16368226875/(174611*Pi^10) = A013668/A013678.
Product_{n>=1} (1 - 1/a(n)) = 1/zeta(10) = 93555/Pi^10 = 1/A013668. (End)

A058061 Number of prime factors (counted with multiplicity) of d(n), the number of divisors of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 2, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 2, 3, 2, 2, 1, 3, 1, 2, 2, 1, 2, 3, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 1, 3, 1, 3, 3
Offset: 1

Views

Author

Labos Elemer, Nov 23 2000

Keywords

Comments

From Bernard Schott, Mar 24 2020: (Start)
a(n) = 1 iff n = p^(q-1) with p, q primes (A009087).
a(n) = 2 if n=p*q with p, q primes (A006881), or if n=p^2*q with p, q primes (A054753), or if n=p^4*q with p, q primes (A178739), or if n=p^6*q with p, q primes (A189987), or if n=p^2*q^4 with p, q primes (A189988), or if n=p^(m-1) with p prime and m is semiprime in A001358 (not exhaustive). (End)

Examples

			For n=120, d(120)=16, a(120)=4.
		

Crossrefs

Cf. A001222, A000005, A058060, A079057 (partial sums).

Programs

  • Mathematica
    Table[PrimeOmega@ DivisorSigma[0, n], {n, 120}] (* Michael De Vlieger, Feb 18 2017 *)
  • PARI
    a(n) = bigomega(numdiv(n)); \\ Michel Marcus, Dec 14 2013

Formula

a(n) = A001222(A000005(n)).
Additive with a(p^e) = A001222(e+1). - Amiram Eldar, Jan 15 2024

A036454 Prime powers with special exponents: q^(p-1) where p > 2 and q are prime numbers.

Original entry on oeis.org

4, 9, 16, 25, 49, 64, 81, 121, 169, 289, 361, 529, 625, 729, 841, 961, 1024, 1369, 1681, 1849, 2209, 2401, 2809, 3481, 3721, 4096, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 14641, 15625, 16129, 17161, 18769, 19321
Offset: 1

Views

Author

Keywords

Comments

Composite numbers with a prime number of divisors.

Examples

			From powers of 2: 4,16,64,1024,4096,65536 are in the sequence since exponent+1 is also prime. The same powers of any prime base are also included.
		

Crossrefs

Programs

  • Haskell
    a009087 n = a009087_list !! (n-1)
    a009087_list = filter ((== 1) . a010051 . (+ 1) . a100995) a000961_list
    -- Reinhard Zumkeller, Jun 05 2013
    
  • Magma
    [n: n in [1..20000] | not IsPrime(n) and IsPrime(DivisorSigma(0, n))]; // Vincenzo Librandi, May 19 2015
    
  • Maple
    N:= 10^5:
    P1:= select(isprime,[2,seq(2*i+1,i=1..floor((sqrt(N)-1)/2))]):
    P2:= select(`<=`,P1,1+ilog2(N))[2..-1]:
    S:= {seq(seq(p^(q-1), q = select(`<=`,P2,1+floor(log[p](N)))),p=P1)}:
    sort(convert(S,list)); # Robert Israel, May 18 2015
  • Mathematica
    specialPrimePowerQ[n_] := With[{f = FactorInteger[n]}, Length[f] == 1 && PrimeQ[f[[1, 1]]] && f[[1, 2]] > 1 && PrimeQ[f[[1, 2]] + 1]]; Select[Range[20000], specialPrimePowerQ]  (* Jean-François Alcover, Jul 02 2013 *)
    Select[Range[20000], ! PrimeQ[#] && PrimeQ[DivisorSigma[0, #]] &] (* Carlos Eduardo Olivieri, May 18 2015 *)
  • PARI
    for(n=1,34000, if(isprime(n), n++,x=numdiv(n); if(isprime(x),print(n))))
    
  • PARI
    list(lim)=my(v=List(),t);lim=lim\1+.5;forprime(p=3,log(lim)\log(2) +1, t=p-1; forprime(q=2,lim^(1/t),listput(v,q^t))); vecsort(Vec(v))
    \\ Charles R Greathouse IV, Apr 26 2012
    
  • Python
    from sympy import primepi, integer_nthroot, primerange
    def A036454(n):
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x, p-1)[0]) for p in primerange(3,x.bit_length()+1)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f,n,n) # Chai Wah Wu, Sep 12 2024

Formula

d(d(a(n))) = 2, where d(x) = tau(x) = sigma_0(x) is the number of divisors of x.
a(n) = (n log n)^2 + 2n^2 log n log log n + O(n^2 log n). - Charles R Greathouse IV, Apr 26 2012
(1 - A010051(a(n))) * A010055(a(n)) * A010051(A100995(a(n))+1) = 1. - Reinhard Zumkeller, Jun 05 2013
A036459(a(n)) = 2. - Ivan Neretin, Jan 25 2016
a(n) = A283262(n)^2. - Amiram Eldar, Jul 04 2022
Sum_{n>=1} 1/a(n) = Sum_{k>=2} P(prime(k)-1) = 0.54756961912815344341..., where P is the prime zeta function. - Amiram Eldar, Jul 10 2022

A036436 Numbers whose number of divisors is a square.

Original entry on oeis.org

1, 6, 8, 10, 14, 15, 21, 22, 26, 27, 33, 34, 35, 36, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 100, 106, 111, 115, 118, 119, 120, 122, 123, 125, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 168, 177, 178, 183
Offset: 1

Views

Author

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

Keywords

Comments

Invented by the HR (named after Hardy and Ramanujan) concept formation program.
Numbers in this sequence but not in A036455 are 1, 1260, 1440, 1800, 1980 etc. [From R. J. Mathar, Oct 20 2008]
tau(p^(n^2-1)) = n^2 so numbers of this form are in this sequence, and because tau is multiplicative: if a and b are in this sequence and (a,b)=1 then a*b is also in a(n). - Enrique Pérez Herrero, Jan 22 2013
What is the density of this sequence? It contains A030229 and thus has (lower) density at least 3/Pi^2 = 0.30396...; it does not contain any members of A030059 or A060687, and hence has (upper) density at most 1 - 3/Pi^2 - 6*A179119/Pi^2 = 0.49528.... - Charles R Greathouse IV, Jan 11 2025

Examples

			tau(6)=4, which is a square number, so 6 is in this sequence.
		

References

  • S. Colton, Automated Theorem Discovery: A Future Direction for Theorem Provers, 2002.

Crossrefs

Contains A030229 as a subsequence.

Programs

Extensions

Links corrected and edited by Daniel Forgues, Jun 30 2010

A063806 Numbers with a prime number of proper divisors.

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 40, 42, 44, 45, 46, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 102, 104
Offset: 1

Views

Author

Henry Bottomley, Aug 20 2001

Keywords

Examples

			15 has three proper divisors {1,3,5} and so is on the list; 16 has four {1,2,4,8} and so is not; 17 has one {1} and so is not; 18 has five {1,2,3,6,9} and so is.
		

Crossrefs

A subset of A002808. Cf. A009087, A032741.

Programs

  • PARI
    n=0; for (m=1, 10^9, if(isprime(numdiv(m) - 1), write("b063806.txt", n++, " ", m); if (n==1000, break))) \\ Harry J. Smith, Aug 31 2009
    
  • PARI
    is(n)=isprime(numdiv(n)-1) \\ Charles R Greathouse IV, Sep 18 2015

A229264 Primes in A065387 in the order of their appearance.

Original entry on oeis.org

2, 19, 19, 79, 103, 113, 257, 523, 509, 1151, 1279, 1193, 1579, 2273, 3061, 2389, 2693, 2843, 5003, 4831, 5119, 7411, 5693, 5623, 8623, 6323, 10139, 8933, 18401, 14957, 20411, 20479, 21191, 20123, 29683, 28211, 36833, 55021, 57203, 68743, 48761, 66533, 62423
Offset: 1

Views

Author

Paolo P. Lava, Sep 18 2013

Keywords

Examples

			Third term of A038344 is 9 and sigma(9) + phi(9) = 13 + 6 = 19 is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a, n; for n from 1 to q do a:=sigma(n)+phi(n);
    if isprime(a) then print(a); fi; od; end: P(10^6);
  • Mathematica
    Select[Table[DivisorSigma[1,n]+EulerPhi[n],{n,30000}],PrimeQ] (* Harvey P. Dale, Apr 30 2018 *)
  • PARI
    lista(kmax) = {my(f, s); for(k = 1, kmax, f = factor(k); s= sigma(f) + eulerphi(f); if(isprime(s), print1(s, ", ")));} \\ Amiram Eldar, Nov 19 2024

Extensions

Name corrected by Amiram Eldar, Nov 19 2024

A229268 Primes of the form sigma(k) - tau(k), where sigma(k) = A000203(k) and tau(k) = A000005(k).

Original entry on oeis.org

2, 11, 353, 1013, 2333, 16369, 58579, 65519, 123733, 1982273, 7089683, 5778653, 12795053, 10500593, 22586027, 19980143, 24126653, 67108837, 72494713, 90781993, 106199593, 203275951, 164118923, 183105421, 320210549, 259997173, 794091653, 1279963973
Offset: 1

Views

Author

Paolo P. Lava, Sep 18 2013

Keywords

Examples

			Second term of A065061 is 8 and sigma(8) - tau(8) = 15 - 4 = 11 is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,n; a:= sigma(n)-tau(n); for n from 1 to q do
    if isprime(a) then print(a); fi; od; end: P(10^6);
  • Mathematica
    Join[{2}, Select[(DivisorSigma[1, #] - DivisorSigma[0, #]) & /@ (2*Range[20000]^2), PrimeQ]] (* Amiram Eldar, Dec 06 2022 *)

Formula

a(n) = A000203(A065061(n)) - A000005(A065061(n)). - Michel Marcus, Sep 21 2013
a(n) = A065608(A065061(n)). - Amiram Eldar, Dec 06 2022

Extensions

More terms from Michel Marcus, Sep 21 2013

A139118 Numbers with a nonprime number of divisors.

Original entry on oeis.org

1, 6, 8, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102
Offset: 1

Views

Author

Omar E. Pol, May 09 2008

Keywords

Comments

A000005(a(n)) is nonprime. Complement of A009087. Also, nonprime numbers with nonprime number of divisors.
The sequence consists of those n such that n is not a prime power, or n of the form p^k where k+1 is composite. - Franklin T. Adams-Watters, Apr 09 2009

Examples

			15 is in the sequence because it has 4 divisors: 1, 3, 5, and 15. - _Emeric Deutsch_, Jun 27 2009
		

Crossrefs

Programs

  • Maple
    with(numtheory): a := proc (n) if isprime(tau(n)) = false then n else end if end proc: seq(a(n), n = 1 .. 120); # Emeric Deutsch, Jun 27 2009
  • Mathematica
    Select[Range[102], ! PrimeQ[DivisorSigma[0, #]] &] (* Amiram Eldar, Nov 27 2020 *)
  • PARI
    is(n)=!isprime(numdiv(n)) \\ Charles R Greathouse IV, Jun 19 2016
    
  • Python
    from sympy import primepi, integer_nthroot, primerange
    def A139118(n):
        def f(x): return int(n+sum(primepi(integer_nthroot(x,k-1)[0]) for k in primerange(x.bit_length()+1)))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Feb 22 2025

Extensions

Extended by Ray Chandler, Jun 25 2009

A203967 The number of positive integers <= n that have a prime number of divisors.

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, 24, 24, 24, 25, 25, 25
Offset: 1

Views

Author

Geoffrey Critzer, Jan 08 2012

Keywords

Crossrefs

Programs

  • Haskell
    a203967 n = length $ takeWhile (<= n) a009087_list
    -- Reinhard Zumkeller, Jun 06 2013
    
  • Mathematica
    Table[Total[Table[PrimePi[m^(1/n)], {n,Table[Prime[n]-1, {n,1,20}]}]], {m,1,100}]
    tot = 0; Table[If[PrimeQ[DivisorSigma[0, n]], tot++]; tot, {n, 100}] (* T. D. Noe, Jan 10 2012 *)
  • Python
    from sympy import primepi, integer_nthroot, primerange
    def A203967(n): return int(sum(primepi(integer_nthroot(n,k-1)[0]) for k in primerange(n.bit_length()+1))) # Chai Wah Wu, Feb 22 2025

Formula

a(n) = a(n-1) + A010055(n) * A010051(A100995(n)+1). - Reinhard Zumkeller, Jun 06 2013
Showing 1-10 of 21 results. Next