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 13 results. Next

A000005 d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, 6, 4, 4, 2, 8, 3, 4, 4, 6, 2, 8, 2, 6, 4, 4, 4, 9, 2, 4, 4, 8, 2, 8, 2, 6, 6, 4, 2, 10, 3, 6, 4, 6, 2, 8, 4, 8, 4, 4, 2, 12, 2, 4, 6, 7, 4, 8, 2, 6, 4, 8, 2, 12, 2, 4, 6, 6, 4, 8, 2, 10, 5, 4, 2, 12, 4, 4, 4, 8, 2, 12, 4, 6, 4, 4, 4, 12, 2, 6, 6, 9, 2, 8, 2, 8
Offset: 1

Views

Author

Keywords

Comments

If the canonical factorization of n into prime powers is Product p^e(p) then d(n) = Product (e(p) + 1). More generally, for k > 0, sigma_k(n) = Product_p ((p^((e(p)+1)*k))-1)/(p^k-1) is the sum of the k-th powers of the divisors of n.
Number of ways to write n as n = x*y, 1 <= x <= n, 1 <= y <= n. For number of unordered solutions to x*y=n, see A038548.
Note that d(n) is not the number of Pythagorean triangles with radius of the inscribed circle equal to n (that is A078644). For number of primitive Pythagorean triangles having inradius n, see A068068(n).
Number of factors in the factorization of the polynomial x^n-1 over the integers. - T. D. Noe, Apr 16 2003
Also equal to the number of partitions p of n such that all the parts have the same cardinality, i.e., max(p)=min(p). - Giovanni Resta, Feb 06 2006
Equals A127093 as an infinite lower triangular matrix * the harmonic series, [1/1, 1/2, 1/3, ...]. - Gary W. Adamson, May 10 2007
For odd n, this is the number of partitions of n into consecutive integers. Proof: For n = 1, clearly true. For n = 2k + 1, k >= 1, map each (necessarily odd) divisor to such a partition as follows: For 1 and n, map k + (k+1) and n, respectively. For any remaining divisor d <= sqrt(n), map (n/d - (d-1)/2) + ... + (n/d - 1) + (n/d) + (n/d + 1) + ... + (n/d + (d-1)/2) {i.e., n/d plus (d-1)/2 pairs each summing to 2n/d}. For any remaining divisor d > sqrt(n), map ((d-1)/2 - (n/d - 1)) + ... + ((d-1)/2 - 1) + (d-1)/2 + (d+1)/2 + ((d+1)/2 + 1) + ... + ((d+1)/2 + (n/d - 1)) {i.e., n/d pairs each summing to d}. As all such partitions must be of one of the above forms, the 1-to-1 correspondence and proof is complete. - Rick L. Shepherd, Apr 20 2008
Number of subgroups of the cyclic group of order n. - Benoit Jubin, Apr 29 2008
Equals row sums of triangle A143319. - Gary W. Adamson, Aug 07 2008
Equals row sums of triangle A159934, equivalent to generating a(n) by convolving A000005 prefaced with a 1; (1, 1, 2, 2, 3, 2, ...) with the INVERTi transform of A000005, (A159933): (1, 1,-1, 0, -1, 2, ...). Example: a(6) = 4 = (1, 1, 2, 2, 3, 2) dot (2, -1, 0, -1, 1, 1) = (2, -1, 0, -2, 3, 2) = 4. - Gary W. Adamson, Apr 26 2009
Number of times n appears in an n X n multiplication table. - Dominick Cancilla, Aug 02 2010
Number of k >= 0 such that (k^2 + k*n + k)/(k + 1) is an integer. - Juri-Stepan Gerasimov, Oct 25 2015
The only numbers k such that tau(k) >= k/2 are 1,2,3,4,6,8,12. - Michael De Vlieger, Dec 14 2016
a(n) is also the number of partitions of 2*n into equal parts, minus the number of partitions of 2*n into consecutive parts. - Omar E. Pol, May 03 2017
From Tomohiro Yamada, Oct 27 2020: (Start)
Let k(n) = log d(n)*log log n/(log 2 * log n), then lim sup k(n) = 1 (Hardy and Wright, Chapter 18, Theorem 317) and k(n) <= k(6983776800) = 1.537939... (the constant A280235) for every n (Nicolas and Robin, 1983).
There exist infinitely many n such that d(n) = d(n+1) (Heath-Brown, 1984). The number of such integers n <= x is at least c*x/(log log x)^3 (Hildebrand, 1987) but at most O(x/sqrt(log log x)) (Erdős, Carl Pomerance and Sárközy, 1987). (End)
Number of 2D grids of n congruent rectangles with two different side lengths, in a rectangle, modulo rotation (cf. A038548 for squares instead of rectangles). Also number of ways to arrange n identical objects in a rectangle (NOT modulo rotation, cf. A038548 for modulo rotation); cf. A007425 and A140773 for the 3D case. - Manfred Boergens, Jun 08 2021
The constant quoted above from Nicolas and Robin, 6983776800 = 2^5 * 3^3 * 5^2 * 7 * 11 * 13 * 17 * 19, appears arbitrary, but interestingly equals 2 * A095849(36). That second factor is highly composite and deeply composite. - Hal M. Switkay, Aug 08 2025

Examples

			G.f. = x + 2*x^2 + 2*x^3 + 3*x^4 + 2*x^5 + 4*x^6 + 2*x^7 + 4*x^8 + 3*x^9 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 38.
  • G. Chrystal, Algebra: An elementary text-book for the higher classes of secondary schools and for colleges, 6th ed, Chelsea Publishing Co., New York 1959 Part II, p. 345, Exercise XXI(16). MR0121327 (22 #12066)
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 55.
  • G. H. Hardy and E. M. Wright, revised by D. R. Heath-Brown and J. H. Silverman, An Introduction to the Theory of Numbers, 6th ed., Oxford Univ. Press, 2008.
  • K. Knopp, Theory and Application of Infinite Series, Blackie, London, 1951, p. 451.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Chap. II. (For inequalities, etc.)
  • S. Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962. Has many references to this sequence. - N. J. A. Sloane, Jun 02 2014
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • B. Spearman and K. S. Williams, Handbook of Estimates in the Theory of Numbers, Carleton Math. Lecture Note Series No. 14, 1975; see p. 2.1.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 285.
  • E. C. Titchmarsh, The Theory of Functions, Oxford, 1938, p. 160.
  • Terence Tao, Poincaré's Legacies, Part I, Amer. Math. Soc., 2009, see pp. 31ff for upper bounds on d(n).

Crossrefs

See A002183, A002182 for records. See A000203 for the sum-of-divisors function sigma(n).
For partial sums see A006218.
Factorizations into given number of factors: writing n = x*y (A038548, unordered, A000005, ordered), n = x*y*z (A034836, unordered, A007425, ordered), n = w*x*y*z (A007426, ordered).
Cf. A098198 (Dgf at s=2), A183030 (Dgf at s=3), A183031 (Dgf at s=3).

Programs

  • GAP
    List([1..150],n->Tau(n)); # Muniru A Asiru, Mar 05 2019
    
  • Haskell
    divisors 1 = [1]
    divisors n = (1:filter ((==0) . rem n)
                   [2..n `div` 2]) ++ [n]
    a = length . divisors
    -- James Spahlinger, Oct 07 2012
    
  • Haskell
    a000005 = product . map (+ 1) . a124010_row  -- Reinhard Zumkeller, Jul 12 2013
    
  • Julia
    function tau(n)
        i = 2; num = 1
        while i * i <= n
            if rem(n, i) == 0
                e = 0
                while rem(n, i) == 0
                    e += 1
                    n = div(n, i)
                end
                num *= e + 1
            end
            i += 1
        end
        return n > 1 ? num + num : num
    end
    println([tau(n) for n in 1:104])  # Peter Luschny, Sep 03 2023
  • Magma
    [ NumberOfDivisors(n) : n in [1..100] ]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Maple
    with(numtheory): A000005 := tau; [ seq(tau(n), n=1..100) ];
  • Mathematica
    Table[DivisorSigma[0, n], {n, 100}] (* Enrique Pérez Herrero, Aug 27 2009 *)
    CoefficientList[Series[(Log[1 - q] + QPolyGamma[1, q])/(q Log[q]), {q, 0, 100}], q] (* Vladimir Reshetnikov, Apr 23 2013 *)
    a[ n_] := SeriesCoefficient[ (QPolyGamma[ 1, q] + Log[1 - q]) / Log[q], {q, 0, Abs@n}]; (* Michael Somos, Apr 25 2013 *)
    a[ n_] := SeriesCoefficient[ q/(1 - q)^2 QHypergeometricPFQ[ {q, q}, {q^2, q^2}, q, q^2], {q, 0, Abs@n}]; (* Michael Somos, Mar 05 2014 *)
    a[n_] := SeriesCoefficient[q/(1 - q) QHypergeometricPFQ[{q, q}, {q^2}, q, q], {q, 0, Abs@n}] (* Mats Granvik, Apr 15 2015 *)
    With[{M=500},CoefficientList[Series[(2x)/(1-x)-Sum[x^k (1-2x^k)/(1-x^k),{k,M}],{x,0,M}],x]] (* Mamuka Jibladze, Aug 31 2018 *)
  • MuPAD
    numlib::tau (n)$ n=1..90 // Zerinvary Lajos, May 13 2008
    
  • PARI
    {a(n) = if( n==0, 0, numdiv(n))}; /* Michael Somos, Apr 27 2003 */
    
  • PARI
    {a(n) = n=abs(n); if( n<1, 0, direuler( p=2, n, 1 / (1 - X)^2)[n])}; /* Michael Somos, Apr 27 2003 */
    
  • PARI
    {a(n)=polcoeff(sum(m=1, n+1, sumdiv(m, d, (-log(1-x^(m/d) +x*O(x^n) ))^d/d!)), n)} \\ Paul D. Hanna, Aug 21 2014
    
  • Python
    from sympy import divisor_count
    for n in range(1, 20): print(divisor_count(n), end=', ') # Stefano Spezia, Nov 05 2018
    
  • Sage
    [sigma(n, 0) for n in range(1, 105)]  # Zerinvary Lajos, Jun 04 2009
    

Formula

If n is written as 2^z*3^y*5^x*7^w*11^v*... then a(n)=(z+1)*(y+1)*(x+1)*(w+1)*(v+1)*...
a(n) = 2 iff n is prime.
G.f.: Sum_{n >= 1} a(n) x^n = Sum_{k>0} x^k/(1-x^k). This is usually called THE Lambert series (see Knopp, Titchmarsh).
a(n) = A083888(n) + A083889(n) + A083890(n) + A083891(n) + A083892(n) + A083893(n) + A083894(n) + A083895(n) + A083896(n).
a(n) = A083910(n) + A083911(n) + A083912(n) + A083913(n) + A083914(n) + A083915(n) + A083916(n) + A083917(n) + A083918(n) + A083919(n).
Multiplicative with a(p^e) = e+1. - David W. Wilson, Aug 01 2001
a(n) <= 2 sqrt(n) [see Mitrinovich, p. 39, also A046522].
a(n) is odd iff n is a square. - Reinhard Zumkeller, Dec 29 2001
a(n) = Sum_{k=1..n} f(k, n) where f(k, n) = 1 if k divides n, 0 otherwise (Mobius transform of A000012). Equivalently, f(k, n) = (1/k)*Sum_{l=1..k} z(k, l)^n with z(k, l) the k-th roots of unity. - Ralf Stephan, Dec 25 2002
G.f.: Sum_{k>0} ((-1)^(k+1) * x^(k * (k + 1)/2) / ((1 - x^k) * Product_{i=1..k} (1 - x^i))). - Michael Somos, Apr 27 2003
a(n) = n - Sum_{k=1..n} (ceiling(n/k) - floor(n/k)). - Benoit Cloitre, May 11 2003
a(n) = A032741(n) + 1 = A062011(n)/2 = A054519(n) - A054519(n-1) = A006218(n) - A006218(n-1) = 1 + Sum_{k=1..n-1} A051950(k+1). - Ralf Stephan, Mar 26 2004
G.f.: Sum_{k>0} x^(k^2)*(1+x^k)/(1-x^k). Dirichlet g.f.: zeta(s)^2. - Michael Somos, Apr 05 2003
Sequence = M*V where M = A129372 as an infinite lower triangular matrix and V = ruler sequence A001511 as a vector: [1, 2, 1, 3, 1, 2, 1, 4, ...]. - Gary W. Adamson, Apr 15 2007
Sequence = M*V, where M = A115361 is an infinite lower triangular matrix and V = A001227, the number of odd divisors of n, is a vector: [1, 1, 2, 1, 2, 2, 2, ...]. - Gary W. Adamson, Apr 15 2007
Row sums of triangle A051731. - Gary W. Adamson, Nov 02 2007
Sum_{n>0} a(n)/(n^n) = Sum_{n>0, m>0} 1/(n*m). - Gerald McGarvey, Dec 15 2007
Logarithmic g.f.: Sum_{n>=1} a(n)/n * x^n = -log( Product_{n>=1} (1-x^n)^(1/n) ). - Joerg Arndt, May 03 2008
a(n) = Sum_{k=1..n} (floor(n/k) - floor((n-1)/k)). - Enrique Pérez Herrero, Aug 27 2009
a(s) = 2^omega(s), if s > 1 is a squarefree number (A005117) and omega(s) is: A001221. - Enrique Pérez Herrero, Sep 08 2009
a(n) = A048691(n) - A055205(n). - Reinhard Zumkeller, Dec 08 2009
For n > 1, a(n) = 2 + Sum_{k=2..n-1} floor((cos(Pi*n/k))^2). And floor((cos(Pi*n/k))^2) = floor(1/4 * e^(-(2*i*Pi*n)/k) + 1/4 * e^((2*i*Pi*n)/k) + 1/2). - Eric Desbiaux, Mar 09 2010, corrected Apr 16 2011
a(n) = 1 + Sum_{k=1..n} (floor(2^n/(2^k-1)) mod 2) for every n. - Fabio Civolani (civox(AT)tiscali.it), Mar 12 2010
From Vladimir Shevelev, May 22 2010: (Start)
(Sum_{d|n} a(d))^2 = Sum_{d|n} a(d)^3 (J. Liouville).
Sum_{d|n} A008836(d)*a(d)^2 = A008836(n)*Sum_{d|n} a(d). (End)
a(n) = sigma_0(n) = 1 + Sum_{m>=2} Sum_{r>=1} (1/m^(r+1))*Sum_{j=1..m-1} Sum_{k=0..m^(r+1)-1} e^(2*k*Pi*i*(n+(m-j)*m^r)/m^(r+1)). - A. Neves, Oct 04 2010
a(n) = 2*A038548(n) - A010052(n). - Reinhard Zumkeller, Mar 08 2013
Sum_{n>=1} a(n)*q^n = (log(1-q) + psi_q(1)) / log(q), where psi_q(z) is the q-digamma function. - Vladimir Reshetnikov, Apr 23 2013
a(n) = Product_{k = 1..A001221(n)} (A124010(n,k) + 1). - Reinhard Zumkeller, Jul 12 2013
a(n) = Sum_{k=1..n} A238133(k)*A000041(n-k). - Mircea Merca, Feb 18 2013
G.f.: Sum_{k>=1} Sum_{j>=1} x^(j*k). - Mats Granvik, Jun 15 2013
The formula above is obtained by expanding the Lambert series Sum_{k>=1} x^k/(1-x^k). - Joerg Arndt, Mar 12 2014
G.f.: Sum_{n>=1} Sum_{d|n} ( -log(1 - x^(n/d)) )^d / d!. - Paul D. Hanna, Aug 21 2014
2*Pi*a(n) = Sum_{m=1..n} Integral_{x=0..2*Pi} r^(m-n)( cos((m-n)*x)-r^m cos(n*x) )/( 1+r^(2*m)-2r^m cos(m*x) )dx, 0 < r < 1 a free parameter. This formula is obtained as the sum of the residues of the Lambert series Sum_{k>=1} x^k/(1-x^k). - Seiichi Kirikami, Oct 22 2015
a(n) = A091220(A091202(n)) = A106737(A156552(n)). - Antti Karttunen, circa 2004 & Mar 06 2017
a(n) = A034296(n) - A237665(n+1) [Wang, Fokkink, Fokkink]. - George Beck, May 06 2017
G.f.: 2*x/(1-x) - Sum_{k>0} x^k*(1-2*x^k)/(1-x^k). - Mamuka Jibladze, Aug 29 2018
a(n) = Sum_{k=1..n} 1/phi(n / gcd(n, k)). - Daniel Suteu, Nov 05 2018
a(k*n) = a(n)*(f(k,n)+2)/(f(k,n)+1), where f(k,n) is the exponent of the highest power of k dividing n and k is prime. - Gary Detlefs, Feb 08 2019
a(n) = 2*log(p(n))/log(n), n > 1, where p(n)= the product of the factors of n = A007955(n). - Gary Detlefs, Feb 15 2019
a(n) = (1/n) * Sum_{k=1..n} sigma(gcd(n,k)), where sigma(n) = sum of divisors of n. - Orges Leka, May 09 2019
a(n) = A001227(n)*(A007814(n) + 1) = A001227(n)*A001511(n). - Ivan N. Ianakiev, Nov 14 2019
From Richard L. Ollerton, May 11 2021: (Start)
a(n) = A038040(n) / n = (1/n)*Sum_{d|n} phi(d)*sigma(n/d), where phi = A000010 and sigma = A000203.
a(n) = (1/n)*Sum_{k=1..n} phi(gcd(n,k))*sigma(n/gcd(n,k))/phi(n/gcd(n,k)). (End)
From Ridouane Oudra, Nov 12 2021: (Start)
a(n) = Sum_{j=1..n} Sum_{k=1..j} (1/j)*cos(2*k*n*Pi/j);
a(n) = Sum_{j=1..n} Sum_{k=1..j} (1/j)*e^(2*k*n*Pi*i/j), where i^2=-1. (End)

Extensions

Incorrect formula deleted by Ridouane Oudra, Oct 28 2021

A035116 a(n) = tau(n)^2, where tau(n) = A000005(n).

Original entry on oeis.org

1, 4, 4, 9, 4, 16, 4, 16, 9, 16, 4, 36, 4, 16, 16, 25, 4, 36, 4, 36, 16, 16, 4, 64, 9, 16, 16, 36, 4, 64, 4, 36, 16, 16, 16, 81, 4, 16, 16, 64, 4, 64, 4, 36, 36, 16, 4, 100, 9, 36, 16, 36, 4, 64, 16, 64, 16, 16, 4, 144, 4, 16
Offset: 1

Views

Author

Keywords

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 59.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Theorem 304.

Crossrefs

Programs

Formula

Dirichlet g.f.: zeta(s)^4/zeta(2s).
tau(n)^2 = Sum_{d|n} tau(d^2), Dirichlet convolution of A048691 and A000012 (i.e.: inverse Mobius transform of A048691).
Multiplicative with a(p^e) = (e+1)^2. - Vladeta Jovovic, Dec 03 2001
G.f.: Sum_{n>=1} A000005(n^2)*x^n/(1-x^n). - Mircea Merca, Feb 25 2014
a(n) = A066446(n) + A184389(n). - Reinhard Zumkeller, Sep 08 2015
Let b(n), n > 0, be the Dirichlet inverse of a(n). Then b(n) is multiplicative with b(p^e) = (-1)^e*(Sum_{i=0..e} binomial(3,i)) for prime p and e >= 0, where binomial(n,k)=0 if n < k; abs(b(n)) is multiplicative and has the Dirichlet g.f.: (zeta(s))^4/(zeta(2*s))^3. - Werner Schulte, Feb 07 2021

Extensions

Additional comments from Vladeta Jovovic, Apr 29 2001

A184389 a(n) = Sum_{k=1..tau(n)} k, where tau is the number of divisors of n (A000005).

Original entry on oeis.org

1, 3, 3, 6, 3, 10, 3, 10, 6, 10, 3, 21, 3, 10, 10, 15, 3, 21, 3, 21, 10, 10, 3, 36, 6, 10, 10, 21, 3, 36, 3, 21, 10, 10, 10, 45, 3, 10, 10, 36, 3, 36, 3, 21, 21, 10, 3, 55, 6, 21, 10, 21, 3, 36, 10, 36, 10, 10, 3, 78, 3, 10, 21, 28, 10, 36, 3, 21, 10, 36, 3, 78
Offset: 1

Views

Author

Jaroslav Krizek, Jan 12 2011

Keywords

Comments

Length of row n in triangle A187207. - Omar E. Pol, Aug 07 2011
Number of pairs of even divisors of 2n, (d1,d2), such that d1<=d2. - Wesley Ivan Hurt, Aug 24 2020

Examples

			For n = 4; tau(4) = 3; a(4) = 1+2+3 = 6.
		

Crossrefs

Cf. A000005 (tau), A000217 (triangular numbers).

Programs

Formula

a(n) = A000217(A000005(n)) = (1/2)*A000005(n)*(A000005(n)+1).
a(n) = A066446(n) + A000005(n) = A035116(n) - A066446(n). - Reinhard Zumkeller, Sep 08 2015
Dirichlet g.f.: zeta(s)^2*(zeta(s)^2 + zeta(2*s))/(2*zeta(2*s)). - Ilya Gutkovskiy, Jun 25 2016
a(n) = Sum_{d1|(2*n), d2|(2*n), d1 and d2 even, d1<=d2} 1. - Wesley Ivan Hurt, Aug 24 2020
a(n) = Sum_{d|n} A018892(d). - Daniel Suteu, Jan 08 2021
a(n) = Sum_{d|n} A135539(n,d). - Ridouane Oudra, May 29 2025
a(n) = A337362(n) + A129308(n). - Ridouane Oudra, May 30 2025

A129510 Number of distinct differences between pairs of distinct divisors of n.

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 1, 6, 3, 6, 1, 10, 1, 6, 5, 10, 1, 13, 1, 13, 6, 6, 1, 18, 3, 6, 6, 14, 1, 19, 1, 15, 6, 6, 6, 24, 1, 6, 6, 22, 1, 23, 1, 15, 12, 6, 1, 30, 3, 15, 6, 15, 1, 25, 6, 23, 6, 6, 1, 37, 1, 6, 13, 21, 6, 25, 1, 15, 6, 24, 1, 40, 1, 6, 13, 15, 6, 26, 1, 34, 10, 6, 1, 45, 6, 6, 6, 26
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 19 2007

Keywords

Comments

a(n) = #{|x-y|: x <> y and n mod x = n mod y = 0};
a(n) = 1 iff n is prime;
a(n) <= A000217(A000005(a(n))-1) = A066446(n):
a(A129511(n))=A066446(A129511(n)), a(A129512(n)) < A066446(A129512(n)).

Examples

			n=44, set of divisors of 44 = {1,2,4,11,22,44}:
44-22=22, 44-11=33, 44-4=40, 44-2=42, 44-1=41,
22-11=11, 22-4=18, 22-2=20, 22-1=21,
11-4=7, 11-2=9, 11-1=10, 4-2=2, 4-1=3, 2-1=1,
a(44) = #{1,2,3,7,9,10,11,18,20,21,22,33,40,41,42} = 15;
n=45, set of divisors of 45 = {1,3,5,9,15,45}:
45-15=30, 45-9=36, 45-5=40, 45-3=42, 45-1=44,
15-9=6, 15-5=10, 15-3=12, 15-1=14,
9-5=4, 9-3=6, 9-1=8, 5-3=2, 5-1=4, 3-1=2,
a(45) = #{2,4,6,8,10,12,14,30,36,40,42,44} = 12.
		

Crossrefs

Cf. A000005.

Programs

  • Mathematica
    a[n_]:=Length[Union[Flatten[Differences/@Subsets[Divisors[n],{2}]]]];Table[a[n],{n,88}] (* James C. McMahon, Jan 21 2025 *)
  • PARI
    a(n)=my(d=divisors(n),v=List()); for(i=1,#d-1,for(j=i+1,#d, listput(v,d[j]-d[i]))); #Set(v) \\ Charles R Greathouse IV, Aug 26 2015

A275387 Numbers of ordered pairs of divisors d < e of n such that gcd(d, e) > 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 3, 1, 2, 0, 8, 0, 2, 2, 6, 0, 8, 0, 8, 2, 2, 0, 18, 1, 2, 3, 8, 0, 15, 0, 10, 2, 2, 2, 24, 0, 2, 2, 18, 0, 15, 0, 8, 8, 2, 0, 32, 1, 8, 2, 8, 0, 18, 2, 18, 2, 2, 0, 44, 0, 2, 8, 15, 2, 15, 0, 8, 2, 15, 0, 49, 0, 2, 8, 8, 2, 15, 0, 32, 6, 2
Offset: 1

Views

Author

Michel Lagneau, Aug 03 2016

Keywords

Comments

Number of elements in the set {(x, y): x|n, y|n, x < y, gcd(x, y) > 1}.
Every element of the sequence is repeated indefinitely, for instance:
a(n)=0 if n prime;
a(n)=1 if n = p^2 for p prime (A001248);
a(n)=2 if n is a squarefree semiprime (A006881);
a(n)=3 if n = p^3 for p prime (A030078);
a(n)=6 if n = p^4 for p prime (A030514);
a(n)=8 if n is a number which is the product of a prime and the square of a different prime (A054753);
a(n)=10 if n = p^5 for p prime (A050997);
a(n)=15 if n is in the set {A007304} union {64} = {30, 42, 64, 66, 70,...} = {Sphenic numbers} union {64};
a(n)=18 if n is the product of the cube of a prime (A030078) and a different prime (see A065036);
a(n)=21 if n = p^7 for p prime (A092759);
a(n)=24 if n is square of a squarefree semiprime (A085986);
a(n)=32 if n is the product of the 4th power of a prime (A030514) and a different prime (see A178739);
a(n)=36 if n = p^9 for p prime (A179665);
a(n)=44 if n is the product of exactly four primes, three of which are distinct (A085987);
a(n)=45 if n is a number with 11 divisors (A030629);
a(n)=49 if n is of the form p^2*q^3, where p,q are distinct primes (A143610);
a(n)=50 if n is the product of the 5th power of a prime (A050997) and a different prime (see A178740);
a(n)=55 if n if n = p^11 for p prime(A079395);
a(n)=72 if n is a number with 14 divisors (A030632);
a(n)=80 if n is the product of four distinct primes (A046386);
a(n)=83 if n is a number with 15 divisors (A030633);
a(n)=89 if n is a number with prime factorization pqr^3 (A189975);
a(n)=96 if n is a number that are the cube of a product of two distinct primes (A162142);
a(n)=98 if n is the product of the 7th power of a prime and a distinct prime (p^7*q) (A179664);
a(n)=116 if n is the product of exactly 2 distinct squares of primes and a different prime (p^2*q^2*r) (A179643);
a(n)=126 if n is the product of the 5th power of a prime and different distinct prime of the 2nd power (p^5*q^2) (A179646);
a(n)=128 if n is the product of the 8th power of a prime and a distinct prime (p^8*q) (A179668);
a(n)=150 if n is the product of the 4th power of a prime and 2 different distinct primes (p^4*q*r) (A179644);
a(n)=159 if n is the product of the 4th power of a prime and a distinct prime of power 3 (p^4*q^3) (A179666).
It is possible to continue with a(n) = 162, 178, 209, 224, 227, 238, 239, 260, 289, 309, 320, 333,...

Examples

			a(12) = 8 because the divisors of 12 are {1, 2, 3, 4, 6, 12} and GCD(d_i, d_j)>1 for the 8 following pairs of divisors: (2,4), (2,6), (2,12), (3,6), (3,12), (4,6), (4,12) and (6,12).
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=100:
    for n from 1 to nn do:
    x:=divisors(n):n0:=nops(x):it:=0:
    for i from 1 to n0 do:
      for j from i+1 to n0 do:
       if gcd(x[i],x[j])>1
        then
        it:=it+1:
        else
       fi:
      od:
    od:
      printf(`%d, `,it):
    od:
  • Mathematica
    Table[Sum[Sum[(1 - KroneckerDelta[GCD[i, k], 1]) (1 - Ceiling[n/k] + Floor[n/k]) (1 - Ceiling[n/i] + Floor[n/i]), {i, k - 1}], {k, n}], {n, 100}] (* Wesley Ivan Hurt, Jan 01 2021 *)
  • PARI
    a(n)=my(d=divisors(n)); sum(i=2,#d, sum(j=1,i-1, gcd(d[i],d[j])>1)) \\ Charles R Greathouse IV, Aug 03 2016
    
  • PARI
    a(n)=my(f=factor(n)[,2],t=prod(i=1,#f,f[i]+1)); t*(t-1)/2 - (prod(i=1,#f,2*f[i]+1)+1)/2 \\ Charles R Greathouse IV, Aug 03 2016

Formula

a(n) = A066446(n) - A063647(n).
a(n) = Sum_{d1|n, d2|n, d1Wesley Ivan Hurt, Jan 01 2021

A129511 Numbers such that all differences between distinct divisors occur exactly once.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 62, 64, 65, 67, 68, 69, 71, 73, 74, 76, 77, 79, 81, 82, 83, 85, 86, 87, 89, 92, 93, 94, 95, 97, 98, 101, 103
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 19 2007

Keywords

Comments

A129510(a(n)) = A066446(a(n)).
a(n) = A174905(n) for n<27, A174905(27)=37 whereas a(27)=35. - Reinhard Zumkeller, Apr 01 2010

Examples

			See example for a(33)=44 in A129510.
		

Crossrefs

Cf. A027750, A066446, A129510, A129512 (complement), A174905.

Programs

  • Haskell
    import Data.List.Ordered (isect, union)
    a129511 n = a129511_list !! (n-1)
    a129511_list = filter (f [] . a027750_row') [1..] where
       f  [] = True
       f zs (d:ds) = null (dds `isect` zs) && f (dds `union` zs) ds
                     where dds = map (subtract d) ds
    -- Reinhard Zumkeller, Jun 25 2015
  • Mathematica
    Select[Range[103],CountDistinct[Differences /@ Subsets[Divisors[#], {2}]]==Length[Flatten[Differences /@ Subsets[Divisors[#], {2}]]]&] (* James C. McMahon, Jan 21 2025 *)

A129512 Numbers with at least two pairs of distinct divisors having equal differences.

Original entry on oeis.org

6, 12, 15, 18, 20, 24, 28, 30, 36, 40, 42, 45, 48, 54, 56, 60, 63, 66, 70, 72, 75, 78, 80, 84, 88, 90, 91, 96, 99, 100, 102, 105, 108, 110, 112, 114, 120, 126, 130, 132, 135, 138, 140, 144, 150, 153, 156, 160, 162, 165, 168, 174, 176, 180, 182, 186, 189, 190, 192, 195
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 19 2007

Keywords

Examples

			See example for a(12) = 45 in A129510.
		

Crossrefs

Cf. A129510, A066446, A129511 (complement).
Subsequences: A008588, A008597, A129521, A259366.

Programs

  • Haskell
    import Data.List.Ordered (minus)
    a129512 n = a129512_list !! (n-1)
    a129512_list = minus [1..] a129511_list
    -- Reinhard Zumkeller, Aug 10 2015
    
  • Mathematica
    q[k_] := Count[Tally[Differences /@ Subsets[Divisors[k], {2}] // Flatten][[;; , 2]], ?(# > 1 &)] > 0; Select[Range[200], q] (* _Amiram Eldar, Jan 27 2025 *)
  • PARI
    is(n)=my(d=divisors(n)); for(i=1,#d-2, for(j=i+1,#d-1, for(k=1,#d, if(i!=k && setsearch(d, d[j]-d[i]+d[k]), return(1))))); 0 \\ Charles R Greathouse IV, Aug 26 2015

Formula

A129510(a(n)) < A066446(a(n)).

A319354 a(n) = Product prime(k), where k ranges over the lengths of all arithmetic progressions formed from the divisors of n (with at least two distinct terms each); a(1) = 2 by convention.

Original entry on oeis.org

2, 3, 3, 27, 3, 1215, 3, 729, 27, 729, 3, 93002175, 3, 729, 1215, 59049, 3, 39858075, 3, 14348907, 729, 729, 3, 576626970315375, 27, 729, 729, 23914845, 3, 176518460300625, 3, 14348907, 729, 729, 729, 6305415920398625625, 3, 729, 729, 38127987424935, 3, 63546645708225, 3, 14348907, 66430125, 729, 3, 289588836976147679079375, 27, 14348907, 729
Offset: 1

Views

Author

Antti Karttunen, Sep 21 2018

Keywords

Examples

			For n = 6, the arithmetic progressions found in its divisor set {1, 2, 3, 6} are: {1, 2}, {1, 3}, {2, 3}, {2, 6}, {3, 6} and {1, 2, 3}. Five of these have length 2, and one is of length 3, thus a(6) = prime(2)^5 * prime(3) = 243*5 = 1215.
		

Crossrefs

Cf. A319355 (rgs-transform).

Programs

  • PARI
    A319354(n) = if(1==n,2,my(d=divisors(n),m=1); for(i=1,(#d-1), for(j=(i+1),#d,my(c=1,k=d[j],s=(d[j]-d[i])); while(!(n%k), k+=s; c++); m *= prime(c))); (m));

Formula

For all n >= 1:
A061395(a(n)) = A067131(n).
A071178(a(n)) = A160752(n).
For all n >= 2, A001222(a(n)) = A066446(n).

A337297 a(n) = sigma(n)*(tau(n) - 1).

Original entry on oeis.org

0, 3, 4, 14, 6, 36, 8, 45, 26, 54, 12, 140, 14, 72, 72, 124, 18, 195, 20, 210, 96, 108, 24, 420, 62, 126, 120, 280, 30, 504, 32, 315, 144, 162, 144, 728, 38, 180, 168, 630, 42, 672, 44, 420, 390, 216, 48, 1116, 114, 465, 216, 490, 54, 840, 216, 840, 240, 270, 60, 1848, 62, 288
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 21 2020

Keywords

Comments

Original name was: Sum of the coordinates of all pairs of divisors of n, (d1,d2), such that d1 < d2.
If n = p where p is prime, the only pair of divisors of p such that d1 < d2 is (1,p), whose coordinate sum is a(p) = p + 1. - Wesley Ivan Hurt, May 21 2021

Examples

			a(3) = 4; The divisors of 3 are {1,3}. If we form all ordered pairs (d1,d2) such that d1 < d2, we have: (1,3). The sum of the coordinates gives 1+3 = 4.
a(4) = 14; The divisors of 4 are {1,2,4}. If we form all ordered pairs (d1,d2) such that d1<d2, we have: (1,2), (1,4), (2,4). The sum of all the coordinates gives 1+2+1+4+2+4 = 14.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(i + k)*(1 - Ceiling[n/k] + Floor[n/k]) (1 - Ceiling[n/i] + Floor[n/i]), {i, k - 1}], {k, n}], {n, 100}]
  • PARI
    a(n) = my(d = divisors(n)); sum(i=1, #d, sum(j=1, i-1, d[i]+d[j])); \\ Michel Marcus, Aug 22 2020

Formula

a(n) = Sum_{d1|n, d2|n, d1
a(p^k) = k*(p^(k+1)-1)/(p-1) for p prime and k >= 1. - Wesley Ivan Hurt, Aug 23 2025

Extensions

New name using formula from Ridouane Oudra, Jul 31 2025

A337363 a(n) = Sum_{d1|n, d2|n, d1

Original entry on oeis.org

0, 0, 1, 2, 1, 4, 1, 5, 3, 5, 1, 12, 1, 5, 6, 9, 1, 13, 1, 13, 6, 5, 1, 25, 3, 5, 6, 14, 1, 25, 1, 14, 6, 5, 6, 33, 1, 5, 6, 26, 1, 25, 1, 14, 15, 5, 1, 42, 3, 14, 6, 14, 1, 26, 6, 26, 6, 5, 1, 61, 1, 5, 15, 20, 6, 26, 1, 14, 6, 27, 1, 62, 1, 5, 15, 14, 6, 26, 1, 43, 10, 5, 1, 62
Offset: 1

Author

Wesley Ivan Hurt, Aug 24 2020

Keywords

Comments

Number of pairs of divisors of n, (d1,d2), with d1 < d2 such that d1 and d2 are nonconsecutive integers. For example, the 4 pairs for a(6) are (1,3), (1,6), (2,6) and (3,6).
Also, the number of distinct nonsquare rectangles that can be made using any divisors of n as side lengths and whose length is never one more than its width.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - KroneckerDelta[i + 1, k]) (1 - Ceiling[n/k] + Floor[n/k]) (1 - Ceiling[n/i] + Floor[n/i]), {i, k - 1}], {k, n}], {n, 100}]
    Table[Count[Subsets[Divisors[n],{2}],?(#[[2]]-#[[1]]>1&)],{n,90}] (* _Harvey P. Dale, Mar 11 2023 *)
  • PARI
    a(n) = sumdiv(n, d1, sumdiv(n, d2, (d1Michel Marcus, Aug 25 2020

Formula

a(n) = A337362(n) - A000005(n).
a(n) = A066446(n) - A129308(n). - Ridouane Oudra, Apr 16 2023
Showing 1-10 of 13 results. Next