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

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

A010054 a(n) = 1 if n is a triangular number, otherwise 0.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

This is essentially the q-expansion of the Jacobi theta function theta_2(q). (In theta_2 one has to ignore the initial factor of 2*q^(1/4) and then replace q by q^(1/2). See also A005369.) - N. J. A. Sloane, Aug 03 2014
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Ramanujan's theta function f(a, b) = Sum_{n=-inf..inf} a^(n*(n+1)/2) * b^(n*(n-1)/2).
This sequence is the concatenation of the base-b digits in the sequence b^n, for any base b >= 2. - Davis Herring (herring(AT)lanl.gov), Nov 16 2004
Number of partitions of n into distinct parts such that the greatest part equals the number of all parts, see also A047993; a(n)=A117195(n,0) for n > 0; a(n) = 1-A117195(n,1) for n > 1. - Reinhard Zumkeller, Mar 03 2006
Triangle T(n,k), 0 <= k <= n, read by rows, given by A000007 DELTA A000004 where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 03 2009
Convolved with A000041 = A022567, the convolution square of A000009. - Gary W. Adamson, Jun 11 2009
A008441(n) = Sum_{k=0..n} a(k)*a(n-k). - Reinhard Zumkeller, Nov 03 2009
Polcoeff inverse with alternate signs = A006950: (1, 1, 1, 2, 3, 4, 5, 7, ...). - Gary W. Adamson, Mar 15 2010
This sequence is related to Ramanujan's two-variable theta functions because this sequence is also the characteristic function of generalized hexagonal numbers. - Omar E. Pol, Jun 08 2012
Number 3 of the 14 primitive eta-products which are holomorphic modular forms of weight 1/2 listed by D. Zagier on page 30 of "The 1-2-3 of Modular Forms". - Michael Somos, May 04 2016
Number of partitions of n into consecutive parts that contain 1 as a part, n >= 1. - Omar E. Pol, Nov 27 2020
The constant whose decimal expansion is this sequence is irrational (Mahler, 1981). The constant whose expansion in any base b >= 2 is this sequence is irrational (Bundschuh, 1984). - Amiram Eldar, Mar 23 2025

Examples

			G.f. = 1 + x + x^3 + x^6 + x^10 + x^15 + x^21 + x^28 + x^36 + x^45 + x^55 + x^66 + ...
G.f. for B(q) = q * A(q^8): q + q^9 + q^25 + q^49 + q^81 + q^121 + q^169 + q^225 + q^289 + q^361 + ...
From _Philippe Deléham_, Jan 04 2008: (Start)
As a triangle this begins:
  1;
  1, 0;
  1, 0, 0;
  1, 0, 0, 0;
  1, 0, 0, 0, 0;
  1, 0, 0, 0, 0, 0;
  ...  (End)
		

References

  • J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups, Springer-Verlag, 1999, p. 103.
  • Michael D. Hirschhorn, The Power of q, Springer, 2017. See Psi, page 9.
  • Jules Tannery and Jules Molk, Eléments de la Théorie des Fonctions Elliptiques, Vol. 2, Gauthier-Villars, Paris, 1902; Chelsea, NY, 1972, see p. 27.
  • Edmund T. Whittaker and George N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1963, p. 464.

Crossrefs

Number of ways of writing n as a sum of k triangular numbers, for k=1,...: A010054, A008441, A008443, A008438, A008439, A008440, A226252, A007331, A226253, A226254, A226255, A014787, A014809.
Cf. A106507 (reciprocal series).

Programs

  • Clojure
    (def A010054 (mapcat #(cons 1 (replicate % 0)) (range))) ; Tony Zorman, Apr 03 2023
  • Haskell
    a010054 = a010052 . (+ 1) . (* 8)
    a010054_list = concatMap (\x -> 1 : replicate x 0) [0..]
    -- Reinhard Zumkeller, Feb 12 2012, Oct 22 2011, Apr 02 2011
    
  • Magma
    Basis( ModularForms( Gamma0(16), 1/2), 362) [2] ; /* Michael Somos, Jun 10 2014 */
    
  • Maple
    A010054 := proc(n)
        if issqr(1+8*n) then
            1;
        else
            0;
        end if;
    end proc:
    seq(A010054(n),n=0..80) ; # R. J. Mathar, Feb 22 2021
  • Mathematica
    a[ n_] := SquaresR[ 1, 8 n + 1] / 2; (* Michael Somos, Nov 15 2011 *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ (Series[ EllipticTheta[ 3, Log[y] / (2 I), x^2], {x, 0, n + Floor @ Sqrt[n]}] // Normal // TrigToExp) /. {y -> x}, {x, 0, n}]]; (* Michael Somos, Nov 15 2011 *)
    Table[If[IntegerQ[(Sqrt[8n+1]-1)/2],1,0],{n,0,110}] (* Harvey P. Dale, Oct 29 2012 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, q^(1/2)] / (2 q^(1/8)), {q, 0, n}]; (* Michael Somos, Jul 01 2014 *)
    Module[{tr=Accumulate[Range[20]]},If[MemberQ[tr,#],1,0]&/@Range[Max[tr]]] (* Harvey P. Dale, Mar 13 2023 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^2 / eta(x + A), n))}; /* Michael Somos, Mar 14 2011 */
    
  • PARI
    {a(n) = issquare( 8*n + 1)}; /* Michael Somos, Apr 27 2000 */
    
  • PARI
    a(n) = ispolygonal(n, 3); \\ Michel Marcus, Jan 22 2015
    
  • Python
    from sympy import integer_nthroot
    def A010054(n): return int(integer_nthroot((n<<3)+1,2)[1]) # Chai Wah Wu, Nov 15 2022
    
  • Sage
    # uses[EulerTransform from A166861]
    b = BinaryRecurrenceSequence(-1, 0)
    a = EulerTransform(b)
    print([a(n) for n in range(88)]) # Peter Luschny, Nov 17 2022
    

Formula

Expansion of f(x, x^3) in powers of x where f(, ) is Ramanujan's general theta function.
Expansion of q^(-1) * (phi(q) - phi(q^4)) / 2 in powers of q^8. - Michael Somos, Jul 01 2014
Expansion of q^(-1/8) * eta(q^2)^2 / eta(q) in powers of q. - Michael Somos, Apr 13 2005
Euler transform of period 2 sequence [ 1, -1, ...]. - Michael Somos, Mar 24 2003
Given g.f. A(x), then B(q) = q * A(q^8) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u1*u6^3 + u2*u3^3 - u1*u2^2*u6. - Michael Somos, Apr 13 2005
a(n) = b(8*n + 1) where b()=A098108() is multiplicative with b(2^e) = 0^e, b(p^e) = (1 + (-1)^e) / 2 if p > 2. - Michael Somos, Jun 06 2005
a(n) = A005369(2*n). - Michael Somos, Apr 29 2003
G.f.: theta_2(sqrt(q)) / (2 * q^(1/8)).
G.f.: 1 / (1 - x / (1 + x / (1 + x^1 / (1 - x / (1 + x / (1 + x^2 / (1 - x / (1 + x / (1 + x^3 / ...))))))))). - Michael Somos, May 11 2012
G.f.: Product_{k>0} (1-x^(2*k))/(1-x^(2*k-1)). - Vladeta Jovovic, May 02 2002
a(0)=1; for n>0, a(n) = A002024(n+1)-A002024(n). - Benoit Cloitre, Jan 05 2004
G.f.: Sum_{j>=0} Product_{k=0..j} x^j. - Jon Perry, Mar 30 2004
a(n) = floor((1-cos(Pi*sqrt(8*n+1)))/2). - Carl R. White, Mar 18 2006
a(n) = round(sqrt(2n+1)) - round(sqrt(2n)). - Hieronymus Fischer, Aug 06 2007
a(n) = ceiling(2*sqrt(2n+1)) - floor(2*sqrt(2n)) - 1. - Hieronymus Fischer, Aug 06 2007
a(n) = f(n,0) with f(x,y) = if x > 0 then f(x-y,y+1), otherwise 0^(-x). - Reinhard Zumkeller, Sep 27 2008
a(n) = A035214(n) - 1.
From Mikael Aaltonen, Jan 22 2015: (Start)
Since the characteristic function of s-gonal numbers is given by floor(sqrt(2n/(s-2) + ((s-4)/(2s-4))^2) + (s-4)/(2s-4)) - floor(sqrt(2(n-1)/(s-2) + ((s-4)/(2s-4))^2) + (s-4)/(2s-4)), by setting s = 3 we get the following: For n > 0, a(n) = floor(sqrt(2*n+1/4)-1/2) - floor(sqrt(2*(n-1)+1/4)-1/2).
(End)
a(n) = (-1)^n * A106459(n). - Michael Somos, May 04 2016
G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 2^(-1/2) (t/i)^(1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A002448. - Michael Somos, May 05 2016
G.f.: Sum_{n >= 0} x^(n*(n+1)/2) = Product_{n >= 1} (1 - x^n)*(1 + x^n)^2 = Product_{n >= 1} (1 - x^(2*n))*(1 + x^n) = Product_{n >= 1} (1 - x^(2*n))/(1 - x^(2*n-1)). From the sum and product representations of theta_2(0, sqrt(q))/(2*q^(1/8)) function. The last product, given by Vladeta Jovovic above, is obtained from the second to last one by an Euler identity, proved via f(x) := Product_{n >= 1} (1 - x^(2*n-1))*Product_{n >= 1} (1 + x^n) = f(x^2), by moving the odd-indexed factors of the second product to the first product. This leads to f(x) = f(0) = 1. - Wolfdieter Lang, Jul 05 2016
a(0) = 1, a(n) = (1/n)*Sum_{k=1..n} A002129(k)*a(n-k) for n > 0. - Seiichi Manyama, Apr 08 2017
G.f.: Sum_{n >= 0} x^n * Product_{k >= n+1} (1 - x^(2*k)) = 1/(1 - x) * Sum_{n >= 0} x^(3*n) * Product_{k >= n+1} (1 - x^(2*k)) = 1/((1 - x)*(1 - x^3)) * Sum_{n >= 0} x^(5*n) * Product_{k >= n+1} (1 - x^(2*k)) = .... - Peter Bala, Jun 24 2025

Extensions

Additional comments from Michael Somos, Apr 27 2000

A097805 Number of compositions of n with k parts, T(n, k) = binomial(n-1, k-1) for n, k >= 1 and T(n, 0) = 0^n, triangle read by rows for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 3, 1, 0, 1, 4, 6, 4, 1, 0, 1, 5, 10, 10, 5, 1, 0, 1, 6, 15, 20, 15, 6, 1, 0, 1, 7, 21, 35, 35, 21, 7, 1, 0, 1, 8, 28, 56, 70, 56, 28, 8, 1, 0, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 0, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 0, 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1
Offset: 0

Views

Author

Paul Barry, Aug 25 2004

Keywords

Comments

Previous name was: Riordan array (1, 1/(1-x)) read by rows.
Note this Riordan array would be denoted (1, x/(1-x)) by some authors.
Columns have g.f. (x/(1-x))^k. Reverse of A071919. Row sums are A011782. Antidiagonal sums are Fibonacci(n-1). Inverse as Riordan array is (1, 1/(1+x)). A097805=B*A059260*B^(-1), where B is the binomial matrix.
(0,1)-Pascal triangle. - Philippe Deléham, Nov 21 2006
(n+1) * each term of row n generates triangle A127952: (1; 0, 2; 0, 3, 3; 0, 4, 8, 4; ...). - Gary W. Adamson, Feb 09 2007
Triangle T(n,k), 0<=k<=n, read by rows, given by [0,1,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 12 2008
From Paul Weisenhorn, Feb 09 2011: (Start)
Triangle read by rows: T(r,c) is the number of unordered partitions of n=r*(r+1)/2+c into (r+1) parts < (r+1) and at most pairs of equal parts and parts in neighboring pairs have difference 2.
Triangle read by rows: T(r,c) is the number of unordered partitions of the number n=r*(r+1)/2+(c-1) into r parts < (r+1) and at most pairs of equal parts and parts in neighboring pairs have difference 2. (End)
Triangle read by rows: T(r,c) is the number of ordered partitions (compositions) of r into c parts. - Juergen Will, Jan 04 2016
From Tom Copeland, Oct 25 2012: (Start)
Given a basis composed of a sequence of polynomials p_n(x) characterized by ladder (creation / annihilation, or raising / lowering) operators defined by R p_n(x) = p_(n+1)(x) and L p_n(x) = n p_(n-1)(x) with p_0(x)=1, giving the number operator # p_n(x) = RL p_n(x) = n p_n(x), the lower triangular padded Pascal matrix Pd (A097805) serves as a matrix representation of the operator exp(R^2*L) = exp(R#) =
1) exp(x^2D) for the set x^n and
2) D^(-1) exp(t*x)D for the set x^n/n! (see A218234).
(End)
From James East, Apr 11 2014: (Start)
Square array a(m,n) with m,n=0,1,2,... read by off-diagonals.
a(m,n) gives the number of order-preserving functions f:{1,...,m}->{1,...,n}. Order-preserving means that x
a(n,n)=A088218(n) is the size of the semigroup O_n of all order-preserving transformations of {1,...,n}.
Read as a triangle, this sequence may be obtained by augmenting Pascal's triangle by appending the column 1,0,0,0,... on the left.
(End)
A formula based on the partitions of n with largest part k is given as a Sage program below. The 'conjugate' formula leads to A048004. - Peter Luschny, Jul 13 2015
From Wolfdieter Lang, Feb 17 2017: (Start)
The transposed of this lower triangular Riordan matrix of the associated type T provides the transition matrix between the monomial basis {x^n}, n >= 0, and the basis {y^n}, n >= 0, with y = x/(1-x): x^0 = 1 = y^0, x^n = Sum_{m >= n} Ttrans(n,m) y^m, for n >= 1, with Ttrans(n,m) = binomial(m-1,n-1).
Therefore, if a transformation with this Riordan matrix from a sequence {a} to the sequence {b} is given by b(n) = Sum_{m=0..n} T(n, m)*a(m), with T(n, m) = binomial(n-1, m-1), for n >= 1, then Sum_{n >= 0} a(n)*x^n = Sum_{n >= 0} b(n)*y^n, with y = x/(1-x) and vice versa. This is a modified binomial transformation; the usual one belongs to the Pascal Riordan matrix A007318. (End)
From Gus Wiseman, Jan 23 2022: (Start)
Also the number of compositions of n with alternating sum k, with k ranging from -n to n in steps of 2. For example, row n = 6 counts the following compositions (empty column indicated by dot):
. (15) (24) (33) (42) (51) (6)
(141) (132) (123) (114)
(1113) (231) (222) (213)
(1212) (1122) (321) (312)
(1311) (1221) (1131) (411)
(2112) (2121)
(2211) (3111)
(11121) (11112)
(12111) (11211)
(111111) (21111)
The reverse-alternating version is the same. Counting compositions by all three parameters (sum, length, alternating sum) gives A345197. Compositions of 2n with alternating sum 2k with k ranging from -n + 1 to n are A034871. (End)
Also the convolution triangle of A000012. - Peter Luschny, Oct 07 2022
From Sergey Kitaev, Nov 18 2023: (Start)
Number of permutations of length n avoiding simultaneously the patterns 123 and 132 with k right-to-left maxima. A right-to-left maximum in a permutation a(1)a(2)...a(n) is position i such that a(j) < a(i) for all i < j.
Number of permutations of length n avoiding simultaneously the patterns 231 and 312 with k right-to-left minima (resp., left-to-right maxima). A right-to-left minimum (resp., left-to-right maximum) in a permutation a(1)a(2)...a(n) is position i such that a(j) > a(i) for all j > i (resp., a(j) < a(i) for all j < i).
Number of permutations of length n avoiding simultaneously the patterns 213 and 312 with k right-to-left maxima (resp., left-to-right maxima).
Number of permutations of length n avoiding simultaneously the patterns 213 and 231 with k right-to-left maxima (resp., right-to-left minima). (End)

Examples

			G.f. = 1 + x * (x + x^3 * (1 + x) + x^6 * (1 + x)^2 + x^10 * (1 + x)^3 + ...). - _Michael Somos_, Aug 20 2006
The triangle T(n, k) begins:
n\k  0 1 2  3  4   5   6  7  8 9 10 ...
0:   1
1:   0 1
2:   0 1 1
3:   0 1 2  1
4:   0 1 3  3  1
5:   0 1 4  6  4   1
6:   0 1 5 10 10   5   1
7:   0 1 6 15 20  15   6  1
8:   0 1 7 21 35  35  21  7  1
9:   0 1 8 28 56  70  56 28  8 1
10:  0 1 9 36 84 126 126 84 36 9  1
... reformatted _Wolfdieter Lang_, Jul 31 2017
From _Paul Weisenhorn_, Feb 09 2011: (Start)
T(r=5,c=3) = binomial(4,2) = 6 unordered partitions of the number n = r*(r+1)/2+c = 18 with (r+1)=6 summands: (5+5+4+2+1+1), (5+5+3+3+1+1), (5+4+4+3+1+1), (5+5+3+2+2+1), (5+4+4+2+2+1), (5+4+3+3+2+1).
T(r=5,c=3) = binomial(4,2) = 6 unordered partitions of the number n = r*(r+1)/2+(c-1) = 17 with r=5 summands: (5+5+4+2+1), (5+5+3+3+1), (5+5+3+2+2), (5+4+4+3+1), (5+4+4+2+2), (5+4+3+3+2).  (End)
From _James East_, Apr 11 2014: (Start)
a(0,0)=1 since there is a unique (order-preserving) function {}->{}.
a(m,0)=0 for m>0 since there is no function from a nonempty set to the empty set.
a(3,2)=4 because there are four order-preserving functions {1,2,3}->{1,2}: these are [1,1,1], [2,2,2], [1,1,2], [1,2,2]. Here f=[a,b,c] denotes the function defined by f(1)=a, f(2)=b, f(3)=c.
a(2,3)=6 because there are six order-preserving functions {1,2}->{1,2,3}: these are [1,1], [1,2], [1,3], [2,2], [2,3], [3,3].
(End)
		

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Part 1, Section 7.2.1.3, 2011.

Crossrefs

Case m=0 of the polynomials defined in A278073.
Cf. A000012 (diagonal), A011782 (row sums), A088218 (central terms).
The terms just left of center in odd-indexed rows are A001791, even A002054.
The odd-indexed rows are A034871.
Row sums without the center are A058622.
The unordered version is A072233, without zeros A008284.
Right half without center has row sums A027306(n-1).
Right half with center has row sums A116406(n).
Left half without center has row sums A294175(n-1).
Left half with center has row sums A058622(n-1).
A025047 counts alternating compositions.
A098124 counts balanced compositions, unordered A047993.
A106356 counts compositions by number of maximal anti-runs.
A344651 counts partitions by sum and alternating sum.
A345197 counts compositions by sum, length, and alternating sum.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
          expand(add(b(n-i*j, i-1, p+j)/j!*x^j, j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, 0)):
    seq(T(n), n=0..20);  # Alois P. Heinz, May 25 2014
    # Alternatively:
    T := proc(k,n) option remember;
    if k=n then 1 elif k=0 then 0 else
    add(T(k-1,n-i), i=1..n-k+1) fi end:
    A097805 := (n,k) -> T(k,n):
    for n from 0 to 12 do seq(A097805(n,k), k=0..n) od; # Peter Luschny, Mar 12 2016
    # Uses function PMatrix from A357368.
    PMatrix(10, n -> 1);  # Peter Luschny, Oct 07 2022
  • Mathematica
    T[0, 0] = 1; T[n_, k_] := Binomial[n-1, k-1]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 03 2014, after Paul Weisenhorn *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==k&]],{n,0,10},{k,0,n}] (* Gus Wiseman, Jan 23 2022 *)
  • PARI
    {a(n) = my(m); if( n<2, n==0, n--; m = (sqrtint(8*n + 1) - 1)\2; binomial(m-1, n - m*(m + 1)/2))}; /* Michael Somos, Aug 20 2006 */
    
  • PARI
    T(n,k) = if (k==0, 0^n, binomial(n-1, k-1)); \\ Michel Marcus, May 06 2022
    
  • PARI
    row(n) = vector(n+1, k, k--; if (k==0, 0^n, binomial(n-1, k-1))); \\ Michel Marcus, May 06 2022
    
  • Python
    from math import comb
    def T(n, k): return comb(n-1, k-1) if k != 0 else k**n  # Peter Luschny, May 06 2022
  • Sage
    # Illustrates a basic partition formula, is not efficient as a program for large n.
    def A097805_row(n):
        r = []
        for k in (0..n):
            s = 0
            for q in Partitions(n, max_part=k, inner=[k]):
                s += mul(binomial(q[j],q[j+1]) for j in range(len(q)-1))
            r.append(s)
        return r
    [A097805_row(n) for n in (0..9)] # Peter Luschny, Jul 13 2015
    

Formula

Number triangle T(n, k) defined by T(n,k) = Sum_{j=0..n} binomial(n, j)*if(k<=j, (-1)^(j-k), 0).
T(r,c) = binomial(r-1,c-1), 0 <= c <= r. - Paul Weisenhorn, Feb 09 2011
G.f.: (-1+x)/(-1+x+x*y). - R. J. Mathar, Aug 11 2015
a(0,0) = 1, a(n,k) = binomial(n-1,n-k) = binomial(n-1,k-1) Juergen Will, Jan 04 2016
G.f.: (x^1 + x^2 + x^3 + ...)^k = (x/(1-x))^k. - Juergen Will, Jan 04 2016
From Tom Copeland, Nov 15 2016: (Start)
E.g.f.: 1 + x*[e^((x+1)t)-1]/(x+1).
This padded Pascal matrix with the odd columns negated is NpdP = M*S = S^(-1)*M^(-1) = S^(-1)*M, where M(n,k) = (-1)^n A130595(n,k), the inverse Pascal matrix with the odd rows negated, S is the summation matrix A000012, the lower triangular matrix with all elements unity, and S^(-1) = A167374, a finite difference matrix. NpdP is self-inverse, i.e., (M*S)^2 = the identity matrix, and has the e.g.f. 1 - x*[e^((1-x)t)-1]/(1-x).
M = NpdP*S^(-1) follows from the well-known recursion property of the Pascal matrix, implying NpdP = M*S.
The self-inverse property of -NpdP is implied by the self-inverse relation of its embedded signed Pascal submatrix M (cf. A130595). Also see A118800 for another proof.
Let P^(-1) be A130595, the inverse Pascal matrix. Then T = A200139*P^(-1) and T^(-1) = padded P^(-1) = P*A097808*P^(-1). (End)
The center (n>0) is T(2n+1,n+1) = A000984(n) = 2*A001700(n-1) = 2*A088218(n) = A126869(2n) = 2*A138364(2n-1). - Gus Wiseman, Jan 25 2022

Extensions

Corrected by Philippe Deléham, Oct 05 2005
New name using classical terminology by Peter Luschny, Feb 05 2019

A106529 Numbers having k prime factors (counted with multiplicity), the largest of which is the k-th prime.

Original entry on oeis.org

2, 6, 9, 20, 30, 45, 50, 56, 75, 84, 125, 126, 140, 176, 189, 196, 210, 264, 294, 315, 350, 396, 416, 440, 441, 490, 525, 594, 616, 624, 660, 686, 735, 875, 891, 924, 936, 968, 990, 1029, 1040, 1088, 1100, 1225, 1386, 1404, 1452, 1456, 1485, 1540, 1560
Offset: 1

Author

Matthew Ryan (mattryan1994(AT)hotmail.com), May 30 2005

Keywords

Comments

It seems that the ratio between successive terms tends to 1 as n increases, meaning perhaps that most numbers are in this sequence.
The number of terms that have the k-th prime as their largest prime factor is A000984(k), the k-th central binomial coefficient. E.g., 6 and 9 are the A000984(2)=2 terms in {a(n)} that have prime(2)=3 as their largest prime factor.
The sequence contains the positive integers m such that the rank of the partition B(m) = 0. For m >= 2, B(m) is defined as the partition obtained by taking the prime decomposition of m and replacing each prime factor p with its index i (i.e., i-th prime = p); also B(1) = the empty partition. For example, B(350) = B(2*5^2*7) = [1,3,3,4]. B is a bijection between the positive integers and the set of all partitions. The rank of a partition P is the largest part of P minus the number of parts of P. - Emeric Deutsch, May 09 2015
Also Heinz numbers of balanced partitions, counted by A047993. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). - Gus Wiseman, Feb 08 2021

Examples

			a(7)=50 because 50=2*5*5 is, for k=3, the product of k primes, the largest of which is the k-th prime, and 50 is the 7th such number.
		

Crossrefs

Cf. A000984.
A001222 counts prime factors.
A056239 adds up prime indices.
A061395 selects maximum prime index.
A112798 lists the prime indices of each positive integer.
Other balance-related sequences:
- A010054 counts balanced strict partitions.
- A047993 counts balanced partitions.
- A090858 counts partitions of rank 1.
- A098124 counts balanced compositions.
- A340596 counts co-balanced factorizations.
- A340598 counts balanced set partitions.
- A340599 counts alt-balanced factorizations.
- A340600 counts unlabeled balanced multiset partitions.
- A340653 counts balanced factorizations.

Programs

  • Maple
    with(numtheory): a := proc (n) options operator, arrow: pi(max(factorset(n)))-bigomega(n) end proc: A := {}: for i from 2 to 1600 do if a(i) = 0 then A := `union`(A, {i}) else  end if end do: A; # Emeric Deutsch, May 09 2015
  • Mathematica
    Select[Range@ 1560, PrimePi@ FactorInteger[#][[-1, 1]] == PrimeOmega@ # &] (* Michael De Vlieger, May 09 2015 *)

Formula

For all terms, A001222(a(n)) = A061395(a(n)). - Gus Wiseman, Feb 08 2021

A001156 Number of partitions of n into squares.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 8, 9, 10, 10, 12, 13, 14, 14, 16, 19, 20, 21, 23, 26, 27, 28, 31, 34, 37, 38, 43, 46, 49, 50, 55, 60, 63, 66, 71, 78, 81, 84, 90, 98, 104, 107, 116, 124, 132, 135, 144, 154, 163, 169, 178, 192, 201, 209, 220, 235, 247, 256
Offset: 0

Keywords

Comments

Number of partitions of n such that number of parts equal to k is multiple of k for all k. - Vladeta Jovovic, Aug 01 2004
Of course p_{4*square}(n)>0. In fact p_{4*square}(32n+28)=3 times p_{4*square}(8n+7) and p_{4*square}(72n+69) is even. These seem to be the only arithmetic properties the function p_{4*square(n)} possesses. Similar results hold for partitions into positive squares, distinct squares and distinct positive squares. - Michael David Hirschhorn, May 05 2005
The Heinz numbers of these partitions are given by A324588. - Gus Wiseman, Mar 09 2019

Examples

			p_{4*square}(23)=1 because 23 = 3^2 + 3^2 + 2^2 + 1^2 and there is no other partition of 23 into squares.
G.f.: A(x) = 1 + x + x^2 + x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 2*x^7 +...
such that the g.f. A(x) satisfies the identity [_Paul D. Hanna_]:
A(x) = 1/((1-x)*(1-x^4)*(1-x^9)*(1-x^16)*(1-x^25)*...)
A(x) = 1 + x/(1-x) + x^4/((1-x)*(1-x^4)) + x^9/((1-x)*(1-x^4)*(1-x^9)) + x^16/((1-x)*(1-x^4)*(1-x^9)*(1-x^16)) + ...
From _Gus Wiseman_, Mar 09 2019: (Start)
The a(14) = 6 integer partitions into squares are:
  (941)
  (911111)
  (44411)
  (44111111)
  (41111111111)
  (11111111111111)
while the a(14) = 6 integer partitions in which the multiplicity of k is a multiple of k for all k are:
  (333221)
  (33311111)
  (22222211)
  (2222111111)
  (221111111111)
  (11111111111111)
(End)
		

References

  • 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).

Crossrefs

Cf. A000041, A000161 (partitions into 2 squares), A000290, A033461, A131799, A218494, A285218, A304046.
Cf. A078134 (first differences).
Row sums of A243148.
Euler trans. of A010052 (see also A308297).

Programs

  • Haskell
    a001156 = p (tail a000290_list) where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Oct 31 2012, Aug 14 2011
    
  • Magma
    m:=70; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&*[1/(1-x^(k^2)): k in [1..(m+2)]]) )); // G. C. Greubel, Nov 11 2018
  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+ `if`(i^2>n, 0, b(n-i^2, i))))
        end:
    a:= n-> b(n, isqrt(n)):
    seq(a(n), n=0..120);  # Alois P. Heinz, May 30 2014
  • Mathematica
    CoefficientList[ Series[Product[1/(1 - x^(m^2)), {m, 70}], {x, 0, 68}], x] (* Or *)
    Join[{1}, Table[Length@PowersRepresentations[n, n, 2], {n, 68}]] (* Robert G. Wilson v, Apr 12 2005, revised Sep 27 2011 *)
    f[n_] := Length@ IntegerPartitions[n, All, Range@ Sqrt@ n^2]; Array[f, 67] (* Robert G. Wilson v, Apr 14 2013 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i^2>n, 0, b[n-i^2, i]]]]; a[n_] := b[n, Sqrt[n]//Floor]; Table[a[n], {n, 0, 120}] (* Jean-François Alcover, Nov 02 2015, after Alois P. Heinz *)
  • PARI
    {a(n)=polcoeff(1/prod(k=1, sqrtint(n+1), 1-x^(k^2)+x*O(x^n)), n)} \\ Paul D. Hanna, Mar 09 2012
    
  • PARI
    {a(n)=polcoeff(1+sum(m=1, sqrtint(n+1), x^(m^2)/prod(k=1, m, 1-x^(k^2)+x*O(x^n))), n)} \\ Paul D. Hanna, Mar 09 2012
    

Formula

G.f.: Product_{m>=1} 1/(1-x^(m^2)).
G.f.: Sum_{n>=0} x^(n^2) / Product_{k=1..n} (1 - x^(k^2)). - Paul D. Hanna, Mar 09 2012
a(n) = (1/n)*Sum_{k=1..n} A035316(k)*a(n-k). - Vladeta Jovovic, Nov 20 2002
a(n) = f(n,1,3) with f(x,y,z) = if xReinhard Zumkeller, Nov 08 2009
Conjecture (Jan Bohman, Carl-Erik Fröberg, Hans Riesel, 1979): a(n) ~ c * n^(-alfa) * exp(beta*n^(1/3)), where c = 1/18.79656, beta = 3.30716, alfa = 1.16022. - Vaclav Kotesovec, Aug 19 2015
From Vaclav Kotesovec, Dec 29 2016: (Start)
Correct values of these constants are:
1/c = sqrt(3) * (4*Pi)^(7/6) / Zeta(3/2)^(2/3) = 17.49638865935104978665...
alfa = 7/6 = 1.16666666666666666...
beta = 3/2 * (Pi/2)^(1/3) * Zeta(3/2)^(2/3) = 3.307411783596651987...
a(n) ~ 3^(-1/2) * (4*Pi*n)^(-7/6) * Zeta(3/2)^(2/3) * exp(2^(-4/3) * 3 * Pi^(1/3) * Zeta(3/2)^(2/3) * n^(1/3)). [Hardy & Ramanujan, 1917]
(End)

Extensions

More terms from Eric W. Weisstein
More terms from Gh. Niculescu (ghniculescu(AT)yahoo.com), Oct 08 2006

A072233 Square array T(n,k) read by antidiagonals giving number of ways to distribute n indistinguishable objects in k indistinguishable containers; containers may be left empty.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 3, 3, 2, 1, 1, 0, 1, 3, 4, 3, 2, 1, 1, 0, 1, 4, 5, 5, 3, 2, 1, 1, 0, 1, 4, 7, 6, 5, 3, 2, 1, 1, 0, 1, 5, 8, 9, 7, 5, 3, 2, 1, 1, 0, 1, 5, 10, 11, 10, 7, 5, 3, 2, 1, 1, 0, 1, 6, 12, 15, 13, 11, 7, 5, 3, 2, 1, 1, 0, 1, 6, 14, 18, 18, 14, 11, 7, 5, 3, 2, 1, 1
Offset: 0

Author

Martin Wohlgemuth (mail(AT)matroid.com), Jul 05 2002

Keywords

Comments

Regarded as a triangular table, this is another version of the number of partitions of n into k parts, A008284. - Franklin T. Adams-Watters, Dec 18 2006
From Gus Wiseman, Feb 10 2021: (Start)
T(n,k) is also the number of partitions of n with greatest part k, if we assume the greatest part of an empty partition to be 0. Row n = 9 counts the following partitions:
111111111 22221 333 432 54 63 72 81 9
222111 3222 441 522 621 711
2211111 3321 4221 531 6111
21111111 32211 4311 5211
33111 42111 51111
321111 411111
3111111
(End)

Examples

			Table begins (upper left corner = T(0,0)):
1 1 1  1  1  1  1  1  1 ...
0 1 1  1  1  1  1  1  1 ...
0 1 2  2  2  2  2  2  2 ...
0 1 2  3  3  3  3  3  3 ...
0 1 3  4  5  5  5  5  5 ...
0 1 3  5  6  7  7  7  7 ...
0 1 4  7  9 10 11 11 11 ...
0 1 4  8 11 13 14 15 15 ...
0 1 5 10 15 18 20 21 22 ...
There is 1 way to distribute 0 objects into k containers: T(0, k) = 1. The different ways for n=4, k=3 are: (oooo)()(), (ooo)(o)(), (oo)(oo)(), (oo)(o)(o), so T(4, 3) = 4.
From _Wolfdieter Lang_, Dec 03 2012 (Start)
The triangle a(n,k) = T(n-k,k) begins:
n\k  0  1  2  3  4  5  6  7  8  9 10 ...
00   1
01   0  1
02   0  1  1
03   0  1  1  1
04   0  1  2  1  1
05   0  1  2  2  1  1
06   0  1  3  3  2  1  1
07   0  1  3  4  3  2  1  1
08   0  1  4  5  5  3  2  1  1
09   0  1  4  7  6  5  3  2  1  1
10   0  1  5  8  9  7  5  3  2  1  1
...
Row n=5 is, for k=1..5, [1,2,2,1,1] which gives the number of partitions of n=5 with k parts. See A008284 and the Franklin T. Adams-Watters comment above. (End)
From _Gus Wiseman_, Feb 10 2021: (Start)
Row n = 9 counts the following partitions:
  9  54  333  3222  22221  222111  2211111  21111111  111111111
     63  432  3321  32211  321111  3111111
     72  441  4221  33111  411111
     81  522  4311  42111
         531  5211  51111
         621  6111
         711
(End)
		

Crossrefs

Sum of antidiagonal entries T(n, k) with n+k=m equals A000041(m).
Alternating row sums are A081362.
Cf. A008284.
The version for factorizations is A316439.
The version for set partitions is A048993/A080510.
The version for strict partitions is A008289/A059607.
A047993 counts balanced partitions, ranked by A106529.
A063995/A105806 count partitions by Dyson rank.

Programs

  • Mathematica
    Flatten[Table[Length[IntegerPartitions[n, {k}]], {n, 0, 20}, {k, 0, n}]] (* Emanuele Munarini, Feb 24 2014 *)
  • Sage
    from sage.combinat.partition import number_of_partitions_length
    [[number_of_partitions_length(n, k) for k in (0..n)] for n in (0..10)] # Peter Luschny, Aug 01 2015

Formula

T(0, k) = 1, T(n, 0) = 0 (n>0), T(1, k) = 1 (k>0), T(n, 1) = 1 (n>0), T(n, k) = 0 for n < 0, T(n, k) = Sum[ T(n-k+i, k-i), i=0...k-1] Or, T(n, 1) = T(n, n) = 1, T(n, k) = 0 (k>n), T(n, k) = T(n-1, k-1) + T(n-k, k).
G.f. Product_{j=0..infinity} 1/(1-xy^j). Regarded as a triangular array, g.f. Product_{j=1..infinity} 1/(1-xy^j). - Franklin T. Adams-Watters, Dec 18 2006
O.g.f. of column No. k of the triangle a(n,k) is x^k/product(1-x^j,j=1..k), k>=0 (the undefined product for k=0 is put to 1). - Wolfdieter Lang, Dec 03 2012

Extensions

Corrected by Franklin T. Adams-Watters, Dec 18 2006

A006141 Number of integer partitions of n whose smallest part is equal to the number of parts.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 10, 11, 13, 15, 17, 19, 23, 25, 29, 33, 38, 42, 49, 54, 62, 69, 78, 87, 99, 109, 123, 137, 154, 170, 191, 211, 236, 261, 290, 320, 357, 392, 435, 479, 530, 582, 644, 706, 779, 854, 940, 1029, 1133, 1237, 1358, 1485
Offset: 1

Keywords

Comments

Or, number of partitions of n in which number of largest parts is equal to the largest part.
a(n) is the number of partitions of n-1 without parts that differ by less than 2 and which have no parts less than three. [MacMahon]
There are two conflicting choices for the offset in this sequence. For the definition given here the offset is 1, and that is what we shall adopt. On the other hand, if one arrives at this sequence via the Rogers-Ramanujan identities (see the next comment), the natural offset is 0.
Related to Rogers-Ramanujan identities: Let G[1](q) and G[2](q) be the generating functions for the two Rogers-Ramanujan identities of A003114 and A003106, starting with the constant term 1. The g.f. for the present sequence is G[3](q) = (G[1](q) - G[2](q))/q = 1+q^3+q^4+q^5+q^6+q^7+2*q^8+2*q^9+3*q^10+.... - Joerg Arndt, Oct 08 2012; N. J. A. Sloane, Nov 18 2015
For more about the generalized Rogers-Ramanujan series G[i](x) see the Andrews-Baxter and Lepowsky-Zhu papers. The present series is G[3](x). - N. J. A. Sloane, Nov 22 2015
From Wolfdieter Lang, Oct 31 2016: (Start)
From Hardy (H) p. 94, eq. (6.12.1) and Hardy-Wright (H-W), p. 293, eq. (19.14.3) for H_2(a,x) - H_1(a,x) = a*H_1(a*x,x) one finds from the result for H_1(a,x) (in (H) on top on p. 95), after putting a=x, the o.g.f. of a(n) = A003114(n) - A003106(n), n >= 0, with a(0) = 0 as Sum_{m>=0} x^((m+1)^2) / Product_{j=1..m} (1 - x^j). The m=0 term is 1*x^1. See the formula given by Joerg Arndt, Jan 29 2011.
This formula has a combinatorial interpretation (found similar to the one given in (H) section 6.0, pp. 91-92 or (H-W) pp. 290-291): a(n) is the number of partitions of n with parts differing by at least 2 and part 1 present. See the example for a(15) below. (End)
The Heinz numbers of these integer partitions are given by A324522. - Gus Wiseman, Mar 09 2019

Examples

			G.f. = x + x^4 + x^5 + x^6 + x^7 + x^8 + 2*x^9 + 2*x^10 + 3*x^11 + 3*x^12 + ...
a(15) = 5 because the partitions of 15 where the smallest part equals the number of parts are
3 + 6 + 6,
3 + 5 + 7,
3 + 4 + 8,
3 + 3 + 9, and
2 + 13.
- _Joerg Arndt_, Oct 08 2012
a(15) = 5 because the partitions of 15 with parts differing by at least 2 and part 1 present are: [14,1] obtained from the partition of 11 with one part, [11], added to the first part of the special partition [3,1] of 4 and  [11,3,1], [10,4,1], [9,5,1], [8,6,1] from adding all partition of 15 - 9 = 6 with one part, [6], and those with two parts, [5,1], [4,1], [3,3], to the special partition [5,3,1] of 9. - _Wolfdieter Lang_, Oct 31 2016
a(15) = 5 because the partitions of 14 with parts >= 3 and parts differing by at least 2 are [14], [11,3], [10,4], [9,5] and [8,6]. See the second [MacMahon] comment. This follows from the g.f. G[3](q) given in Andrews - Baxter, eq. (5.1) for i=3, (using summation index  m) and  m*(m+2) = 3 + 5 + ... + (2*m+1). - _Wolfdieter Lang_, Nov 02 2016
From _Gus Wiseman_, Mar 09 2019: (Start)
The a(8) = 1 through a(15) = 5 integer partitions:
  (6,2)  (7,2)    (8,2)    (9,2)    (10,2)   (11,2)   (12,2)   (13,2)
         (3,3,3)  (4,3,3)  (4,4,3)  (5,4,3)  (5,5,3)  (6,5,3)  (6,6,3)
                           (5,3,3)  (6,3,3)  (6,4,3)  (7,4,3)  (7,5,3)
                                             (7,3,3)  (8,3,3)  (8,4,3)
                                                               (9,3,3)
(End)
		

References

  • G. H. Hardy, Ramanujan, AMS Chelsea Publ., Providence, RI, 2002, pp. 92-95.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth ed., Clarendon Press, Oxford, 2003, pp. 292-294.
  • P. A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 2, p 45, Section 293.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

For the generalized Rogers-Ramanujan series G[1], G[2], G[3], G[4], G[5], G[6], G[7], G[8] see A003114, A003106, A006141, A264591, A264592, A264593, A264594, A264595. G[0] = G[1]+G[2] is given by A003113.
A003106 counts partitions with minimum > length.
A003114 counts partitions with minimum >= length.
A026794 counts partitions by minimum.
A039899 counts partitions with minimum < length.
A039900 counts partitions with minimum <= length.
A239950 counts partitions with minimum equal to number of distinct parts.
Sequences related to balance:
- A010054 counts balanced strict partitions.
- A047993 counts balanced partitions.
- A098124 counts balanced compositions.
- A106529 ranks balanced partitions.
- A340596 counts co-balanced factorizations.
- A340598 counts balanced set partitions.
- A340599 counts alt-balanced factorizations.
- A340600 counts unlabeled balanced multiset partitions.
- A340653 counts balanced factorizations.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n<0, 0, `if`(n=0, 1,
          `if`(i<1, 0, b(n, i-1)+`if`(i>n, 0, b(n-i,i)))))
        end:
    a:= n-> add(b(n-j^2, j-1), j=0..isqrt(n)):
    seq(a(n), n=1..80);  # Alois P. Heinz, Oct 08 2012
  • Mathematica
    b[n_, i_] := b[n, i] = If[n<0, 0, If[n == 0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i]]]]]; a[n_] := Sum[b[n-j^2, j-1], {j, 0, Sqrt[n]}]; Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Mar 17 2014, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],Min[#]==Length[#]&]],{n,30}] (* Gus Wiseman, Mar 09 2019 *)
  • PARI
    {a(n) = if( n<1, 0, polcoeff( sum(k=1, sqrtint(n), x^k^2 / prod(j=1, k-1, 1 - x^j, 1 + O(x ^ (n - k^2 + 1) ))), n))} /* Michael Somos, Jan 22 2008 */

Formula

G.f.: Sum_{m>=1} (x^(m^2)-x^(m*(m+1))) / Product_{i=1..m} (1-x^i) .
G.f.: Sum_{n>=1} x^(n^2)/Product_{k=1..n-1} (1-x^k). - Joerg Arndt, Jan 29 2011
a(n) = A003114(n) - A003106(n) = A039900(n) - A039899(n), (offset 1). - Vladeta Jovovic, Jul 17 2004
Plouffe in his 1992 dissertation conjectured that this has g.f. = (1+z+z^4+2*z^5-z^3-z^8+3*z^10-z^7+z^9)/(1+z-z^4-2*z^3-z^8+z^10), but Michael Somos pointed out on Jan 22 2008 that this is false.
Expansion of ( f(-x^2, -x^3) - f(-x, -x^4) ) / f(-x) in powers of x where f(, ) is Ramanujan's general theta function. - Michael Somos, Jan 22 2007
a(n) ~ sqrt(1/sqrt(5) - 2/5) * exp(2*Pi*sqrt(n/15)) / (2*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, Nov 01 2016

Extensions

More terms from Kok Seng Chua (chuaks(AT)ihpc.nus.edu.sg), Jun 20 2000
Better description from Naohiro Nomoto, Feb 06 2002
Name shortened by Gus Wiseman, Apr 07 2021 (balanced partitions are A047993).

A045931 Number of partitions of n with equal number of even and odd parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 2, 1, 3, 2, 5, 5, 7, 9, 11, 16, 18, 25, 28, 41, 44, 62, 70, 94, 107, 140, 163, 207, 245, 302, 361, 440, 527, 632, 763, 904, 1090, 1285, 1544, 1812, 2173, 2539, 3031, 3538, 4202, 4896, 5793, 6736, 7934, 9221, 10811, 12549, 14661, 16994, 19780
Offset: 0

Keywords

Comments

The trivariate g.f. with x marking weight (i.e., sum of the parts), t marking number of odd parts and s marking number of even parts, is 1/product((1-tx^(2j-1))(1-sx^(2j)), j=1..infinity). - Emeric Deutsch, Mar 30 2006

Examples

			a(9) = 5 because we have [8,1], [7,2], [6,3], [5,4] and [2,2,2,1,1,1].
From _Gus Wiseman_, Jan 23 2022: (Start)
The a(0) = 1 through a(12) = 9 partitions (A = 10, empty columns indicated by dots):
  ()  .  .  21   .  32   2211   43   3221   54       3322   65       4332
                    41          52   4211   63       4321   74       4431
                                61          72       4411   83       5322
                                            81       5221   92       5421
                                            222111   6211   A1       6321
                                                            322211   6411
                                                            422111   7221
                                                                     8211
                                                                     22221111
(End)
		

Crossrefs

The version for subsets of {1..n} is A001405.
Dominated by A027187 (partitions of even length).
More odd/even parts: A108950/A108949.
More or same number of odd/even parts: A130780/A171966.
The strict case is A239241.
This is column k = 0 of the triangle A240009.
Counting only distinct parts gives A241638, ranked by A325700.
A half-conjugate version is A277579.
These partitions are ranked by A325698.
A000041 counts integer partitions, strict A000009.
A047993 counts balanced partitions, ranked by A106529.
A257991/A257992 count odd/even parts by Heinz number.

Programs

  • Maple
    g:=1/product((1-t*x^(2*j-1))*(1-s*x^(2*j)),j=1..30): gser:=simplify(series(g,x=0,56)): P[0]:=1: for n from 1 to 53 do P[n]:=subs(s=1/t,coeff(gser,x^n)) od: seq(coeff(t*P[n],t),n=0..53); # Emeric Deutsch, Mar 30 2006
  • Mathematica
    p[n_] := p[n] = Select[IntegerPartitions[n], Count[#, ?OddQ] == Count[#, ?EvenQ] &]; t = Table[p[n], {n, 0, 10}] (* partitions of n with # odd parts = # even parts *)
    TableForm[t] (* partitions, vertical format *)
    Table[Length[p[n]], {n, 0, 30}] (* A045931 *)
    (* Peter J. C. Moses, Mar 10 2014 *)
    nmax = 100; CoefficientList[Series[Sum[x^(3*k) / Product[(1 - x^(2*j))^2, {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jun 15 2025 *)

Formula

G.f.: Sum_{k>=0} x^(3*k)/Product_{i=1..k} (1-x^(2*i))^2. - Vladeta Jovovic, Aug 18 2007
a(n) = A000041(n)-A171967(n) = A130780(n)-A108950(n) = A171966(n)-A108949(n). - Reinhard Zumkeller, Jan 21 2010
a(n) = A000041(n) - A108950(n) - A108949(n) = A130780(n) + A171966(n) - A000041(n). - Gus Wiseman, Jan 23 2022
a(n) ~ Pi * exp(Pi*sqrt(2*n/3)) / (48*n^(3/2)). - Vaclav Kotesovec, Jun 15 2025

A053263 Coefficients of the '5th-order' mock theta function chi_1(q).

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 6, 5, 7, 8, 9, 9, 12, 12, 15, 15, 18, 19, 23, 23, 27, 30, 33, 34, 41, 42, 49, 51, 57, 61, 69, 72, 81, 87, 96, 100, 113, 119, 132, 140, 153, 163, 180, 188, 208, 221, 240, 253, 278, 294, 319, 339, 366, 388, 422, 443, 481, 510, 549, 580, 626, 662
Offset: 0

Author

Dean Hickerson, Dec 19 1999

Keywords

Comments

The rank of a partition is its largest part minus the number of parts.
Number of partitions of n such that 2*(least part) > greatest part. - Clark Kimberling, Feb 16 2014
Also the number of partitions of n with the same median as maximum. These are conjugate to the partitions described above. For minimum instead of maximum we have A361860. - Gus Wiseman, Apr 23 2023

Examples

			From _Gus Wiseman_, Apr 20 2023: (Start)
The a(1) = 1 through a(8) = 6 partitions such that 2*(minimum) > (maximum):
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (32)     (33)      (43)       (44)
                    (1111)  (11111)  (222)     (322)      (53)
                                     (111111)  (1111111)  (332)
                                                          (2222)
                                                          (11111111)
The a(1) = 1 through a(8) = 6 partitions such that (median) = (maximum):
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (221)    (33)      (331)      (44)
                    (1111)  (11111)  (222)     (2221)     (332)
                                     (111111)  (1111111)  (2222)
                                                          (22211)
                                                          (11111111)
(End)
		

References

  • Srinivasa Ramanujan, Collected Papers, Chelsea, New York, 1962, pp. 354-355
  • Srinivasa Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988, pp. 20, 25

Crossrefs

Other '5th-order' mock theta functions are at A053256, A053257, A053258, A053259, A053260, A053261, A053262, A053264, A053265, A053266, A053267.
A000041 counts integer partitions, strict A000009, odd-length A027193.
A359893 and A359901 count partitions by median.

Programs

  • Mathematica
    1+Series[Sum[q^(2n+1)(1+q^n)/Product[1-q^k, {k, n+1, 2n+1}], {n, 0, 49}], {q, 0, 100}]
    (* Also: *)
    Table[Count[ IntegerPartitions[n], p_ /; 2 Min[p] > Max[p]], {n, 40}]
    (* Clark Kimberling, Feb 16 2014 *)
    nmax = 100; CoefficientList[Series[1 + Sum[x^(2*k+1)*(1+x^k) / Product[1-x^j, {j, k+1, 2*k+1}], {k, 0, Floor[nmax/2]}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jun 12 2019 *)

Formula

G.f.: chi_1(q) = Sum_{n>=0} q^n/((1-q^(n+1))(1-q^(n+2))...(1-q^(2n+1))).
G.f.: chi_1(q) = 1 + Sum_{n>=0} q^(2n+1) (1+q^n)/((1-q^(n+1))(1-q^(n+2))...(1-q^(2n+1))).
a(n) is twice the number of partitions of 5n+3 with rank == 2 (mod 5) minus number with rank == 0 or 1 (mod 5).
a(n) - 1 is the number of partitions of n with unique smallest part and all other parts <= one plus twice the smallest part.
a(n) ~ sqrt(phi/2) * exp(Pi*sqrt(2*n/15)) / (5^(1/4)*sqrt(n)), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Jun 16 2019

A236913 Number of partitions of 2n of type EE (see Comments).

Original entry on oeis.org

1, 1, 3, 6, 12, 22, 40, 69, 118, 195, 317, 505, 793, 1224, 1867, 2811, 4186, 6168, 9005, 13026, 18692, 26613, 37619, 52815, 73680, 102162, 140853, 193144, 263490, 357699, 483338, 650196, 870953, 1161916, 1544048, 2044188, 2696627, 3545015, 4644850, 6066425
Offset: 0

Author

Clark Kimberling, Feb 01 2014

Keywords

Comments

The partitions of n are partitioned into four types:
EO, even # of odd parts and odd # of even parts, A236559;
OE, odd # of odd parts and even # of even parts, A160786;
EE, even # of odd parts and even # of even parts, A236913;
OO, odd # of odd parts and odd # of even parts, A236914.
A236559 and A160786 are the bisections of A027193;
A236913 and A236914 are the bisections of A027187.

Examples

			The partitions of 4 of type EE are [3,1], [2,2], [1,1,1,1], so that a(2) = 3.
type/k . 1 .. 2 .. 3 .. 4 .. 5 .. 6 .. 7 .. 8 ... 9 ... 10 .. 11
EO ..... 0 .. 1 .. 0 .. 2 .. 0 .. 5 .. 0 .. 10 .. 0 ... 20 .. 0
OE ..... 1 .. 0 .. 2 .. 0 .. 4 .. 0 .. 8 .. 0 ... 16 .. 0 ... 29
EE ..... 0 .. 1 .. 0 .. 3 .. 0 .. 6 .. 0 .. 12 .. 0 ... 22 .. 0
OO ..... 0 .. 0 .. 1 .. 0 .. 3 .. 0 .. 7 .. 0 ... 14 .. 0 ... 27
From _Gus Wiseman_, Feb 09 2021: (Start)
This sequence counts even-length partitions of even numbers, which have Heinz numbers given by A340784. For example, the a(0) = 1 through a(4) = 12 partitions are:
  ()  (11)  (22)    (33)      (44)
            (31)    (42)      (53)
            (1111)  (51)      (62)
                    (2211)    (71)
                    (3111)    (2222)
                    (111111)  (3221)
                              (3311)
                              (4211)
                              (5111)
                              (221111)
                              (311111)
                              (11111111)
(End)
		

Crossrefs

Note: A-numbers of ranking sequences are in parentheses below.
The ordered version is A000302.
The case of odd-length partitions of odd numbers is A160786 (A340931).
The Heinz numbers of these partitions are (A340784).
A027187 counts partitions of even length/maximum (A028260/A244990).
A034008 counts compositions of even length.
A035363 counts partitions into even parts (A066207).
A047993 counts balanced partitions (A106529).
A058695 counts partitions of odd numbers (A300063).
A058696 counts partitions of even numbers (A300061).
A067661 counts strict partitions of even length (A030229).
A072233 counts partitions by sum and length.
A339846 counts factorizations of even length.
A340601 counts partitions of even rank (A340602).
A340785 counts factorizations into even factors.
A340786 counts even-length factorizations into even factors.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1, 0$3],
          `if`(i<1, [0$4], b(n, i-1)+`if`(i>n, [0$4], (p->
          `if`(irem(i, 2)=0, [p[3], p[4], p[1], p[2]],
              [p[2], p[1], p[4], p[3]]))(b(n-i, i)))))
        end:
    a:= n-> b(2*n$2)[1]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Feb 16 2014
  • Mathematica
    z = 25; m1 = Map[Length[Select[Map[{Count[#, True], Count[#, False]} &,  OddQ[IntegerPartitions[2 #]]], EvenQ[(*Odd*)First[#]] && OddQ[(*Even*)Last[#]] &]] &, Range[z]]; m2 = Map[Length[Select[Map[{Count[#, True], Count[#, False]} &,      OddQ[IntegerPartitions[2 # - 1]]], OddQ[(*Odd*)First[#]] && EvenQ[(*Even*)Last[#]] &]] &, Range[z]]; m3 = Map[Length[Select[Map[{Count[#, True], Count[#, False]} &,
    OddQ[IntegerPartitions[2 #]]], EvenQ[(*Odd*)First[#]] && EvenQ[(*Even*)Last[#]] &]] &, Range[z]] ; m4 = Map[Length[Select[Map[{Count[#, True], Count[#, False]} &,
    OddQ[IntegerPartitions[2 # - 1]]], OddQ[(*Odd*)First[#]] && OddQ[(*Even*)Last[#]] &]] &, Range[z]];
    m1 (* A236559, type EO*)
    m2 (* A160786, type OE*)
    m3 (* A236913, type EE*)
    m4 (* A236914, type OO*)
    (* Peter J. C. Moses, Feb 03 2014 *)
    b[n_, i_] := b[n, i] = If[n == 0, {1, 0, 0, 0}, If[i < 1, {0, 0, 0, 0}, b[n, i - 1] + If[i > n, {0, 0, 0, 0}, Function[p, If[Mod[i, 2] == 0, p[[{3, 4, 1, 2}]], p[[{2, 1, 4, 3}]]]][b[n - i, i]]]]]; a[n_] := b[2*n, 2*n][[1]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 27 2015, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[2n],EvenQ[Length[#]]&]],{n,0,15}] (* Gus Wiseman, Feb 09 2021 *)

Extensions

More terms from Alois P. Heinz, Feb 16 2014
Showing 1-10 of 147 results. Next