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 10 results.

A000009 Expansion of Product_{m >= 1} (1 + x^m); number of partitions of n into distinct parts; number of partitions of n into odd parts.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18, 22, 27, 32, 38, 46, 54, 64, 76, 89, 104, 122, 142, 165, 192, 222, 256, 296, 340, 390, 448, 512, 585, 668, 760, 864, 982, 1113, 1260, 1426, 1610, 1816, 2048, 2304, 2590, 2910, 3264, 3658, 4097, 4582, 5120, 5718, 6378
Offset: 0

Views

Author

Keywords

Comments

Partitions into distinct parts are sometimes called "strict partitions".
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
The result that number of partitions of n into distinct parts = number of partitions of n into odd parts is due to Euler.
Bijection: given n = L1* 1 + L2*3 + L3*5 + L7*7 + ..., a partition into odd parts, write each Li in binary, Li = 2^a1 + 2^a2 + 2^a3 + ... where the aj's are all different, then expand n = (2^a1 * 1 + ...)*1 + ... by removing the brackets and we get a partition into distinct parts. For the reverse operation, just keep splitting any even number into halves until no evens remain.
Euler transform of period 2 sequence [1,0,1,0,...]. - Michael Somos, Dec 16 2002
Number of different partial sums 1+[1,2]+[1,3]+[1,4]+..., where [1,x] indicates a choice. E.g., a(6)=4, as we can write 1+1+1+1+1+1, 1+2+3, 1+2+1+1+1, 1+1+3+1. - Jon Perry, Dec 31 2003
a(n) is the sum of the number of partitions of x_j into at most j parts, where j is the index for the j-th triangular number and n-T(j)=x_j. For example; a(12)=partitions into <= 4 parts of 12-T(4)=2 + partitions into <= 3 parts of 12-T(3)=6 + partitions into <= 2 parts of 12-T(2)=9 + partitions into 1 part of 12-T(1)=11 = (2)(11) + (6)(51)(42)(411)(33)(321)(222) + (9)(81)(72)(63)(54)+(11) = 2+7+5+1 = 15. - Jon Perry, Jan 13 2004
Number of partitions of n where if k is the largest part, all parts 1..k are present. - Jon Perry, Sep 21 2005
Jack Grahl and Franklin T. Adams-Watters prove this claim of Jon Perry's by observing that the Ferrers dual of a "gapless" partition is guaranteed to have distinct parts; since the Ferrers dual is an involution, this establishes a bijection between the two sets of partitions. - Allan C. Wechsler, Sep 28 2021
The number of connected threshold graphs having n edges. - Michael D. Barrus (mbarrus2(AT)uiuc.edu), Jul 12 2007
Starting with offset 1 = row sums of triangle A146061 and the INVERT transform of A000700 starting: (1, 0, 1, -1, 1, -1, 1, -2, 2, -2, 2, -3, 3, -3, 4, -5, ...). - Gary W. Adamson, Oct 26 2008
Number of partitions of n in which the largest part occurs an odd number of times and all other parts occur an even number of times. (Such partitions are the duals of the partitions with odd parts.) - David Wasserman, Mar 04 2009
Equals A035363 convolved with A010054. The convolution square of A000009 = A022567 = A000041 convolved with A010054. A000041 = A000009 convolved with A035363. - Gary W. Adamson, Jun 11 2009
Considering all partitions of n into distinct parts: there are A140207(n) partitions of maximal size which is A003056(n), and A051162(n) is the greatest number occurring in these partitions. - Reinhard Zumkeller, Jun 13 2009
Equals left border of triangle A091602 starting with offset 1. - Gary W. Adamson, Mar 13 2010
Number of symmetric unimodal compositions of n+1 where the maximal part appears once. Also number of symmetric unimodal compositions of n where the maximal part appears an odd number of times. - Joerg Arndt, Jun 11 2013
Because for these partitions the exponents of the parts 1, 2, ... are either 0 or 1 (j^0 meaning that part j is absent) one could call these partitions also 'fermionic partitions'. The parts are the levels, that is the positive integers, and the occupation number is either 0 or 1 (like Pauli's exclusion principle). The 'fermionic states' are denoted by these partitions of n. - Wolfdieter Lang, May 14 2014
The set of partitions containing only odd parts forms a monoid under the product described in comments to A047993. - Richard Locke Peterson, Aug 16 2018
Ewell (1973) gives a number of recurrences. - N. J. A. Sloane, Jan 14 2020
a(n) equals the number of permutations p of the set {1,2,...,n+1}, written in one line notation as p = p_1p_2...p_(n+1), satisfying p_(i+1) - p_i <= 1 for 1 <= i <= n, (i.e., those permutations that, when read from left to right, never increase by more than 1) whose major index maj(p) := Sum_{p_i > p_(i+1)} i equals n. For example, of the 16 permutations on 5 letters satisfying p_(i+1) - p_i <= 1, 1 <= i <= 4, there are exactly two permutations whose major index is 4, namely, 5 3 4 1 2 and 2 3 4 5 1. Hence a(4) = 2. See the Bala link in A007318 for a proof. - Peter Bala, Mar 30 2022
Conjecture: Each positive integer n can be written as a_1 + ... + a_k, where a_1,...,a_k are strict partition numbers (i.e., terms of the current sequence) with no one dividing another. This has been verified for n = 1..1350. - Zhi-Wei Sun, Apr 14 2023
Conjecture: For each integer n > 7, a(n) divides none of p(n), p(n) - 1 and p(n) + 1, where p(n) is the number of partitions of n given by A000041. This has been verified for n up to 10^5. - Zhi-Wei Sun, May 20 2023 [Verified for n <= 2*10^6. - Vaclav Kotesovec, May 23 2023]
The g.f. Product_{k >= 0} 1 + x^k = Product_{k >= 0} 1 - x^k + 2*x^k == Product_{k >= 0} 1 - x^k == Sum_{k in Z} (-1)^k*x^(k*(3*k-1)/2) (mod 2) by Euler's pentagonal number theorem. It follows that a(n) is odd iff n = k*(3*k - 1)/2 for some integer k, i.e., iff n is a generalized pentagonal number A001318. - Peter Bala, Jan 07 2025

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 4*x^6 + 5*x^7 + 6*x^8 + 8*x^9 + ...
G.f. = q + q^25 + q^49 + 2*q^73 + 2*q^97 + 3*q^121 + 4*q^145 + 5*q^169 + ...
The partitions of n into distinct parts (see A118457) for small n are:
  1: 1
  2: 2
  3: 3, 21
  4: 4, 31
  5: 5, 41, 32
  6: 6, 51, 42, 321
  7: 7, 61, 52, 43, 421
  8: 8, 71, 62, 53, 521, 431
  ...
From _Reinhard Zumkeller_, Jun 13 2009: (Start)
a(8)=6, A140207(8)=#{5+2+1,4+3+1}=2, A003056(8)=3, A051162(8)=5;
a(9)=8, A140207(9)=#{6+2+1,5+3+1,4+3+2}=3, A003056(9)=3, A051162(9)=6;
a(10)=10, A140207(10)=#{4+3+2+1}=1, A003056(10)=4, A051162(10)=4. (End)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education, Vol. 31, No. 1, pp. 24-28, Winter 1997. MathEduc Database (Zentralblatt MATH, 1997c.01891).
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17. Zentralblatt MATH, Zbl 1071.05501.
  • George E. Andrews, The Theory of Partitions, Cambridge University Press, 1998, p. 19.
  • George E. Andrews, Number Theory, Dover Publications, 1994, Theorem 12-3, pp. 154-5, and (13-1-1) p. 163.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; see p. 196.
  • T. J. I'a. Bromwich, Introduction to the Theory of Infinite Series, Macmillan, 2nd. ed. 1949, p. 116, Problem 18.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 99.
  • William Dunham, The Mathematical Universe, pp. 57-62, J. Wiley, 1994.
  • Leonhard Euler, De partitione numerorum, Novi commentarii academiae scientiarum Petropolitanae 3 (1750/1), 1753, reprinted in: Commentationes Arithmeticae. (Opera Omnia. Series Prima: Opera Mathematica, Volumen Secundum), 1915, Lipsiae et Berolini, 254-294.
  • Ian P. Goulden and David M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, (2.5.1).
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 86.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 277, Theorems 344, 346.
  • Carlos J. Moreno and Samuel S. Wagstaff, Jr., Sums of Squares of Integers, Chapman and Hall, 2006, p. 253.
  • Srinivasa Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962. See Table V on page 309.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 288-290.

Crossrefs

Apart from the first term, equals A052839-1. The rows of A053632 converge to this sequence. When reduced modulo 2 equals the absolute values of A010815. The positions of odd terms given by A001318.
a(n) = Sum_{n=1..m} A097306(n, m), row sums of triangle of number of partitions of n into m odd parts.
Cf. A001318, A000041, A000700, A003724, A004111, A007837, A010815, A035294, A068049, A078408, A081360, A088670, A109950, A109968, A132312, A146061, A035363, A010054, A057077, A089806, A091602, A237515, A118457 (the partitions), A118459 (partition lengths), A015723 (total number of parts), A230957 (boustrophedon transform).
Cf. A167377 (complement).
Cf. A067659 (odd number of parts), A067661 (even number of parts).
Number of r-regular partitions for r = 2 through 12: A000009, A000726, A001935, A035959, A219601, A035985, A261775, A104502, A261776, A328545, A328546.

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a000009 n = a000009_list !! n
    a000009_list = map (pM 1) [0..] where
       pM = memo2 integral integral p
       p _ 0 = 1
       p k m | m < k     = 0
             | otherwise = pM (k + 1) (m - k) + pM (k + 1) m
    -- Reinhard Zumkeller, Sep 09 2015, Nov 05 2013
    
  • Julia
    # uses A010815
    using Memoize
    @memoize function A000009(n)
        n == 0 && return 1
        s = sum((-1)^k*A000009(n - k^2) for k in 1:isqrt(n))
        A010815(n) - 2*s
    end # Peter Luschny, Sep 09 2021
  • Magma
    Coefficients(&*[1+x^m:m in [1..100]])[1..100] where x is PolynomialRing(Integers()).1; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Maple
    N := 100; t1 := series(mul(1+x^k,k=1..N),x,N); A000009 := proc(n) coeff(t1,x,n); end;
    spec := [ P, {P=PowerSet(N), N=Sequence(Z,card>=1)} ]: [ seq(combstruct[count](spec, size=n), n=0..58) ];
    spec := [ P, {P=PowerSet(N), N=Sequence(Z,card>=1)} ]: combstruct[allstructs](spec, size=10); # to get the actual partitions for n=10
    A000009 := proc(n)
        local x,m;
        product(1+x^m,m=1..n+1) ;
        expand(%) ;
        coeff(%,x,n) ;
    end proc: # R. J. Mathar, Jun 18 2016
    lim := 99; # Enlarge if more terms are needed.
    simplify(expand(QDifferenceEquations:-QPochhammer(-1, x, lim)/2, x)):
    seq(coeff(%, x, n), n=0..55); # Peter Luschny, Nov 17 2016
    # Alternative:
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(
         `if`(d::odd, d, 0), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    seq(a(n), n=0..55);  # Alois P. Heinz, Jun 24 2025
  • Mathematica
    PartitionsQ[Range[0, 60]] (* Harvey Dale, Jul 27 2009 *)
    a[ n_] := SeriesCoefficient[ Product[ 1 + x^k, {k, n}], {x, 0, n}]; (* Michael Somos, Jul 06 2011 *)
    a[ n_] := SeriesCoefficient[ 1 / Product[ 1 - x^k, {k, 1, n, 2}], {x, 0, n}]; (* Michael Somos, Jul 06 2011 *)
    a[ n_] := With[ {t = Log[q] / (2 Pi I)}, SeriesCoefficient[ q^(-1/24) DedekindEta[2 t] / DedekindEta[ t], {q, 0, n}]]; (* Michael Somos, Jul 06 2011 *)
    a[ n_] := SeriesCoefficient[ 1 / QPochhammer[ x, x^2], {x, 0, n}]; (* Michael Somos, May 24 2013 *)
    a[ n_] := SeriesCoefficient[ Series[ QHypergeometricPFQ[ {q}, {q x}, q, - q x], {q, 0, n}] /. x -> 1, {q, 0, n}]; (* Michael Somos, Mar 04 2014 *)
    a[ n_] := SeriesCoefficient[ QHypergeometricPFQ[{}, {}, q, -1] / 2, {q, 0, n}]; (* Michael Somos, Mar 04 2014 *)
    nmax = 60; CoefficientList[Series[Exp[Sum[(-1)^(k+1)/k*x^k/(1-x^k), {k, 1, nmax}]], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 25 2015 *)
    nmax = 100; poly = ConstantArray[0, nmax + 1]; poly[[1]] = 1; poly[[2]] = 1; Do[Do[poly[[j + 1]] += poly[[j - k + 1]], {j, nmax, k, -1}];, {k, 2, nmax}]; poly (* Vaclav Kotesovec, Jan 14 2017 *)
  • Maxima
    num_distinct_partitions(60,list); /* Emanuele Munarini, Feb 24 2014 */
    
  • Maxima
    h(n):=if oddp(n)=true then 1 else 0;
    S(n,m):=if n=0 then 1 else if nVladimir Kruchinin, Sep 07 2014 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod( k=1, n, 1 + x^k, 1 + x * O(x^n)), n))}; /* Michael Somos, Nov 17 1999 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A) / eta(x + A), n))};
    
  • PARI
    {a(n) = my(c); forpart(p=n, if( n<1 || p[1]<2, c++; for(i=1, #p-1, if( p[i+1] > p[i]+1, c--; break)))); c}; /* Michael Somos, Aug 13 2017 */
    
  • PARI
    lista(nn) = {q='q+O('q^nn); Vec(eta(q^2)/eta(q))} \\ Altug Alkan, Mar 20 2018
    
  • Python
    # uses A010815
    from functools import lru_cache
    from math import isqrt
    @lru_cache(maxsize=None)
    def A000009(n): return 1 if n == 0 else A010815(n)+2*sum((-1)**(k+1)*A000009(n-k**2) for k in range(1,isqrt(n)+1)) # Chai Wah Wu, Sep 08 2021
    
  • Python
    import numpy as np
    n = 1000
    arr = np.zeros(n,dtype=object)
    arr[0] = 1
    for i in range(1,n):
        arr[i:] += arr[:n-i]
    print(arr) # Yigit Oktar, Jul 12 2025
    
  • SageMath
    # uses[EulerTransform from A166861]
    a = BinaryRecurrenceSequence(0, 1)
    b = EulerTransform(a)
    print([b(n) for n in range(56)]) # Peter Luschny, Nov 11 2020
    

Formula

G.f.: Product_{m>=1} (1 + x^m) = 1/Product_{m>=0} (1-x^(2m+1)) = Sum_{k>=0} Product_{i=1..k} x^i/(1-x^i) = Sum_{n>=0} x^(n*(n+1)/2) / Product_{k=1..n} (1-x^k).
G.f.: Sum_{n>=0} x^n*Product_{k=1..n-1} (1+x^k) = 1 + Sum_{n>=1} x^n*Product_{k>=n+1} (1+x^k). - Joerg Arndt, Jan 29 2011
Product_{k>=1} (1+x^(2k)) = Sum_{k>=0} x^(k*(k+1))/Product_{i=1..k} (1-x^(2i)) - Euler (Hardy and Wright, Theorem 346).
Asymptotics: a(n) ~ exp(Pi l_n / sqrt(3)) / ( 4 3^(1/4) l_n^(3/2) ) where l_n = (n-1/24)^(1/2) (Ayoub).
For n > 1, a(n) = (1/n)*Sum_{k=1..n} b(k)*a(n-k), with a(0)=1, b(n) = A000593(n) = sum of odd divisors of n; cf. A000700. - Vladeta Jovovic, Jan 21 2002
a(n) = t(n, 0), t as defined in A079211.
a(n) = Sum_{k=0..n-1} A117195(n,k) = A117192(n) + A117193(n) for n>0. - Reinhard Zumkeller, Mar 03 2006
a(n) = A026837(n) + A026838(n) = A118301(n) + A118302(n); a(A001318(n)) = A051044(n); a(A090864(n)) = A118303(n). - Reinhard Zumkeller, Apr 22 2006
Expansion of 1 / chi(-x) = chi(x) / chi(-x^2) = f(-x) / phi(x) = f(x) / phi(-x^2) = psi(x) / f(-x^2) = f(-x^2) / f(-x) = f(-x^4) / psi(-x) in powers of x where phi(), psi(), chi(), f() are Ramanujan theta functions. - Michael Somos, Mar 12 2011
G.f. is a period 1 Fourier series which satisfies f(-1 / (1152 t)) = 2^(-1/2) / f(t) where q = exp(2 Pi i t). - Michael Somos, Aug 16 2007
Expansion of q^(-1/24) * eta(q^2) / eta(q) in powers of q.
Expansion of q^(-1/24) 2^(-1/2) f2(t) in powers of q = exp(2 Pi i t) where f2() is a Weber function. - Michael Somos, Oct 18 2007
Given g.f. A(x), then B(x) = x * A(x^3)^8 satisfies 0 = f(B(x), B(x^2)) where f(u, v) = v - u^2 + 16*u*v^2 . - Michael Somos, May 31 2005
Given g.f. A(x), then B(x) = x * A(x^8)^3 satisfies 0 = f(B(x), B(x^3)) where f(u, v) = (u^3 - v) * (u + v^3) - 9 * u^3 * v^3. - Michael Somos, Mar 25 2008
From Evangelos Georgiadis, Andrew V. Sutherland, Kiran S. Kedlaya (egeorg(AT)mit.edu), Mar 03 2009: (Start)
a(0)=1; a(n) = 2*(Sum_{k=1..floor(sqrt(n))} (-1)^(k+1) a(n-k^2)) + sigma(n) where sigma(n) = (-1)^j if (n=(j*(3*j+1))/2 OR n=(j*(3*j-1))/2) otherwise sigma(n)=0 (simpler: sigma = A010815). (End)
From Gary W. Adamson, Jun 13 2009: (Start)
The product g.f. = (1/(1-x))*(1/(1-x^3))*(1/(1-x^5))*...; = (1,1,1,...)*
(1,0,0,1,0,0,1,0,0,1,...)*(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,...) * ...; =
a*b*c*... where a, a*b, a*b*c, ... converge to A000009:
1, 1, 1, 2, 2, 2, 3, 3, 3, 4, ... = a*b
1, 1, 1, 2, 2, 3, 4, 4, 5, 6, ... = a*b*c
1, 1, 1, 2, 2, 3, 4, 5, 6, 7, ... = a*b*c*d
1, 1, 1, 2, 2, 3, 4, 5, 6, 8, ... = a*b*c*d*e
1, 1, 1, 2, 2, 3, 4, 5, 6, 8, ... = a*b*c*d*e*f
... (cf. analogous example in A000041). (End)
a(A004526(n)) = A172033(n). - Reinhard Zumkeller, Jan 23 2010
a(n) = P(n) - P(n-2) - P(n-4) + P(n-10) + P(n-14) + ... + (-1)^m P(n-2p_m) + ..., where P(n) is the partition function (A000041) and p_m = m(3m-1)/2 is the m-th generalized pentagonal number (A001318). - Jerome Malenfant, Feb 16 2011
a(n) = A054242(n,0) = A201377(n,0). - Reinhard Zumkeller, Dec 02 2011
More precise asymptotics: a(n) ~ exp(Pi*sqrt((n-1/24)/3)) / (4*3^(1/4)*(n-1/24)^(3/4)) * (1 + (Pi^2-27)/(24*Pi*sqrt(3*(n-1/24))) + (Pi^4-270*Pi^2-1215)/(3456*Pi^2*(n-1/24))). - Vaclav Kotesovec, Nov 30 2015
a(n) = A067661(n) + A067659(n). Wolfdieter Lang, Jan 18 2016
From Vaclav Kotesovec, May 29 2016: (Start)
a(n) ~ exp(Pi*sqrt(n/3))/(4*3^(1/4)*n^(3/4)) * (1 + (Pi/(48*sqrt(3)) - (3*sqrt(3))/(8*Pi))/sqrt(n) + (Pi^2/13824 - 5/128 - 45/(128*Pi^2))/n).
a(n) ~ exp(Pi*sqrt(n/3) + (Pi/(48*sqrt(3)) - 3*sqrt(3)/(8*Pi))/sqrt(n) - (1/32 + 9/(16*Pi^2))/n) / (4*3^(1/4)*n^(3/4)).
(End)
a(n) = A089806(n)*A010815(floor(n/2)) + a(n-1) + a(n-2) - a(n-5) - a(n-7) + a(n-12) + ... + A057077(m-1)*a(n-A001318(m)) + ..., where n > A001318(m). - Gevorg Hmayakyan, Jul 07 2016
a(n) ~ Pi*BesselI(1, Pi*sqrt((n+1/24)/3)) / sqrt(24*n+1). - Vaclav Kotesovec, Nov 08 2016
a(n) = A000041(n) - A047967(n). - R. J. Mathar, Nov 20 2017
Sum_{n>=1} 1/a(n) = A237515. - Amiram Eldar, Nov 15 2020
From Peter Bala, Jan 15 2021: (Start)
G.f.: (1 + x)*Sum_{n >= 0} x^(n*(n+3)/2)/Product_{k = 1..n} (1 - x^k) =
(1 + x)*(1 + x^2)*Sum_{n >= 0} x^(n*(n+5)/2)/Product_{k = 1..n} (1 - x^k) = (1 + x)*(1 + x^2)*(1 + x^3)*Sum_{n >= 0} x^(n*(n+7)/2)/Product_{k = 1..n} (1 - x^k) = ....
G.f.: (1/2)*Sum_{n >= 0} x^(n*(n-1)/2)/Product_{k = 1..n} (1 - x^k) =
(1/2)*(1/(1 + x))*Sum_{n >= 0} x^((n-1)*(n-2)/2)/Product_{k = 1..n} (1 - x^k) = (1/2)*(1/((1 + x)*(1 + x^2)))*Sum_{n >= 0} x^((n-2)*(n-3)/2)/Product_{k = 1..n} (1 - x^k) = ....
G.f.: Sum_{n >= 0} x^n/Product_{k = 1..n} (1 - x^(2*k)) = (1/(1 - x)) * Sum_{n >= 0} x^(3*n)/Product_{k = 1..n} (1 - x^(2*k)) = (1/((1 - x)*(1 - x^3))) * Sum_{n >= 0} x^(5*n)/Product_{k = 1..n} (1 - x^(2*k)) = (1/((1 - x)*(1 - x^3)*(1 - x^5))) * Sum_{n >= 0} x^(7*n)/Product_{k = 1..n} (1 - x^(2*k)) = .... (End)
From Peter Bala, Feb 02 2021: (Start)
G.f.: A(x) = Sum_{n >= 0} x^(n*(2*n-1))/Product_{k = 1..2*n} (1 - x^k). (Set z = x and q = x^2 in Mc Laughlin et al. (2019 ArXiv version), Section 1.3, Identity 7.)
Similarly, A(x) = Sum_{n >= 0} x^(n*(2*n+1))/Product_{k = 1..2*n+1} (1 - x^k). (End)
a(n) = A001227(n) + A238005(n) + A238006(n). - R. J. Mathar, Sep 08 2021
G.f.: A(x) = exp ( Sum_{n >= 1} x^n/(n*(1 - x^(2*n))) ) = exp ( Sum_{n >= 1} (-1)^(n+1)*x^n/(n*(1 - x^n)) ). - Peter Bala, Dec 23 2021
Sum_{n>=0} a(n)/exp(Pi*n) = exp(Pi/24)/2^(1/8) = A292820. - Simon Plouffe, May 12 2023 [Proof: Sum_{n>=0} a(n)/exp(Pi*n) = phi(exp(-2*Pi)) / phi(exp(-Pi)), where phi(q) is the Euler modular function. We have phi(exp(-2*Pi)) = exp(Pi/12) * Gamma(1/4) / (2 * Pi^(3/4)) and phi(exp(-Pi)) = exp(Pi/24) * Gamma(1/4) / (2^(7/8) * Pi^(3/4)), see formulas (14) and (13) in I. Mező, 2013. - Vaclav Kotesovec, May 12 2023]
a(2*n) = Sum_{j=1..n} p(n+j, 2*j) and a(2*n+1) = Sum_{j=1..n+1} p(n+j,2*j-1), where p(n, s) is the number of partitions of n having exactly s parts. - Gregory L. Simay, Aug 30 2023

A036469 Partial sums of A000009 (partitions into distinct parts).

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 14, 19, 25, 33, 43, 55, 70, 88, 110, 137, 169, 207, 253, 307, 371, 447, 536, 640, 762, 904, 1069, 1261, 1483, 1739, 2035, 2375, 2765, 3213, 3725, 4310, 4978, 5738, 6602, 7584, 8697, 9957, 11383, 12993, 14809, 16857, 19161, 21751, 24661
Offset: 0

Views

Author

Keywords

Comments

Also number of 1's in all partitions of n+1 into odd parts. Example: a(4)=7 because the partitions of 5 into odd parts are [5], [3,1,1], [1,1,1,1,1], having a total number of 7 1's. - Emeric Deutsch, Mar 29 2006
Convolved with A035363 = A000070. - Gary W. Adamson, Jun 09 2009
Equals row sums of triangle A166240. - Gary W. Adamson, Oct 09 2009
a(n) = if n <= 1 then A201377(1,n) else A201377(n,1). - Reinhard Zumkeller, Dec 02 2011
a(n) equals the sum of the parts of the form 2^k (k >= 0) in all partitions of n + 1 into distinct parts. Example: a(6) = 14. The partitions of 7 into distinct parts are [7], [6,1], [5,2], [4,3] and [4,2,1] having sum over parts of the form 2^k equal to 1 + 2 + 4 + 4 + 2 + 1 = 14. - Peter Bala, Dec 01 2013
Number of partitions of the (n+1)-multiset {0,...,0,1} with n 0's into distinct multisets; a(3) = 5: 0|00|1, 00|01, 000|1, 0|001, 0001. Also number of factorizations of 3*2^n into distinct factors; a(3) = 5: 2*3*4, 4*6, 3*8, 2*12, 24. - Alois P. Heinz, Jul 30 2021

Crossrefs

Cf. A035363, A000070. - Gary W. Adamson, Jun 09 2009
Cf. A166240. - Gary W. Adamson, Oct 09 2009
Column k=1 of A346520.

Programs

  • Maple
    g:=1/(1-x)/product(1-x^(2*j-1),j=1..30): gser:=series(g,x=0,50): seq(coeff(gser,x,n),n=0..46); # Emeric Deutsch, Mar 29 2006
    # second Maple program:
    b:= proc(n, i) b(n, i):= `if`(n=0, 1, `if`(i<1, 0,
           b(n, i-1)+`if`(i>n, 0, b(n-i, min(n-i, i-1)))))
        end:
    a:= proc(n) option remember; b(n, n) +`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Nov 21 2012
  • Mathematica
    CoefficientList[ Series[Product[(1 + t^i), {i, 1, Infinity}]/(1 - t), {t, 0, 46}], t] (* Geoffrey Critzer, May 16 2010 *)
    b[n_, i_] := If[n == 0, 1, If[i<1, 0, b[n, i-1]+If[i>n, 0, b[n-i, Min[n-i, i-1]]]]]; a[n_] := a[n] = b[n, n]+If[n>0, a[n-1], 0]; Table[a[n], {n, 0, 60}] // Flatten (* Jean-François Alcover, Mar 10 2014, after Alois P. Heinz *)
    Accumulate[Table[PartitionsQ[n], {n, 0, 50}]] (* Vaclav Kotesovec, Oct 26 2016 *)

Formula

G.f.: 1/[(1-x)*product(1-x^(2j-1), j=1..infinity)]. - Emeric Deutsch, Mar 29 2006
a(n) ~ 3^(1/4) * exp(Pi*sqrt(n/3)) / (2*Pi*n^(1/4)) * (1 + (18+13*Pi^2) / (48*Pi*sqrt(3*n)) + (2916 - 1404*Pi^2 + 121*Pi^4)/(13824*Pi^2*n)). - Vaclav Kotesovec, Feb 26 2015, updated Oct 26 2016
For n > 0, a(n) = A026906(n) + 1. - Vaclav Kotesovec, Oct 26 2016
Faster converging g.f.: A(x) = (1/(1 - x))*Sum_{n >= 0} x^(n*(2*n-1))/Product_{k = 1..2*n} (1 - x^k). - Peter Bala, Feb 02 2021

A054225 Triangle read by rows: row n (n>=0) gives the number of partitions of (n,0), (n-1,1), (n-2,2), ..., (0,n) respectively into sums of pairs.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 4, 3, 5, 7, 9, 7, 5, 7, 12, 16, 16, 12, 7, 11, 19, 29, 31, 29, 19, 11, 15, 30, 47, 57, 57, 47, 30, 15, 22, 45, 77, 97, 109, 97, 77, 45, 22, 30, 67, 118, 162, 189, 189, 162, 118, 67, 30, 42, 97, 181, 257, 323, 339, 323, 257, 181, 97, 42, 56, 139, 267, 401, 522, 589, 589, 522, 401, 267, 139, 56
Offset: 0

Views

Author

Marc LeBrun, Feb 04 2000

Keywords

Comments

By analogy with ordinary partitions (A000041). The empty partition gives T(0,0)=1 by definition. A054225 and A201377 give partitions of pairs into sums of distinct pairs. Parts (i,j) are "positive" in the sense that min {i,j} >= 0 and max {i,j} >0. The empty partition of (0,0) is counted as 1.
Or, triangle T(n,k) of bipartite partitions of n objects, k of which are black.
Or, number of ways to factor p^(n-k)*q^k where p and q are distinct primes.
In the paper by F. C. Auluck: "On partitions of bipartite numbers", p.74, in the formula for fixed m there should be factor 1/m!. The correct asymptotic formula is p(m, n) ~ (sqrt(6*n)/Pi)^m * exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*m!*n). - Vaclav Kotesovec, Feb 01 2016
T(n,k)=T(n,k-n) is the number of multiset partitions of the multiset {1^k, 2^(n-k)}, see example link. - Joerg Arndt, Jan 01 2024
Let R be the ring of power series in two countably infinite sets of variables x_1,y_1,x_2,y_2,... that are invariant under the diagonal action (i.e, the group S of permutations of positive integers acts by w(x_i)=x_{w(i)} and w(y_i)=y_{w(i)}). Then T(n,k) is the dimension of the (n,k)-bigraded piece of R, i.e., the bihomogeneous power series of degree n in the x-variables and k in the y-variables that are S-invariant. - Jeremy L. Martin, Nov 27 2024

Examples

			The second row (n=1) is 1,1 since (1,0) and (0,1) each have a single partition.
The third row (n=2) is 2, 2, 2 from (2,0) = (1,0)+(1,0), (1,1) = (1,0)+(0,1), (0,2) = (0,1)+(0,1).
In the fourth row (n=3), T(2,1)=4 from (2,1) = (2,0)+(0,1) = (1,0)+(1,1) = (1,0)+(1,0)+(0,1).
The triangle begins:
   1;
   1,  1;
   2,  2,  2;
   3,  4,  4,  3;
   5,  7,  9,  7,   5;
   7, 12, 16, 16,  12,  7;
  11, 19, 29, 31,  29, 19, 11;
  15, 30, 47, 57,  57, 47, 30, 15;
  22, 45, 77, 97, 109, 97, 77, 45, 22;
  ...
A further example: T(2,2) = 9:
[(2,2)],
[(2,1),(0,1)],
[(2,0),(0,2)],
[(2,0),(0,1),(0,1)],
[(1,2),(1,0)],
[(1,1),(1,1)],
[(1,1),(1,0),(0,1)],
[(1,0),(1,0),(0,2)],
[(1,0),(1,0),(0,1),(0,1)].
		

References

  • M. S. Cheema, Tables of partitions of Gaussian integers, National Institute of Sciences of India, New Delhi, 1956.
  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778. - N. J. A. Sloane, Dec 30 2018

Crossrefs

See A201376 for the same triangle formatted in a different way.
Row sums: A005380. a(2n, n): A002774. a(n, [n/2]): A091437. Cf. A060244.
The outer edges are T(n,0) = T(0,n) = A000041(n).
A054242 gives partitions into sums of distinct pairs.

Programs

  • Haskell
    see Zumkeller link.
  • Maple
    read transforms; t1 := mul( mul( 1/(1-x^(i-j)*y^j), j=0..i), i=1..11): SERIES2(t1,x,y,6);
  • Mathematica
    rows = 11; se = Series[ Product[ 1/(1-x^(n-k)*y^k), {n, 1, rows}, {k, 0, n}], {x, 0, rows}, {y, 0, rows}]; coes = CoefficientList[ se, {x, y}]; Flatten[ Table[ coes[[n-k+1, k]], {n, 1, rows+1}, {k, 1, n}]] (* Jean-François Alcover, Nov 21 2011, after g.f. *)
    p = 2; q = 3; b[n_, k_] := b[n, k] = If[n>k, 0, 1] + If[PrimeQ[n], 0, Sum[If[d>k, 0, b[n/d, d]], {d, DeleteCases[Divisors[n], 1|n]}]]; t[n_, k_] := b[p^(n-k)*q^k, p^(n-k)*q^k]; Table[t[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 13 2014, after Alois P. Heinz *)
  • PARI
    {T(n, k) = if( n<0 || k<0, 0, polcoeff( polcoeff( prod( i=1, n, prod( j=0, i, 1 / (1 - x^i * y^j), 1 + x * O(x^n))),n),k))} /* Michael Somos, Apr 19 2005 */
    

Formula

G.f.: Product_{i>=1, j=0..i} 1/(1-x^(i-j)*y^j).
Series ends ... + 7*x^5 + 12*x^4*y + 16*x^3*y^2 + 16*x^2*y^3 + 12*x*y^4 + 7*y^5 + 5*x^4 + 7*x^3*y + 9*x^2*y^2 + 7*x*y^3 + 5*y^4 + 3*x^3 + 4*x^2*y + 4*x*y^2 + 3*y^3 + 2*x^2 + 2*x*y + 2*y^2 + x + y + 1.

Extensions

Entry revised by N. J. A. Sloane, Nov 30 2011, to incorporate corrections provided by Reinhard Zumkeller, who also contributed the alternative version A201376. Once the errors were corrected, this sequence coincided with A060243, due to N. J. A. Sloane, Mar 22 2001, which included edits by Vladeta Jovovic, Mar 23 2001, and Christian G. Bower, Jan 08 2004. The two entries have now been merged.

A054242 Triangle read by rows: row n (n>=0) gives the number of partitions of (n,0), (n-1,1), (n-2,2), ..., (0,n) respectively into sums of distinct pairs.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 3, 3, 2, 2, 5, 5, 5, 2, 3, 7, 9, 9, 7, 3, 4, 10, 14, 17, 14, 10, 4, 5, 14, 21, 27, 27, 21, 14, 5, 6, 19, 31, 42, 46, 42, 31, 19, 6, 8, 25, 44, 64, 74, 74, 64, 44, 25, 8, 10, 33, 61, 93, 116, 123, 116, 93, 61, 33, 10
Offset: 0

Views

Author

Marc LeBrun, Feb 08 2000 and Jul 01 2003

Keywords

Comments

By analogy with ordinary partitions into distinct parts (A000009). The empty partition gives T(0,0)=1 by definition. A054225 and A201376 give pair partitions with repeats allowed.
Also number of partitions into pairs which are not both even.
In the paper by S. M. Luthra: "Partitions of bipartite numbers when the summands are unequal", the square table on page 370 contains an errors. In the formula (6, p. 372) for fixed m there should be factor 1/m!. The correct asymptotic formula is q(m, n) ~ (sqrt(12*n)/Pi)^m * exp(Pi*sqrt(n/3)) / (4*3^(1/4)*m!*n^(3/4)). The same error is also in article by F. C. Auluck (see A054225). - Vaclav Kotesovec, Feb 02 2016

Examples

			The second row (n=1) is 1,1 since (1,0) and (0,1) each have a single partition.
The third row (n=2) is 1, 2, 1 from (2,0), (1,1) or (1,0)+(0,1), (0,2).
In the fourth row, T(1,3)=5 from (1,3), (0,3)+(1,0), (0,2)+(1,1), (0,2)+(0,1)+(1,0), (0,1)+(1,2).
The triangle begins:
  1;
  1,  1;
  1,  2,  1;
  2,  3,  3,  2;
  2,  5,  5,  5,  2;
  3,  7,  9,  9,  7,  3;
  4, 10, 14, 17, 14, 10,  4;
  5, 14, 21, 27, 27, 21, 14,  5;
  6, 19, 31, 42, 46, 42, 31, 19,  6;
  8, 25, 44, 64, 74, 74, 64, 44, 25, 8;
  ...
		

Crossrefs

See A201377 for the same triangle formatted in a different way.
The outer diagonals are T(n,0) = T(n,n) = A000009(n).
Cf. A054225.
T(2*n,n) = A219554(n). Row sums give A219555. - Alois P. Heinz, Nov 22 2012

Programs

  • Haskell
    see Zumkeller link.
  • Mathematica
    max = 10; f[x_, y_] := Product[1 + x^n*y^k, {n, 0, max}, {k, 0, max}]/2; se = Series[f[x, y], {x, 0, max}, {y, 0, max}] ; coes = CoefficientList[ se, {x, y}]; t[n_, k_] := coes[[n-k+1, k+1]]; Flatten[ Table[ t[n, k], {n, 0, max}, {k, 0, n}]] (* Jean-François Alcover, Dec 06 2011 *)

Formula

G.f.: (1/2)*Product(1+x^i*y^j), i, j>=0.

Extensions

Entry revised by N. J. A. Sloane, Nov 30 2011, to incorporate corrections provided by Reinhard Zumkeller, who also contributed the alternative version A201377.

A219554 Number of bipartite partitions of (n,n) into distinct pairs.

Original entry on oeis.org

1, 2, 5, 17, 46, 123, 323, 809, 1966, 4660, 10792, 24447, 54344, 118681, 254991, 539852, 1127279, 2323849, 4733680, 9535079, 19005282, 37507802, 73333494, 142112402, 273092320, 520612305, 984944052, 1849920722, 3450476080, 6393203741, 11770416313, 21538246251
Offset: 0

Views

Author

Alois P. Heinz, Nov 22 2012

Keywords

Comments

Number of factorizations of p^n*q^n into distinct factors where p, q are distinct primes.
From Vaclav Kotesovec, Feb 05 2016: (Start)
Formula (15) in the article by S. M. Luthra: "Partitions of bipartite numbers when the summands are unequal", p. 376, is incorrect. The similar error is also in the article by F. C. Auluck: "On partitions of bipartite numbers" (see A002774).
The correct formula (15) is q(m, n) ~ c/(2*sqrt(3)*Pi) * exp(3*c*(m*n)^(1/3) + 3*d*(m^(2/3)/n^(1/3) + n^(2/3)/m^(1/3)) - 3*log(2)/4 + (m/n + n/m)*log(2)/12 + 3*d^2/c - 3*d^2*(m/n + n/m)/c - 2*log(m*n)/3), where m and n are of the same order, c = (3/4*Zeta(3))^(1/3), d = Zeta(2)/(12*c).
If m = n then q(m,n) = a(n).
For the asymptotic formula for fixed m see A054242.
(End)

Examples

			a(0) = 1: [].
a(1) = 2: [(1,1)], [(1,0),(0,1)].
a(2) = 5: [(2,2)], [(2,1),(0,1)], [(2,0),(0,2)], [(1,2),(1,0)], [(1,1),(1,0),(0,1)].
		

Crossrefs

Programs

  • Mathematica
    (* This program is not convenient for a large number of terms *)
    a[n_] := If[n == 0, 1, (1/2) Coefficient[Product[O[x]^(n+1) + O[y]^(n+1) + (1 + x^i y^j ), {i, 0, n}, {j, 0, n}] // Normal, (x y)^n]];
    a /@ Range[0, 31] (* Jean-François Alcover, Jun 26 2013, updated Sep 16 2019 *)
    nmax = 20; p = 1; Do[Do[p = Expand[p*(1 + x^i*y^j)]; If[i*j != 0, p = Select[p, (Exponent[#, x] <= nmax) && (Exponent[#, y] <= nmax) &]], {i, 0, nmax}], {j, 0, nmax}]; p = Select[p, Exponent[#, x] == Exponent[#, y] &]; Flatten[{1, Table[Coefficient[p, x^n*y^n]/2, {n, 1, nmax}]}] (* Vaclav Kotesovec, Jan 15 2016 *)

Formula

a(n) = [x^n*y^n] 1/2 * Product_{i,j>=0} (1+x^i*y^j).
a(n) = A054242(2*n,n) = A201377(n,n).
a(n) ~ Zeta(3)^(1/3) * exp(3^(4/3) * Zeta(3)^(1/3) * n^(2/3) / 2^(2/3) + Pi^2 * n^(1/3) / (6^(4/3) * Zeta(3)^(1/3)) - Pi^4/(1296*Zeta(3))) / (2^(9/4) * 3^(1/6) * Pi * n^(4/3)). - Vaclav Kotesovec, Jan 31 2016

A201376 Triangle read by rows: T(n,k) (0 <= k <= n) is the number of partitions of (n,k) into a sum of pairs.

Original entry on oeis.org

1, 1, 2, 2, 4, 9, 3, 7, 16, 31, 5, 12, 29, 57, 109, 7, 19, 47, 97, 189, 339, 11, 30, 77, 162, 323, 589, 1043, 15, 45, 118, 257, 522, 975, 1752, 2998, 22, 67, 181, 401, 831, 1576, 2876, 4987, 8406, 30, 97, 267, 608, 1279, 2472, 4571, 8043, 13715, 22652, 42, 139, 392, 907, 1941, 3804, 7128, 12693, 21893, 36535, 59521
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 30 2011

Keywords

Comments

By analogy with ordinary partitions (A000041). The empty partition gives T(0,0)=1 by definition. A201377 and A054225 give partitions of pairs into sums of distinct pairs.
Parts (i,j) are "positive" in the sense that min {i,j} >= 0 and max {i,j} >0. The empty partition of (0,0) is counted as 1.

Examples

			Partitions of (3,1) into positive pairs, T(3,1) = 7:
(3,1),
(3,0) + (0,1),
(2,1) + (1,0),
(2,0) + (1,1),
(2,0) + (1,0) + (0,1),
(1,1) + (1,0) + (1,0),
(1,0) + (1,0) + (1,0) + (0,1).
First ten rows of triangle:
0:                      1
1:                    1  2
2:                  2  4  9
3:                3  7  16  31
4:              5  12  29  57  109
5:            7  19  47  97  189  339
6:          11  30  77  162  323  589  1043
7:        15  45  118  257  522  975  1752  2998
8:      22  67  181  401  831  1576  2876  4987  8406
9:    30  97  267  608  1279  2472  4571  8043  13715  22652
X:  42  139  392  907  1941  3804  7128  12693  21893  36535  59521
		

Crossrefs

T(n,0) = A000041(n);
T(1,k) = A000070(k), k <= 1; T(n,1) = A000070(n), n > 1;
T(2,k) = A000291(k), k <= 2; T(n,2) = A000291(n), n > 2;
T(3,k) = A000412(k), k <= 3; T(n,3) = A000412(n), n > 3;
T(4,k) = A000465(k), k <= 4; T(n,4) = A000465(n), n > 4;
T(5,k) = A000491(k), k <= 5; T(n,5) = A000491(n), n > 5;
T(6,k) = A002755(k), k <= 6; T(n,6) = A002755(n), n > 6;
T(7,k) = A002756(k), k <= 7; T(n,7) = A002756(n), n > 7;
T(8,k) = A002757(k), k <= 8; T(n,8) = A002757(n), n > 8;
T(9,k) = A002758(k), k <= 9; T(n,9) = A002758(n), n > 9;
T(10,k) = A002759(n), k <= 10; T(n,10) = A002759(n), n > 10;
T(n,n) = A002774(n).
See A054225 for another version.

Programs

  • Haskell
    -- see link.
  • Mathematica
    max = 10; se = Series[ Sum[ Log[1 - x^(n-k)*y^k], {n, 1, 2max }, {k, 0, n}], {x, 0, 2max }, {y, 0, 2max }]; coes = CoefficientList[ Series[ Exp[-se], {x, 0, 2max }, {y, 0, 2max }], {x, y}]; t[n_, k_] := coes[[n+1, k+1]]; Flatten[ Table[ t[n, k], {n, 0, max}, {k, 0, n}]] (* Jean-François Alcover, Dec 05 2011 *)
    p = 2; q = 3; b[n_, k_] := b[n, k] = If[n > k, 0, 1] + If[PrimeQ[n], 0, Sum[If[d > k, 0, b[n/d, d]], {d, DeleteCases[Divisors[n] , 1|n]}]]; t[n_, k_] := b[p^n*q^k, p^n*q^k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 13 2014, after Alois P. Heinz *)

Formula

For references, programs and g.f. see A054225.

Extensions

Entry revised by N. J. A. Sloane, Nov 30 2011

A225561 Largest number m such that 1, 2, ..., m can be represented as the sum of distinct divisors of n.

Original entry on oeis.org

1, 3, 1, 7, 1, 12, 1, 15, 1, 3, 1, 28, 1, 3, 1, 31, 1, 39, 1, 42, 1, 3, 1, 60, 1, 3, 1, 56, 1, 72, 1, 63, 1, 3, 1, 91, 1, 3, 1, 90, 1, 96, 1, 7, 1, 3, 1, 124, 1, 3, 1, 7, 1, 120, 1, 120, 1, 3, 1, 168, 1, 3, 1, 127, 1, 144, 1, 7, 1, 3, 1, 195, 1, 3, 1, 7, 1, 168, 1, 186, 1, 3
Offset: 1

Views

Author

Keywords

Comments

n is called a practical number (A005153) if a(n) >= n.

Crossrefs

Programs

  • Haskell
    see Haskell link, 3.2.2
    a225561 n = length $ takeWhile (not . null) $
                map (ps [] $ a027750_row n) [1..] where
       ps qs _      0  = [qs]
       ps   []       = []
       ps qs (k:ks) m  =
          if m == 0 then [] else ps (k:qs) ks (m - k) ++ ps qs ks m
    -- Reinhard Zumkeller, May 11 2013
    
  • Mathematica
    a[n_] := First[Complement[Range[DivisorSigma[1, n] + 1], Total /@ Subsets[Divisors[n]]]] - 1; Array[a, 100] (* Jean-François Alcover, Sep 27 2018 *)
    f[p_, e_] := (p^(e + 1) - 1)/(p - 1); g[n_] := If[(ind = Position[(fct = FactorInteger[n])[[;; , 1]]/(1 + FoldList[Times, 1, f @@@ Most@fct]), ?(# > 1 &)]) == {}, n, Times @@ (Power @@@ fct[[1 ;; ind[[1, 1]] - 1]])]; a[n] := DivisorSigma[1, g[n]]; Array[a, 100] (* Amiram Eldar, Sep 27 2019 *)
  • PARI
    a(n)=my(d=divisors(n),t,v=vector(2^#d-1,i,t=vecextract(d,i); sum(j=1,#t,t[j]))); v=vecsort(v,,8); for(i=1,#v,if(v[i]!=i,return(i-1)));v[#v]
    
  • Python
    from sympy import divisors
    def A225561(n):
        c = {0}
        for d in divisors(n,generator=True):
            c |=  {a+d for a in c}
        k = 1
        while k in c:
            k += 1
        return k-1 # Chai Wah Wu, Jul 05 2023

Formula

a(n) = 1 if and only if n is odd. a(n) = 3 if and only if n in {2,10} mod 12. Otherwise a(n) >= 7.
a(n) = A030057(n)-1.
a(n) = A000203(A327832(n)). - Amiram Eldar, Sep 27 2019

A219557 Sum of numbers of bipartite partitions of (n,k) into distinct pairs for 0<=k<=n.

Original entry on oeis.org

1, 3, 9, 33, 96, 273, 749, 1953, 4916, 12023, 28642, 66575, 151544, 338294, 741880, 1601048, 3403936, 7137386, 14774713, 30219025, 61115184, 122300146, 242312186, 475589389, 925158391, 1784529840, 3414565313, 6483608230, 12221370425, 22876263089, 42534593868
Offset: 0

Views

Author

Alois P. Heinz, Nov 22 2012

Keywords

Examples

			a(2) = 9: [(2,0)], [(2,1)], [(2,0),(0,1)], [(1,1),(1,0)], [(2,2)], [(2,1),(0,1)], [(2,0),(0,2)], [(1,2),(1,0)], [(1,1),(1,0),(0,1)].
		

Crossrefs

Row sums of A201377.

Formula

a(n) = Sum_{k=0..n} [x^n*y^k] 1/2 * Product_{i,j>=0} (1+x^i*y^j).

A378126 Array read by antidiagonals: T(n, m) is the maximal size of partitions of (n, m) into sums of distinct pairs of nonnegative integers, excluding (0, 0).

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 3, 3, 4, 4, 4, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 4, 5, 4, 4, 4, 3, 3, 4, 5, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 5, 5, 5, 4, 4, 5, 5, 6, 6, 6, 6
Offset: 0

Views

Author

Jimin Park, Nov 17 2024

Keywords

Comments

A378379(n) is the least number x such that T(x, x) >= n, and as the growth rate of A378379(n) is Theta(n^(3/2)), the growth rate of T(n, m) is O((n+m)^(2/3)).

Examples

			Table begins:
  0 1 1 2 2 2 3 3 3 3 ...
  1 2 2 3 3 3 4 4 4 4 ...
  1 2 3 3 4 4 4 5 5 5 ...
  2 3 3 4 4 4 5 5 5 6 ...
  2 3 4 4 5 5 5 6 6 6 ...
  2 3 4 4 5 5 6 6 6 7 ...
  3 4 4 5 5 6 6 6 7 7 ...
  3 4 5 5 6 6 6 7 7 7 ...
  3 4 5 5 6 6 7 7 7 8 ...
  3 4 5 6 6 7 7 7 8 8 ...
  ...
T(9, 5) = 7, as (9, 5) can be expressed as the sum (0, 1) + (0, 2) + (1, 0) + (1, 1) + (2, 0) + (2, 1) + (3, 0), which is the longest for (9, 5).
		

Crossrefs

Maximal size among partitions considered by A054242 and A201377.
The first row is T(n, 0) = A003056(n).

Programs

  • Python
    import functools
    @functools.cache
    def A378126(n: int, m: int, t: tuple[int, int] = (0, 0)) -> int:
      if (n, m) <= t: return 0
      v = 1
      for nn in range(t[0], n//2+1):
        for nm in range(m+1):
          if (nn, nm) <= t: continue
          rn, rm = n-nn, m-nm
          if (rn, rm) <= (nn, nm): continue
          nv = 1 + A378126(rn, rm, (nn, nm))
          if nv > v: v = nv
      return v

Formula

T(n, m) = T(m, n).
T(n, m) >= T(n, 0) + T(0, m).
T(n, m) = A086435(p^n * q^m) for any distinct primes p and q.
T(n, 0) = A003056(n).
T(n, 1) = T(n, 0) + 1.
T(n, 2) = T(n-1, 0) + 2, for n >= 1.
T(n, m) = O((n+m)^(2/3)).

A378379 Minimal x such that there is a partition of (x, x) into sums of distinct pairs of nonnegative integers with size at least n, excluding (0, 0).

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 9, 10, 12, 14, 16, 18, 20, 23, 25, 28, 30, 33, 35, 38, 41, 44, 47, 50, 53, 56, 60, 63, 67, 70, 74, 77, 81, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 125, 129, 134, 138, 143, 147, 152, 156, 161, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220
Offset: 1

Views

Author

Jimin Park, Nov 24 2024

Keywords

Comments

For (n, n), there is at least one maximal partition P that's symmetric: (x, y) in P <=> (y, x) in P. This can be proven by manipulating integer sequences c(i) (i >= 1) such that 0 <= c(i) <= i+1 for all i and Sum_{i > 0} i*c(i) = 2n, which correspond to partitions P of (n, n) with size |P| = Sum_{i > 0} c(i), where c(i) is equal to number of (x, y) in P such that x+y = i.

Examples

			For n = 8, a(n) = 9, as (9, 9) can be expressed as the sum (0, 1) + (0, 2) + (0, 3) + (1, 0) + (2, 0) + (3, 0) + (1, 2) + (2, 1), but the longest sum for (8, 8) has 7 pairs.
		

Crossrefs

Maximal size among partitions considered by A054242 and A201377.
Minimal x such that A378126(x, x) >= n.
Cf. A086435.

Programs

  • Python
    import math
    def A378379(n: int) -> int:
      l = (math.isqrt(1+8*n)-1)//2 # l = A003056(n), min. possible largest pair norm
      r = n - (l-1)*(l+2)//2 # r = n - A000096(l-1), number of pairs with norm l
      return ((l-1)*l*(l+1)//3 + l*r + 1)//2 # ceil((A007290(l+1) + l*r) / 2)

Formula

a(n*(n+3)/2) = n*(n+1)*(n+2)/6.
Showing 1-10 of 10 results.