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 102 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

A107429 Number of complete compositions of n.

Original entry on oeis.org

1, 1, 3, 4, 8, 18, 33, 65, 127, 264, 515, 1037, 2052, 4103, 8217, 16408, 32811, 65590, 131127, 262112, 524409, 1048474, 2097319, 4194250, 8389414, 16778024, 33557921, 67116113, 134235473, 268471790, 536948820, 1073893571, 2147779943, 4295515305, 8590928746
Offset: 1

Views

Author

N. J. A. Sloane, May 26 2005

Keywords

Comments

A composition is complete if it is gap-free and contains a 1. - Geoffrey Critzer, Apr 13 2014

Examples

			a(5)=8 because we have: 2+2+1, 2+1+2, 1+2+2, 2+1+1+1, 1+2+1+1, 1+1+2+1, 1+1+1+2, 1+1+1+1+1. - _Geoffrey Critzer_, Apr 13 2014
		

Crossrefs

Row sums of A371417 and of A373118.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, `if`(i=0, t!, 0),
          `if`(i<1 or n add(b(n, i, 0), i=1..n):
    seq(a(n), n=1..40);  # Alois P. Heinz, Apr 14 2014
  • Mathematica
    Table[Length[Select[Level[Map[Permutations,IntegerPartitions[n]],{2}],MemberQ[#,1]&&Length[Union[#]]==Max[#]-Min[#]+1&]],{n,1,20}] (* Geoffrey Critzer, Apr 13 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[i == 0, t!, 0], If[i < 1 || n < i, 0, Sum[b[n - i*j, i - 1, t + j]/j!, {j, 1, n/i}]]];
    a[n_] := Sum[b[n, i, 0], {i, 1, n}];
    Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Aug 30 2016, after Alois P. Heinz *)
  • PARI
    C_x(s,N)={my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, C_x(setminus(s,[s[i]]),N) * x^(s[i]) )/(1-sum(i=1,#s, x^(s[i]))))); return(g)}
    B_x(N)={my(x='x+O('x^N), j=1, h=0); while((j*(j+1))/2 <= N, h += C_x(vector(j,i,i),N+1); j+=1); my(a = Vec(h)); vector(N,i,a[i])}
    B_x(35) \\ John Tyler Rascoe, May 25 2024

Formula

a(n) ~ 2^(n-2). - Vaclav Kotesovec, Sep 05 2014
G.f.: Sum_{k>0} C({1..k},x) where C({s},x) = Sum_{i in {s}} (C({s}-{i},x)*x^i)/(1 - Sum_{i in {s}} (x^i)) is the g.f. for compositions such that the set of parts equals {s} with C({},x) = 1. - John Tyler Rascoe, May 24 2024

Extensions

More terms from Vladeta Jovovic, May 26 2005

A342098 Number of (necessarily strict) integer partitions of n with all adjacent parts having quotients > 2.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 23, 25, 26, 28, 31, 33, 35, 38, 40, 42, 45, 48, 51, 55, 58, 61, 65, 68, 72, 77, 81, 85, 90, 94, 98, 104, 109, 114, 121, 127, 132, 139, 146
Offset: 1

Views

Author

Gus Wiseman, Mar 04 2021

Keywords

Comments

The decapitation of such a partition (delete the greatest part) is term-wise less than its negated first-differences.

Examples

			The a(1) = 1 through a(16) = 8 partitions (A..G = 10..16):
  1  2  3  4   5   6   7   8   9   A   B    C    D    E    F    G
           31  41  51  52  62  72  73  83   93   94   A4   B4   B5
                       61  71  81  82  92   A2   A3   B3   C3   C4
                                   91  A1   B1   B2   C2   D2   D3
                                       731  831  C1   D1   E1   E2
                                                 931  941  A41  F1
                                                      A31  B31  B41
                                                                C31
		

Crossrefs

The version allowing equality is A000929.
The case of equality (all adjacent parts having quotient 2) is A154402.
The multiplicative version is A342083.
The version with all quotients <= 2 is A342094 (strict: A342095).
The version with all quotients < 2 is A342096 (strict: A342097).
A000009 counts strict partitions.
A003114 counts partitions with adjacent parts differing by more than 1.
A034296 counts partitions with adjacent parts differing by at most 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Thread[Differences[-#]>Rest[#]]&]],{n,30}]

A342094 Number of integer partitions of n with no adjacent parts having quotient > 2.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 13, 16, 21, 27, 37, 44, 59, 75, 94, 117, 153, 186, 238, 296, 369, 458, 573, 701, 870, 1068, 1312, 1601, 1964, 2384, 2907, 3523, 4270, 5159, 6235, 7491, 9021, 10819, 12964, 15494, 18517, 22049, 26260, 31195, 37020, 43851, 51906, 61290
Offset: 1

Views

Author

Gus Wiseman, Mar 02 2021

Keywords

Comments

The decapitation of such a partition (delete the greatest part) is term-wise greater than or equal to its negated first-differences.

Examples

			The a(1) = 1 through a(8) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (211)   (221)    (42)      (322)      (53)
                    (1111)  (2111)   (222)     (421)      (332)
                            (11111)  (321)     (2221)     (422)
                                     (2211)    (3211)     (2222)
                                     (21111)   (22111)    (3221)
                                     (111111)  (211111)   (4211)
                                               (1111111)  (22211)
                                                          (32111)
                                                          (221111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

The version with no adjacent parts having quotient < 2 is A000929.
The case of equality (all adjacent parts having quotient 2) is A154402.
A strong multiplicative version is A342083 or A342084.
The multiplicative version is A342085, with reciprocal version A337135.
The strict case is A342095.
The version with all adjacent parts having quotient < 2 is A342096, with strict case A342097.
The version with all adjacent parts having quotient > 2 is A342098.
The Heinz numbers of these partitions are listed by A342191.
A000009 counts strict partitions.
A003114 counts partitions with adjacent parts differing by more than 1.
A034296 counts partitions with adjacent parts differing by at most 1.
A038548 counts inferior (or superior) divisors, listed by A161906.
A161908 lists superior prime divisors.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Thread[Differences[-#]<=Rest[#]]&]],{n,30}]

A342096 Number of integer partitions of n with no adjacent parts having quotient >= 2.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 6, 6, 8, 9, 11, 13, 17, 19, 24, 29, 35, 42, 51, 61, 75, 90, 108, 130, 158, 189, 227, 272, 325, 389, 464, 553, 659, 782, 929, 1102, 1306, 1545, 1824, 2153, 2538, 2989, 3514, 4127, 4842, 5673, 6642, 7766, 9068, 10583, 12335, 14361, 16705
Offset: 1

Views

Author

Gus Wiseman, Mar 02 2021

Keywords

Comments

The decapitation of such a partition (delete the greatest part) is term-wise greater than its negated first-differences.

Examples

			The a(1) = 1 through a(10) = 8 partitions:
  1  2   3    4     5      6       7        8         9          A
     11  111  22    32     33      43       44        54         55
              1111  11111  222     322      53        333        64
                           111111  1111111  332       432        433
                                            2222      3222       532
                                            11111111  111111111  3322
                                                                 22222
                                                                 1111111111
		

Crossrefs

The case of equality (all adjacent parts having quotient 2) is A154402.
The multiplicative version is A342083 or A342084.
The version allowing quotients of 2 exactly is A342094.
The strict case allowing quotients of 2 exactly is A342095.
The strict case is A342097.
The reciprocal version is A342098.
A000009 counts strict partitions.
A000929 counts partitions with no adjacent parts having quotient < 2.
A003114 counts partitions with adjacent parts differing by more than 1.
A034296 counts partitions with adjacent parts differing by at most 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Thread[Differences[-#]
    				

A342097 Number of strict integer partitions of n with no adjacent parts having quotient >= 2.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 3, 3, 3, 3, 4, 6, 6, 7, 8, 8, 9, 11, 13, 15, 18, 20, 24, 25, 29, 32, 39, 42, 48, 54, 63, 72, 81, 89, 102, 116, 132, 147, 165, 187, 210, 238, 264, 296, 329, 371, 414, 465, 516, 580, 644, 722, 803, 897, 994, 1108, 1229, 1367, 1512, 1678
Offset: 1

Views

Author

Gus Wiseman, Mar 02 2021

Keywords

Comments

The decapitation of such a partition (delete the greatest part) is term-wise greater than its negated first-differences.

Examples

			The a(1) = 1 through a(16) = 7 partitions (A..G = 10..16):
  1  2  3  4  5   6  7   8   9    A    B   C    D    E     F     G
              32     43  53  54   64   65  75   76   86    87    97
                             432  532  74  543  85   95    96    A6
                                                643  653   654   754
                                                     743   753   853
                                                     5432  6432  6532
                                                                 7432
		

Crossrefs

The case of equality (all adjacent parts having quotient 2) is A154402.
The multiplicative version is A342083 or A342084.
The non-strict version allowing quotients of 2 exactly is A342094.
The version allowing quotients of 2 exactly is A342095.
The non-strict version is A342096.
The reciprocal version is A342098.
A000009 counts strict partitions.
A000929 counts partitions with no adjacent parts having quotient < 2.
A003114 counts partitions with adjacent parts differing by more than 1.
A034296 counts partitions with adjacent parts differing by at most 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&And@@Thread[Differences[-#]
    				

A342095 Number of strict integer partitions of n with no adjacent parts having quotient > 2.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 3, 2, 4, 4, 6, 7, 6, 8, 10, 9, 13, 16, 17, 20, 25, 26, 29, 36, 40, 45, 55, 61, 69, 81, 90, 103, 119, 132, 154, 176, 196, 225, 254, 282, 323, 364, 403, 458, 519, 582, 655, 735, 822, 922, 1035, 1153, 1290, 1441, 1600, 1788, 1997, 2217, 2468
Offset: 1

Views

Author

Gus Wiseman, Mar 02 2021

Keywords

Comments

The decapitation of such a partition (delete the greatest part) is term-wise greater than or equal to its negated first-differences.

Examples

			The a(1) = 1 through a(15) = 10 partitions (A..F = 10..15):
  1  2  3   4  5   6    7    8   9    A     B     C     D     E     F
        21     32  42   43   53  54   64    65    75    76    86    87
                   321  421      63   532   74    84    85    95    96
                                 432  4321  542   543   643   653   A5
                                            632   642   742   743   654
                                            5321  5421  6421  842   753
                                                  6321        5432  843
                                                              7421  6432
                                                                    8421
                                                                    54321
		

Crossrefs

The reciprocal version (no adjacent parts having quotient < 2) is A000929.
The case of equality (all adjacent parts having quotient 2) is A154402.
The multiplicative version is A342085 or A337135.
The non-strict version is A342094.
The non-strict version without quotients of 2 exactly is A342096.
The version without quotients of 2 exactly is A342097.
A000009 counts strict partitions.
A003114 counts partitions with adjacent parts differing by more than 1.
A034296 counts partitions with adjacent parts differing by at most 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&And@@Thread[Differences[-#]<=Rest[#]]&]],{n,30}]

A268193 Triangle read by rows: T(n,k) (n>=1, k>=0) is the number of partitions of n which have k distinct parts i such that i+1 is also a part.

Original entry on oeis.org

1, 2, 2, 1, 4, 1, 4, 3, 8, 2, 1, 8, 6, 1, 13, 7, 2, 15, 11, 4, 22, 15, 4, 1, 24, 24, 7, 1, 37, 26, 12, 2, 40, 42, 16, 3, 57, 50, 22, 6, 64, 72, 33, 6, 1, 89, 84, 46, 11, 1, 98, 122, 60, 15, 2, 135, 141, 82, 24, 3, 149, 198, 106, 32, 5, 199, 231, 144, 45, 8, 224, 309, 187, 61, 10, 1
Offset: 1

Views

Author

Emeric Deutsch, Feb 13 2016

Keywords

Comments

T(n,k) = number of partitions of n having k singleton parts other than the largest part. Example: T(5,1) = 3 because we have [4,1'], [3,2'], [2,2,1'] (the counted singletons are marked). These partitions are connected by conjugation to those in the definition.
From Gus Wiseman, Jul 10 2025: (Start)
Also the number of integer partitions of n with k maximal subsequences of consecutive parts not decreasing by 1 (anti-runs). For example, row n = 8 counts partitions with the following anti-runs:
((8)) ((3,3),(2)) ((3),(2,2),(1))
((4,4)) ((4),(3,1)) ((3),(2),(1,1,1))
((5,3)) ((5,2),(1))
((6,2)) ((4,2),(1,1))
((7,1)) ((2,2,2),(1,1))
((4,2,2)) ((2,2),(1,1,1,1))
((6,1,1)) ((2),(1,1,1,1,1,1))
((2,2,2,2))
((3,3,1,1))
((5,1,1,1))
((4,1,1,1,1))
((3,1,1,1,1,1))
((1,1,1,1,1,1,1,1))
(End)

Examples

			T(5,1) = 3 because we have [3,2], [2,2,1], and [2,1,1,1].
T(9,2) = 4 because we have [3,2',1,1,1,1'], [3,2,2',1,1'], [3,3,2',1'], and [4,3',2'] (the i's are marked).
Triangle starts:
  1;
  2;
  2,1;
  4,1;
  4,3;
  8,2,1;
  8,6,1;
From _Gus Wiseman_, Jul 11 2025: (Start)
Row n = 8 counts the following partitions by number of singleton parts other than the largest part:
  (8)                (5,3)        (4,3,1)
  (4,4)              (6,2)        (5,2,1)
  (4,2,2)            (7,1)
  (6,1,1)            (3,3,2)
  (2,2,2,2)          (3,2,2,1)
  (3,3,1,1)          (4,2,1,1)
  (5,1,1,1)          (3,2,1,1,1)
  (2,2,2,1,1)
  (4,1,1,1,1)
  (2,2,1,1,1,1)
  (3,1,1,1,1,1)
  (2,1,1,1,1,1,1)
  (1,1,1,1,1,1,1,1)
(End)
		

Crossrefs

Row sums are A000041.
Row lengths are A003056.
For distinct parts instead of anti-runs we have A116608.
Column k = 1 is A116931.
For runs instead of anti-runs we have A384881.
The strict case is A384905.
The corresponding rank statistic is A356228, non-strict version A384906.
The proper case is A385814, runs A385815.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.

Programs

  • Maple
    g := add(x^j*mul(1+t*x^i+x^(2*i)/(1-x^i), i = 1 .. j-1)/(1-x^j), j = 1 .. 80): gser := simplify(series(g, x = 0, 27)): for n from 0 to 25 do P[n] := sort(coeff(gser, x, n)) end do: for n to 25 do seq(coeff(P[n], t, k), k = 0 .. degree(P[n])) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i, t) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, add(b(n-i*j, i-1, t or j>0)*
          `if`(t and j=1, x, 1), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, false)):
    seq(T(n), n=1..20);  # Alois P. Heinz, Feb 13 2016
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1, t || j > 0]*If[t && j == 1, x, 1], {j, 0, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n, False]]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Dec 21 2016, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],Length[Split[#,#1!=#2+1&]]==k&]],{n,0,10},{k,0,n}] (* Delete zeros for A268193. Gus Wiseman, Jul 10 2025 *)

Formula

T(n,0) = A116931(n).
Sum_{k>=1} T(n, k) = A000041(n) (the partition numbers).
Sum_{k>=1} k*T(n,k) = A024786(n-1).
G.f.: G(t,x) = Sum_{j>=1} ((x^j/(1-x^j))*Product_{i=1..j-1} (1 + tx^i + x^{2i}/(1-x^i))).

A116674 Triangle read by rows: T(n,k) is the number of partitions of n into odd parts and having exactly k distinct parts (n>=1, k>=1).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 3, 1, 5, 3, 4, 1, 2, 7, 1, 2, 8, 2, 2, 10, 3, 2, 11, 5, 2, 13, 7, 4, 12, 11, 1, 19, 11, 1, 2, 18, 17, 1, 3, 20, 21, 2, 2, 22, 27, 3, 2, 25, 32, 5, 4, 24, 41, 7, 2, 30, 46, 11, 2, 31, 56, 15, 2, 36, 62, 22, 3, 33, 80, 25, 1, 2, 39, 87, 36, 1, 4, 38, 103, 45, 2, 2, 45
Offset: 1

Views

Author

Emeric Deutsch, Feb 22 2006

Keywords

Comments

Row n has floor(sqrt(n)) terms. Row sums yield A000009. T(n,1)=A001227(n) (n>=1). Sum(k*T(n,k),k>=1)=A038348(n-1) (n>=1).
Conjecture: Also the number of strict integer partitions of n with k maximal runs of consecutive parts decreasing by 1. - Gus Wiseman, Jun 24 2025

Examples

			From _Gus Wiseman_, Jun 24 2025: (Start)
Triangle begins:
   1:  1
   2:  1
   3:  2
   4:  1  1
   5:  2  1
   6:  2  2
   7:  2  3
   8:  1  5
   9:  3  4  1
  10:  2  7  1
  11:  2  8  2
  12:  2 10  3
  13:  2 11  5
  14:  2 13  7
  15:  4 12 11
  16:  1 19 11  1
  17:  2 18 17  1
  18:  3 20 21  2
  19:  2 22 27  3
  20:  2 25 32  5
Row n = 9 counts the following partitions into odd parts by number of distinct parts:
  (9)                  (7,1,1)          (5,3,1)
  (3,3,3)              (3,3,1,1,1)
  (1,1,1,1,1,1,1,1,1)  (5,1,1,1,1)
                       (3,1,1,1,1,1,1)
Row n = 9 counts the following strict partitions by number of maximal runs:
  (9)      (6,3)    (5,3,1)
  (5,4)    (7,2)
  (4,3,2)  (8,1)
           (6,2,1)
(End)
		

Crossrefs

Row sums are A000009, strict case of A000041.
Row lengths are A000196.
Leading terms are A001227.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat partitions, ranks A066311 or A073491.
A047993 counts partitions with max part = length.
A152140 counts partitions into odd parts by length.
A268193 counts partitions by number of maximal anti-runs, strict A384905.
A384881 counts partitions by number of maximal runs.

Programs

  • Maple
    g:=product(1+t*x^(2*j-1)/(1-x^(2*j-1)),j=1..35): gser:=simplify(series(g,x=0,34)): for n from 1 to 29 do P[n]:=coeff(gser,x^n) od: for n from 1 to 29 do seq(coeff(P[n],t,j),j=1..floor(sqrt(n))) od; # yields sequence in triangular form
    # second Maple program:
    with(numtheory):
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, add(b(n-i*j, i-2)*`if`(j=0, 1, x), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(
             b(n, iquo(n+1, 2)*2-1)):
    seq(T(n), n=1..30);  # Alois P. Heinz, Mar 08 2015
  • Mathematica
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i<1, 0, Sum[b[n-i*j, i-2]*If[j == 0, 1, x], {j, 0, n/i}]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][b[n, Quotient[n+1, 2]*2-1]]; Table[T[n], {n, 1, 30}] // Flatten (* Jean-François Alcover, May 22 2015, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],OddQ[Times@@#]&&Length[Union[#]]==k&]],{n,1,12},{k,1,Floor[Sqrt[n]]}] (*  Gus Wiseman, Jun 24 2025 *)

Formula

G.f.: product(1+tx^(2j-1)/(1-x^(2j-1)), j=1..infinity).

A374761 Number of integer compositions of n whose leaders of strictly decreasing runs are distinct.

Original entry on oeis.org

1, 1, 1, 3, 5, 7, 13, 27, 45, 73, 117, 205, 365, 631, 1061, 1711, 2777, 4599, 7657, 12855, 21409, 35059, 56721, 91149, 146161, 234981, 379277, 612825, 988781, 1587635, 2533029, 4017951, 6342853, 9985087, 15699577, 24679859, 38803005, 60979839, 95698257, 149836255
Offset: 0

Views

Author

Gus Wiseman, Jul 29 2024

Keywords

Comments

The leaders of strictly decreasing runs in a sequence are obtained by splitting it into maximal strictly decreasing subsequences and taking the first term of each.

Examples

			The composition (3,1,4,3,2,1,2,8) has strictly decreasing runs ((3,1),(4,3,2,1),(2),(8)), with leaders (3,4,2,8), so is counted under a(24).
The a(0) = 1 through a(6) = 13 compositions:
  ()  (1)  (2)  (3)   (4)    (5)    (6)
                (12)  (13)   (14)   (15)
                (21)  (31)   (23)   (24)
                      (121)  (32)   (42)
                      (211)  (41)   (51)
                             (131)  (123)
                             (311)  (132)
                                    (141)
                                    (213)
                                    (231)
                                    (312)
                                    (321)
                                    (411)
		

Crossrefs

For leaders of identical runs we have A274174, ranked by A374249.
The weak opposite version is A374632, ranks A374768.
The opposite version is A374687, ranks A374698.
For identical instead of distinct leaders we have A374760, ranks A374759.
The weak version is A374743, ranks A374701.
Ranked by A374767.
For partitions instead of compositions we have A375133.
Other types of runs:
- For leaders of identical runs we have A000005 for n > 0, ranks A272919.
- For leaders of anti-runs we have A374518, ranked by A374638.
Other types of run-leaders:
- For strictly increasing leaders we have A374762.
- For strictly decreasing leaders we have A374763.
- For weakly increasing leaders we have A374764.
- For weakly decreasing leaders we have A374765.
A003242 counts anti-run compositions, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A373949 counts compositions by run-compressed sum, opposite A373951.
A374700 counts compositions by sum of leaders of strictly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join @@ Permutations/@IntegerPartitions[n],UnsameQ@@First/@Split[#,Greater]&]],{n,0,15}]
  • PARI
    dfs(m, r, v) = 1 + sum(s=r, m, if(!setsearch(v, s), dfs(m-s, s, setunion(v, [s]))*x^s + sum(t=1, min(s-1, m-s), dfs(m-s-t, t, setunion(v, [s]))*x^(s+t)*prod(i=t+1, s-1, 1+x^i))));
    lista(nn) = Vec(dfs(nn, 1, []) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025
Showing 1-10 of 102 results. Next