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

A103919 Triangle of numbers of partitions of n with total number of odd parts equal to k from {0,...,n}.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 2, 0, 1, 2, 0, 2, 0, 1, 0, 4, 0, 2, 0, 1, 3, 0, 5, 0, 2, 0, 1, 0, 7, 0, 5, 0, 2, 0, 1, 5, 0, 9, 0, 5, 0, 2, 0, 1, 0, 12, 0, 10, 0, 5, 0, 2, 0, 1, 7, 0, 17, 0, 10, 0, 5, 0, 2, 0, 1, 0, 19, 0, 19, 0, 10, 0, 5, 0, 2, 0, 1, 11, 0, 28, 0, 20, 0, 10, 0, 5, 0, 2, 0, 1, 0, 30, 0, 33, 0, 20, 0, 10, 0, 5, 0, 2, 0, 1
Offset: 0

Views

Author

Wolfdieter Lang, Mar 24 2005

Keywords

Comments

The partition (0) of n=0 is included. For n>0 no part 0 appears.
The first (k=0) column gives the number of partitions without odd parts, i.e., those with even parts only. See A035363.
Without the alternating zeros this becomes a triangle with columns given by the rows of the S_n(m) table shown in the Riordan reference.
From Gregory L. Simay, Oct 31 2015: (Start)
T(2n+k,k) = the number of partitions of n with parts 1..k of two kinds. If n<=k, then T(2n+k) = A000712(n), the number of partitions of n with parts of two kinds.
T(2n+k) = the convolution of A000041(n) and the number of partitions of n+k having exactly k parts.
T(2n+k) = d(n,k) where d(n,0) = p(n) and d(n,k) = d(n,k-1) + d(n-k,k-1) + d(n-2k,k-1) + ... (End)
From Emeric Deutsch, Oct 04 2016: (Start)
T(n,k) = number of partitions (p1 >= p2 >= p3 >= ...) of n having alternating sum p1 - p2 + p3 - ... = k. Example: T(5,3) = 2 because there are two partitions (3,1,1) and (4,1) of 5 with alternating sum 3.
The equidistribution of the partition statistics "alternating sum" and "total number of odd parts" follows by conjugation. (End)

Examples

			The triangle a(n,k) begins:
n\k 0  1  2  3  4  5  6  7  8  9 10
0:  1
1:  0  1
2:  1  0  1
3:  0  2  0  1
4:  2  0  2  0  1
5:  0  4  0  2  0  1
6:  3  0  5  0  2  0  1
7:  0  7  0  5  0  2  0  1
8:  5  0  9  0  5  0  2  0  1
9:  0 12  0 10  0  5  0  2  0  1
10: 7  0 17  0 10  0  5  0  2  0  1
... Reformatted - _Wolfdieter Lang_, Apr 28 2013
a(0,0) = 1 because n=0 has no odd part, only one even part, 0, by definition. a(5,3) = 2 because there are two partitions (1,1,3) and (1,1,1,2) of 5 with exactly 3 odd parts.
From _Gregory L. Simay_, Oct 31 2015: (Start)
T(10,4) = T(2*3+4,4) = d(3,4) = A000712(3) = 10.
T(10,2) = T(2*4+2,2) = d(4,2) = d(4,1)+d(2,1)+d(0,1) = d(4,0)+d(3,0)+d(2,0)+d(1,0)+d(0,0) + d(2,0)+d(1,0)+d(0,0) + d(0,0) = convolution sum p(4)+p(3)+2*p(2)+2*p(1)+3*p(0) = 5+3+2*2+2*1+3*1 = 17.
T(9,1) = T(8,0) + T(7,1) = 5 + 7 = 12.
(End)
		

References

  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.

Crossrefs

Row sums gives A000041 (partition numbers). Columns: k=0: A035363 (with zero entries) A000041 (without zero entries), k=1: A000070, k=2: A000097, k=3: A000098, k=4: A000710, 3k>=n: A000712.
Cf. A066897.
The strict version (without zeros) is A152146 interleaved with A152157.
The rows (without zeros) are A239830 interleaved with A239829.
The reverse version (without zeros) is the right half of A344612.
Removing all zeros gives A344651.
The strict reverse version (without zeros) is the right half of A344739.

Programs

  • Maple
    g:=1/product((1-t*x^(2*j-1))*(1-x^(2*j)),j=1..20): gser:=simplify(series(g,x=0,22)): P[0]:=1: for n from 1 to 18 do P[n]:=coeff(gser,x^n) od: for n from 0 to 18 do seq(coeff(P[n],t,j),j=0..n) od; # yields sequence in triangular form # Emeric Deutsch, Feb 17 2006
  • Mathematica
    T[n_, k_] := T[n, k] = Which[nJean-François Alcover, Mar 05 2014, after Paul D. Hanna *)
    Table[Length[Select[IntegerPartitions[n],Count[#,?OddQ]==k&]],{n,0,15},{k,0,n}] (* _Gus Wiseman, Jun 20 2021 *)
  • PARI
    {T(n, k)=if(n>=k, if(n==k, 1, if((n-k+1)%2==0, 0, if(k==0, sum(m=0, n, T(n\2, m)), T(n-1, k-1)+T(n-2*k, k)))))}
    for(n=0, 20, for(k=0, n, print1(T(n, k), ", ")); print(""))
    \\ Paul D. Hanna, Apr 27 2013

Formula

a(n, k) = number of partitions of n>=0, which have exactly k odd parts (and possibly even parts) for k from {0, ..., n}.
Sum_{k=0..n} k*T(n,k) = A066897(n). - Emeric Deutsch, Feb 17 2006
G.f.: G(t,x) = 1/Product_{j>=1} (1-t*x^(2*j-1))*(1-x^(2*j)). - Emeric Deutsch, Feb 17 2006
G.f. T(2n+k,k) = g.f. d(n,k) = (1/Product_{j=1..k} (1-x^j)) * g.f. p(n). - Gregory L. Simay, Oct 31 2015
T(n,k) = T(n-1,k-1) + T(n-2k,k). - Gregory L. Simay, Nov 01 2015

A000097 Number of partitions of n if there are two kinds of 1's and two kinds of 2's.

Original entry on oeis.org

1, 2, 5, 9, 17, 28, 47, 73, 114, 170, 253, 365, 525, 738, 1033, 1422, 1948, 2634, 3545, 4721, 6259, 8227, 10767, 13990, 18105, 23286, 29837, 38028, 48297, 61053, 76926, 96524, 120746, 150487, 187019, 231643, 286152, 352413, 432937, 530383, 648245
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of 2*n with exactly 2 odd parts (offset 1). - Vladeta Jovovic, Jan 12 2005
Also number of transitions from one partition of n+2 to another, where a transition consists of replacing any two parts with their sum. Remove all 1' and 2' from the partition, replacing them with ((number of 2') + 1) and ((number of 1') + (number of 2') + 1); these are the two parts being summed. Number of partitions of n into parts of 2 kinds with at most 2 parts of the second kind, or of n+2 into parts of 2 kinds with exactly 2 parts of the second kind. - Franklin T. Adams-Watters, Mar 20 2006
From Christian Gutschwager (gutschwager(AT)math.uni-hannover.de), Feb 10 2010: (Start)
a(n) is also the number of pairs of partitions of n+2 which differ by only one box (for bijection see the first Gutschwager link).
a(n) is also the number of partitions of n with two parts marked.
a(n) is also the number of partitions of n+1 with two different parts marked. (End)
Convolution of A000041 and A008619. - Vaclav Kotesovec, Aug 18 2015
a(n) = P(/2,n), a particular case of P(/k,n) defined as follows: P(/0,n) = A000041(n) and P(/k,n) = P(/k-1, n) + P(/k-1,n-k) + P(/k-1, n-2k) + ... Also, P(/k,n) = the convolution of A000041 and the partitions of n with exactly k parts, and g.f. P(/k,n) = (g.f. for P(n)) * 1/(1-x)...(1-x^k). - Gregory L. Simay, Mar 22 2018
a(n) is also the sum of binomial(D(p),2) in partitions p of (n+3), where D(p)= number of different sizes of parts in p. - Emily Anible, Apr 03 2018
Also partitions of 2*(n+1) with alternating sum 2. Also partitions of 2*(n+1) with reverse-alternating sum -2 or 2. - Gus Wiseman, Jun 21 2021
Define the distance graph of the partitions of n using the distance function in A366156 as follows: two vertices (partitions) share an edge if and only if the distance between the vertices is 2. Then a(n) is the number of edges in the distance graph of the partitions of n. - Clark Kimberling, Oct 12 2023

Examples

			a(3) = 9 because we have 3, 2+1, 2+1', 2'+1, 2'+1', 1+1+1, 1+1+1', 1+1'+1' and 1'+1'+1'.
From _Gus Wiseman_, Jun 22 2021: (Start)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with exactly 2 odd parts:
  (1,1)  (3,1)    (3,3)      (5,3)
         (2,1,1)  (5,1)      (7,1)
                  (3,2,1)    (3,3,2)
                  (4,1,1)    (4,3,1)
                  (2,2,1,1)  (5,2,1)
                             (6,1,1)
                             (3,2,2,1)
                             (4,2,1,1)
                             (2,2,2,1,1)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with alternating sum 2:
  (2)  (3,1)    (4,2)        (5,3)
       (2,1,1)  (2,2,2)      (3,3,2)
                (3,2,1)      (4,3,1)
                (3,1,1,1)    (3,2,2,1)
                (2,1,1,1,1)  (4,2,1,1)
                             (2,2,2,1,1)
                             (3,2,1,1,1)
                             (3,1,1,1,1,1)
                             (2,1,1,1,1,1,1)
(End)
		

References

  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
  • 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

First differences are in A024786.
Third column of Riordan triangle A008951 and of triangle A103923.
The case of reverse-alternating sum 1 or alternating sum 0 is A000041.
The case of reverse-alternating sum -1 or alternating sum 1 is A000070.
The normal case appears to be A004526 or A065033.
The strict case is A096914.
The case of reverse-alternating sum 2 is A120452.
The case of reverse-alternating sum -2 is A344741.
A001700 counts compositions with alternating sum 2.
A035363 counts partitions into even parts.
A058696 counts partitions of 2n.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A124754 gives alternating sums of standard compositions (reverse: A344618).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
Shift of A093695.

Programs

  • Maple
    with(numtheory): etr:= proc(p) local b; b:=proc(n) option remember; local d,j; if n=0 then 1 else add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n)/n fi end end: a:= etr(n->`if`(n<3,2,1)): seq(a(n), n=0..40); # Alois P. Heinz, Sep 08 2008
  • Mathematica
    CoefficientList[Series[1/((1 - x) (1 - x^2) Product[1 - x^k, {k, 1, 100}]), {x, 0, 100}], x] (* Ben Branman, Mar 07 2012 *)
    etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n - j], {j, 1, n}]/n]; b]; a = etr[If[# < 3, 2, 1]&]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
    (1/((1 - x) (1 - x^2) QPochhammer[x]) + O[x]^50)[[3]] (* Vladimir Reshetnikov, Nov 22 2016 *)
    Table[Length@IntegerPartitions[n,All,Join[{1,2},Range[n]]],{n,0,15}] (* Robert Price, Jul 28 2020 and Jun 21 2021 *)
    T[n_, 0] := PartitionsP[n];
    T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
    T[, ] = 0;
    a[n_] := T[n + 3, 2];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];Table[Length[Select[IntegerPartitions[n],ats[#]==2&]],{n,0,30,2}] (* Gus Wiseman, Jun 21 2021 *)
  • PARI
    my(x = 'x + O('x^66)); Vec( 1/((1-x)*(1-x^2)*eta(x)) ) \\ Joerg Arndt, Apr 29 2013

Formula

Euler transform of 2 2 1 1 1 1 1...
G.f.: 1/( (1-x) * (1-x^2) * Product_{k>=1} (1-x^k) ).
a(n) = Sum_{j=0..floor(n/2)} A000070(n-2*j), n>=0.
a(n) = A014153(n)/2 + A087787(n)/4 + A000070(n)/4. - Vaclav Kotesovec, Nov 05 2016
a(n) ~ sqrt(3) * exp(Pi*sqrt(2*n/3)) / (4*Pi^2) * (1 + 35*Pi/(24*sqrt(6*n))). - Vaclav Kotesovec, Aug 18 2015, extended Nov 05 2016
a(n) = A120452(n) + A344741(n). - Gus Wiseman, Jun 21 2021

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 04 2004
Edited by Emeric Deutsch, Mar 23 2005
More terms from Franklin T. Adams-Watters, Mar 20 2006
Edited by Charles R Greathouse IV, Apr 20 2010

A026810 Number of partitions of n in which the greatest part is 4.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 3, 5, 6, 9, 11, 15, 18, 23, 27, 34, 39, 47, 54, 64, 72, 84, 94, 108, 120, 136, 150, 169, 185, 206, 225, 249, 270, 297, 321, 351, 378, 411, 441, 478, 511, 551, 588, 632, 672, 720, 764, 816, 864, 920, 972, 1033, 1089, 1154, 1215, 1285, 1350
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of n into exactly 4 parts.
Also the number of weighted cubic graphs on 4 nodes (=the tetrahedron) with weight n. - R. J. Mathar, Nov 03 2018
From Gus Wiseman, Jun 27 2021: (Start)
Also the number of strict integer partitions of 2n with alternating sum 4, or (by conjugation) partitions of 2n covering an initial interval of positive integers with exactly 4 odd parts. The strict partitions with alternating sum 4 are:
(4) (5,1) (6,2) (7,3) (8,4) (9,5) (10,6)
(5,2,1) (5,3,2) (5,4,3) (6,5,3) (7,6,3)
(6,3,1) (6,4,2) (7,5,2) (8,6,2)
(7,4,1) (8,5,1) (9,6,1)
(6,3,2,1) (6,4,3,1) (6,5,4,1)
(7,4,2,1) (7,4,3,2)
(7,5,3,1)
(8,5,2,1)
(6,4,3,2,1)
(End)

Examples

			From _Gus Wiseman_, Jun 27 2021: (Start)
The a(4) = 1 through a(10) = 9 partitions of length 4:
  (1111)  (2111)  (2211)  (2221)  (2222)  (3222)  (3322)
                  (3111)  (3211)  (3221)  (3321)  (3331)
                          (4111)  (3311)  (4221)  (4222)
                                  (4211)  (4311)  (4321)
                                  (5111)  (5211)  (4411)
                                          (6111)  (5221)
                                                  (5311)
                                                  (6211)
                                                  (7111)
(End)
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 275.
  • D. E. Knuth, The Art of Computer Programming, vol. 4,fascicle 3, Generating All Combinations and Partitions, Section 7.2.1.4., p. 56, exercise 31.

Crossrefs

Cf. A001400, A026811, A026812, A026813, A026814, A026815, A026816, A069905 (3 positive parts), A002621 (partial sums), A005044 (first differences).
A non-strict version is A000710 or A088218.
This is column k = 2 of A152146.
A reverse version is A343941.

Programs

  • Magma
    [Round((n^3+3*n^2-9*n*(n mod 2))/144): n in [0..60]]; // Vincenzo Librandi, Oct 14 2015
  • Maple
    A049347 := proc(n)
            op(1+(n mod 3),[1,-1,0]) ;
    end proc:
    A056594 := proc(n)
            op(1+(n mod 4),[1,0,-1,0]) ;
    end proc:
    A026810 := proc(n)
            1/288*(n+1)*(2*n^2+4*n-13+9*(-1)^n) ;
            %-A049347(n)/9 ;
            %+A056594(n)/8 ;
    end proc: # R. J. Mathar, Jul 03 2012
  • Mathematica
    Table[Count[IntegerPartitions[n], {4, _}], {n, 0, 60}]
    LinearRecurrence[{1, 1, 0, 0, -2, 0, 0, 1, 1, -1}, {0, 0, 0, 0, 1, 1, 2, 3, 5, 6}, 60] (* Vincenzo Librandi, Oct 14 2015 *)
    Table[Length[IntegerPartitions[n, {4}]], {n, 0, 60}] (* Eric Rowland, Mar 02 2017 *)
    CoefficientList[Series[x^4/Product[1 - x^k, {k, 1, 4}], {x, 0, 60}], x] (* Robert A. Russell, May 13 2018 *)
  • PARI
    for(n=0, 60, print(n, " ", round((n^3 + 3*n^2 -9*n*(n % 2))/144))); \\ Washington Bomfim, Jul 03 2012
    
  • PARI
    x='x+O('x^60); concat([0, 0, 0, 0], Vec(x^4/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)))) \\ Altug Alkan, Oct 14 2015
    
  • PARI
    vector(60, n, n--; (n+1)*(2*n^2+4*n-13+9*(-1)^n)/288 + real(I^n)/8 - ((n+2)%3-1)/9) \\ Altug Alkan, Oct 26 2015
    
  • PARI
    print1(0,", "); for(n=1,60,j=0;forpart(v=n,j++,,[4,4]); print1(j,", ")) \\ Hugo Pfoertner, Oct 01 2018
    

Formula

G.f.: x^4/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)) = x^4/((1-x)^4*(1+x)^2*(1+x+x^2)*(1+x^2)).
a(n+4) = A001400(n). - Michael Somos, Apr 07 2012
a(n) = round( (n^3 + 3*n^2 -9*n*(n mod 2))/144 ). - Washington Bomfim, Jan 06 2021 and Jul 03 2012
a(n) = (n+1)*(2*n^2+4*n-13+9*(-1)^n)/288 -A049347(n)/9 +A056594(n)/8. - R. J. Mathar, Jul 03 2012
From Gregory L. Simay, Oct 13 2015: (Start)
a(n) = (n^3 + 3*n^2 - 9*n)/144 + a(m) - (m^3 + 3*m^2 - 9*m)/144 if n = 12k + m and m is odd. For example, a(23) = a(12*1 + 11) = (23^3 + 3*23^2 - 9*23)/144 + a(11) - (11^3 + 3*11^2 - 9*11)/144 = 94.
a(n) = (n^3 + 3*n^2)/144 + a(m) - (m^3 + 3*m^2)/144 if n = 12k + m and m is even. For example, a(22) = a(12*1 + 10) = (22^3 + 3*22^2)/144 + a(10) - (10^3 + 3*10^2)/144 = 84. (End)
a(n) = A008284(n,4). - Robert A. Russell, May 13 2018
From Gregory L. Simay, Jul 28 2019: (Start)
a(2n+1) = a(2n) + a(n+1) - a(n-3) and
a(2n) = a(2n-1) + a(n+2) - a(n-2). (End)

A239830 Triangular array: T(n,k) = number of partitions of 2n that have alternating sum 2k, with T(0,0) = 1 for convenience.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 5, 2, 1, 5, 9, 5, 2, 1, 7, 17, 10, 5, 2, 1, 11, 28, 20, 10, 5, 2, 1, 15, 47, 35, 20, 10, 5, 2, 1, 22, 73, 62, 36, 20, 10, 5, 2, 1, 30, 114, 102, 65, 36, 20, 10, 5, 2, 1, 42, 170, 167, 109, 65, 36, 20, 10, 5, 2, 1, 56, 253, 262, 182, 110
Offset: 0

Views

Author

Clark Kimberling, Mar 28 2014

Keywords

Comments

Suppose that p, with parts x(1) >= x(2) >= ... >= x(k), is a partition of n. Define AS(p), the alternating sum of p, by x(1) - x(2) + x(3) - ... + ((-1)^(k-1))*x(k); note that AS(p) has the same parity as n. Column 1 is given by T(n,1) = A000041(n) for n >= 0, which is the number of partitions of 2n having AS(p) = 0, for n >= 1. Columns 2 and 3 are essentially A000567 and A000710, and the limiting column (after deleting initial 0's), A000712. The sum of numbers in row n is A000041(2n). The corresponding array for partitions into distinct parts is given by A152146 (defined as the number of unrestricted partitions of 2n into 2k even parts).

Examples

			First nine rows:
1
1 ... 1
2 ... 2 ... 1
3 ... 5 ... 2 ... 1
5 ... 9 ... 5 ... 2 ... 1
7 ... 17 .. 10 .. 5 ... 2 ... 1
11 .. 28 .. 20 .. 10 .. 5 ... 2 ... 1
15 .. 47 .. 35 .. 20 .. 10 .. 5 ... 2 ... 1
22 .. 73 .. 62 .. 36 .. 20 .. 10 .. 5 ... 2 ... 1
The partitions of 6 are 6, 51, 42, 411, 33, 321, 3111, 222, 2211, 21111, 111111, with respective alternating sums 6, 4, 2, 4, 0, 2, 2, 2, 0, 2, 0, so that row 3 (counting the top row as row 0) of the array is 3 .. 5 .. 2 .. 1.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1, 0,
          expand(b(n, i-1, t)+`if`(i>n, 0, b(n-i, i, -t)*x^((t*i)/2)))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(2*n$2, 1)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Mar 30 2014
  • Mathematica
    z = 16; s[w_] := s[w] = Total[Take[#, ;; ;; 2]] - Total[Take[Rest[#], ;; ;; 2]] &[w]; c[n_] := c[n] = Table[s[IntegerPartitions[n][[k]]], {k, 1, PartitionsP[n]}]; t[n_, k_] := Count[c[2 n], 2 k]; t[0, 0] = 1; u = Table[t[n, k], {n, 0, z}, {k, 0, n}]
    TableForm[u]  (* A239830, array *)
    Flatten[u]    (* A239830, sequence *)
    (* Peter J. C. Moses, Mar 21 2014 *)

A008951 Array read by columns: number of partitions of n into parts of 2 kinds.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 1, 5, 7, 2, 7, 12, 5, 11, 19, 9, 1, 15, 30, 17, 2, 22, 45, 28, 5, 30, 67, 47, 10, 42, 97, 73, 19, 1, 56, 139, 114, 33, 2, 77, 195, 170, 57, 5, 101, 272, 253, 92, 10, 135, 373, 365, 147, 20, 176, 508, 525, 227, 35, 1, 231, 684, 738, 345, 62, 2, 297
Offset: 0

Views

Author

Keywords

Comments

Fine-Riordan array S_n(m) = a(n,m) with extra row for n=0 added.
Row n of this triangle has length floor(1/2 + sqrt(2*(n+1))), n>=0. This is sequence {A002024(n+1)} = [1,2,2,3,3,3,4,4,4,4,5,5,5,5,5,6,6,6,6,6,6,...].
Written as a triangle this becomes A103923.
a(n,m) also gives the number of partitions of n-t(m), where t(m):=A000217(m) (triangular numbers), with two kinds of parts 1,2,..m. See the column o.g.f.'s in table A103923.
In general, column m is asymptotic to exp(Pi*sqrt(2*n/3)) * 6^(m/2) * n^((m-2)/2) / (4*sqrt(3) * m! * Pi^m), equivalently to 6^(m/2) * n^(m/2) / (m! * Pi^m) * p(n), where p(n) is the partition function A000041. - Vaclav Kotesovec, Aug 28 2015

Examples

			Array begins:
m\n 0 1 2 3 4 .5 .6 .7 .8 ...
0 | 1 1 2 3 5 .7 11 15 22 ... (A000041)
1 | . 1 2 4 7 12 19 ... (A000070)
2 | . . . 1 2 .5 .9 ... (A000097)
3 | . . . . . .. .1 ... (A000098)
[1]; [1,1]; [2,2]; [3,4,1]; [5,7,2]; [7,12,5]; [11,19,9,1]...
a(3,1) = 4 because the partitions (3), (1,2) and (1^3) have q values 1,2 and 1 which sum to 4.
a(3,1) = 4 because the exponents of part 1 in the above given partitions of 3 are 0,1,3 and they sum to 4.
a(3,1) = 4 because the partitions of 3-t(1)=2 with two kinds of part 1, say 1 and 1' and one kind of part 2 are (2),(1^2), (1'^2) and (11').
		

References

  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.

Crossrefs

The first column (m=0) gives A000041(n). Columns m=1..10 are A000070 (partial sums of partition numbers), A000097, A000098, A000710, A103924-A103929.

Programs

  • Maple
    a:= proc(n, m) option remember; `if`(n<0, 0,
          `if`(m=0, combinat[numbpart](n), a(n-m, m-1) +a(n-m, m)))
        end:
    seq(seq(a(n,m), m=0..round(sqrt(2*n+2))-1), n=0..20);  # Alois P. Heinz, Nov 16 2012
  • Mathematica
    a[n_, 0] := PartitionsP[n]; a[n_, m_] /; (n >= m*(m+1)/2) := a[n, m] = a[n-m, m-1] + a[n-m, m]; a[n_, m_] = 0; Flatten[ Table[ a[n, m], {n, 0, 18}, {m, 0, Floor[1/2 + Sqrt[2*(n+1)]] - 1}]](* Jean-François Alcover, May 02 2012, after recurrence formula *)
    DeleteCases[Flatten@Transpose@Table[ConstantArray[0, m (m + 1)/2]~Join~Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@m], {n, 0, 21 - m (m + 1)/2}] , {m, 0, 6}], 0](* Robert Price, Jul 28 2020 *)

Formula

Riordan gives formula.
a(n, m) is the sum over partitions of n of Product_{j=1..m} k(j), where k(j) is the number of parts of size j (exponent of j in a given partition of n), if m>=1. If m=0 then a(n, 0)=p(n):=A000041(n) (number of partitions of n). O is counted as a part for n=0 and only for this n.
a(n, m) is the sum over partitions of n of binomial(q(partition), m), with q the number of distinct parts of a given partition. m>=0.
a(n, m) = a(n-m, m-1) + a(n-m, m), n >= t(m):=m*(m+1)/2 = A000217(m) (triangular numbers), otherwise 0, with input a(n, 0) = p(n):=A000041(n).

Extensions

More terms from Robert G Bearden (nem636(AT)myrealbox.com), Apr 27 2004
Correction, comments and Riordan formulas from Wolfdieter Lang, Apr 28 2005

A000098 Number of partitions of n if there are two kinds of 1, two kinds of 2 and two kinds of 3.

Original entry on oeis.org

1, 2, 5, 10, 19, 33, 57, 92, 147, 227, 345, 512, 752, 1083, 1545, 2174, 3031, 4179, 5719, 7752, 10438, 13946, 18519, 24428, 32051, 41805, 54265, 70079, 90102, 115318, 147005, 186626, 236064, 297492, 373645, 467707
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of 2*n+1 with exactly 3 odd parts (offset 1). - Vladeta Jovovic, Jan 12 2005
Convolution of A000041 and A001399. - Vaclav Kotesovec, Aug 18 2015
Also the sum of binomial(D(p),3) over partitions p of n+6, where D(p) is the number of different sizes of parts in p. - Emily Anible, May 13 2018

Examples

			a(3)=10 because we have 3, 3', 2+1, 2+1', 2'+1, 2'+1', 1+1+1, 1+1+1', 1+1'+1' and 1'+1'+1'.
		

References

  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
  • 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

Fourth column of Riordan triangle A008951 and of triangle A103923.

Programs

  • Mathematica
    CoefficientList[1/((1-x)*(1-x^2)*(1-x^3)*QPochhammer[x]) + O[x]^40, x] (* Jean-François Alcover, Feb 04 2016 *)
    Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@3], {n,0,35}] (* Robert Price, Jul 28 2020 *)
    T[n_, 0] := PartitionsP[n];
    T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
    T[, ] = 0;
    a[n_] := T[n + 6, 3];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)

Formula

Euler transform of 2 2 2 1 1 1 1...
G.f.: 1/((1-x)(1-x^2)(1-x^3)*Product_{k>=1} (1-x^k)).
a(n) = Sum_{j=0..floor(n/3)} A000097(n-3*j), n >= 0.
a(n) ~ sqrt(n) * exp(Pi*sqrt(2*n/3)) / (2*sqrt(2)*Pi^3). - Vaclav Kotesovec, Aug 18 2015

Extensions

Edited by Emeric Deutsch, Mar 23 2005

A103923 Triangle of partitions of n with parts of sizes 1,2,...,m, each of two different kinds, m>=1.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 4, 2, 1, 5, 7, 5, 2, 1, 7, 12, 9, 5, 2, 1, 11, 19, 17, 10, 5, 2, 1, 15, 30, 28, 19, 10, 5, 2, 1, 22, 45, 47, 33, 20, 10, 5, 2, 1, 30, 67, 73, 57, 35, 20, 10, 5, 2, 1, 42, 97, 114, 92, 62, 36, 20, 10, 5, 2, 1, 56, 139, 170, 147, 102, 64, 36, 20, 10, 5, 2, 1, 77, 195
Offset: 0

Views

Author

Wolfdieter Lang, Mar 24 2005

Keywords

Comments

The corresponding Fine-Riordan triangle is A008951.
This is the array p_2(n,m) of Gupta et al. written as a triangle. p_2(n,m) is defined on p. x of this reference as the number of partitions of n into parts consisting of two varieties of each of the integers 1 to m and one variety of each larger integer. Therefore a(n,m) gives these numbers for the partitions of n-m.
a(n,m)= sum over partitions of n+t(m)-m of binomial(q(partition),m), with t(m):=A000217(m) and q the number of distinct parts of a given partition. m>=0.
a(n,m)= number of partitions of 2*n-m with exactly m odd parts.
a(n,m)= sum over partitions of n+t(m)-m of product(k[j],j=1..m), with t(m):=A000217(m) and k[j]=number of parts of size j (exponent of j in a given partition of n), if m>=1. If m=0 then a(n,0)=p(n):=A000041(n) (number of partitions of n). 0 is counted as a part for n=0 and only for this n.

Examples

			Triangle starts:
[1];
[1,1];
[2,2,1];
[3,4,2,1];
[5,7,5,2,1];
...
a(4,2)=5 from the partitions of 4-2=2 with two varieties of parts 1 and of 2, namely (2),(2'),(1^2),(1'^2) and (1,1').
a(4,2)=5 from the partitions of 4+t(2)-2=5 which have products of the exponents of parts 1 and 2: 0*0,1*0,0*1,2*1,1*2,5*0 and sum to 4.
a(4,2)=5 from the partitions of 4+t(2)-2=5 which have number of distinct parts (q values) 1,2,2,2,2,2,1. The corresponding binomial(q,2) values are 0,1,1,1,1,0 and sum to 4.
a(4,2)=5 from the partitions of 2*4-2=6 with exactly two odd parts, namely (1,5), (3^2), (1^2,4), (1,2,3) and (1^2,2^2), which are 5 in number.
		

References

  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958 (reprinted 1962), pp. 90-121.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.

Crossrefs

The column sequences (without leading 0's) are, for m=0..10: A000041, A000070, A000097, A000098, A000710, A103924-A103929.

Programs

  • Maple
    with(numtheory):
    b:= proc(n, k) option remember; `if`(n=0, 1, add(add(d*
          `if`(d<=k, 2, 1), d=divisors(j)) *b(n-j, k), j=1..n)/n)
        end:
    A:= (n, k)-> b(n, k) -`if`(k=0, 0, b(n, k-1)):
    seq(seq(A(n, k), k=0..n), n=0..14);  # Alois P. Heinz, Sep 14 2014
  • Mathematica
    a[n_, 0] := a[n, 0] = PartitionsP[n]; a[n_, m_] /; n= m >= 0 := a[n, m] = a[n-1, m-1] + a[n-m, m]; Table[a[n, m], {n, 0, 14}, {m, 0, n}] // Flatten (* Jean-François Alcover, Dec 09 2014 *)
    Flatten@Table[Length@IntegerPartitions[n-m, All, Range@n~Join~Range@m],  {n, 0, 12}, {m, 0, n}] (* Robert Price, Jul 29 2020 *)

Formula

a(n, m) = a(n-1, m-1) + a(n-m, m), n>=m>=0, with a(n, 0)= A000041(n) (partition numbers), a(n, m)=0 if n
a(n, m) = sum(a(n-1-j*m, m-1), j=0..floor((n-m)/m)), m>=1, input a(n, 0)= A000041(n).
G.f. column m: product(1/(1-x^j), j=1..m)*P(x), with P(x)= product(1/(1-x^j), j=1..infty), the o.g.f. for the partition numbers A000041.
G.f. column m>=1: (product(1/(1-x^k), k=1..m)^2)*product(1/(1-x^j), j=(m+1)..infty). For m=0 put the first product equal to 1.

A100824 Number of partitions of n with at most one odd part.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 3, 7, 5, 12, 7, 19, 11, 30, 15, 45, 22, 67, 30, 97, 42, 139, 56, 195, 77, 272, 101, 373, 135, 508, 176, 684, 231, 915, 297, 1212, 385, 1597, 490, 2087, 627, 2714, 792, 3506, 1002, 4508, 1255, 5763, 1575, 7338, 1958, 9296, 2436, 11732, 3010, 14742
Offset: 0

Author

Vladeta Jovovic, Jan 13 2005

Keywords

Comments

From Gus Wiseman, Jan 21 2022: (Start)
Also the number of integer partitions of n with alternating sum <= 1, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. These are the conjugates of partitions with at most one odd part. For example, the a(1) = 1 through a(9) = 12 partitions with alternating sum <= 1 are:
1 11 21 22 32 33 43 44 54
111 1111 221 2211 331 2222 441
2111 111111 2221 3311 3222
11111 3211 221111 3321
22111 11111111 4311
211111 22221
1111111 33111
222111
321111
2211111
21111111
111111111
(End)

Examples

			From _Gus Wiseman_, Jan 21 2022: (Start)
The a(1) = 1 through a(9) = 12 partitions with at most one odd part:
  (1)  (2)  (3)   (4)   (5)    (6)    (7)     (8)     (9)
            (21)  (22)  (32)   (42)   (43)    (44)    (54)
                        (41)   (222)  (52)    (62)    (63)
                        (221)         (61)    (422)   (72)
                                      (322)   (2222)  (81)
                                      (421)           (432)
                                      (2221)          (441)
                                                      (522)
                                                      (621)
                                                      (3222)
                                                      (4221)
                                                      (22221)
(End)
		

Crossrefs

The case of alternating sum 0 (equality) is A000070.
A multiplicative version is A339846.
These partitions are ranked by A349150, conjugate A349151.
A000041 = integer partitions, strict A000009.
A027187 = partitions of even length, strict A067661, ranked by A028260.
A027193 = partitions of odd length, ranked by A026424.
A058695 = partitions of odd numbers.
A103919 = partitions by sum and alternating sum (reverse: A344612).
A277103 = partitions with the same number of odd parts as their conjugate.

Programs

  • Maple
    seq(coeff(convert(series((1+x/(1-x^2))/mul(1-x^(2*i),i=1..100),x,100),polynom),x,n),n=0..60); (C. Ronaldo)
  • Mathematica
    nmax = 50; CoefficientList[Series[(1+x/(1-x^2)) * Product[1/(1-x^(2*k)), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Mar 07 2016 *)
    Table[Length[Select[IntegerPartitions[n],Count[#,?OddQ]<=1&]],{n,0,30}] (* _Gus Wiseman, Jan 21 2022 *)
  • PARI
    a(n) = if(n%2==0, numbpart(n/2), sum(i=1, (n+1)\2, numbpart((n-2*i+1)\2))) \\ David A. Corneth, Jan 23 2022

Formula

G.f.: (1+x/(1-x^2))/Product(1-x^(2*i), i=1..infinity). More generally, g.f. for number of partitions of n with at most k odd parts is (1+Sum(x^i/Product(1-x^(2*j), j=1..i), i=1..k))/Product(1-x^(2*i), i=1..infinity).
a(n) ~ exp(sqrt(n/3)*Pi) / (2*sqrt(3)*n) if n is even and a(n) ~ exp(sqrt(n/3)*Pi) / (2*Pi*sqrt(n)) if n is odd. - Vaclav Kotesovec, Mar 07 2016
a(2*n) = A000041(n). a(2*n + 1) = A000070(n). - David A. Corneth, Jan 23 2022

Extensions

More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 19 2005

A343941 Number of strict integer partitions of 2n with reverse-alternating sum 4.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 3, 3, 4, 5, 7, 8, 10, 11, 14, 15, 18, 20, 23, 25, 29, 31, 35, 38, 42, 45, 50, 53, 58, 62, 67, 71, 77, 81, 87, 92, 98, 103, 110, 115, 122, 128, 135, 141, 149, 155, 163, 170, 178, 185, 194, 201, 210, 218, 227, 235, 245, 253, 263, 272, 282, 291, 302
Offset: 0

Author

Gus Wiseman, Jun 09 2021

Keywords

Comments

The reverse-alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i. This is equal to (-1)^(m-1) times the number of odd parts in the conjugate partition, where m is the number of parts, so a(n) is the number of strict odd-length integer partitions of 2n whose conjugate has exactly 4 odd parts (first example). By conjugation, this is also the number partitions of 2n covering an initial interval and containing exactly four odd parts, one of which is the greatest (second example).

Examples

			The a(2) = 1 through a(12) = 10 strict partitions (empty column indicated by dot, A..D = 10..13):
  4   .  521   532   543   653   763     873     983     A93     BA3
               631   642   752   862     972     A82     B92     CA2
                     741   851   961     A71     B81     C91     DA1
                                 64321   65421   65432   76432   76542
                                         75321   75431   76531   86541
                                                 76421   86431   87432
                                                 86321   87421   87531
                                                         97321   97431
                                                                 98421
                                                                 A8321
The a(2) = 1 through a(8) = 5 partitions covering an initial interval:
  1111  .  32111   33211    33321     333221     543211      543321
                   322111   332211    3322211    3332221     5432211
                            3222111   32222111   33222211    33322221
                                                 322222111   332222211
                                                             3222222111
		

Crossrefs

The non-reverse non-strict version is A000710.
The non-reverse version is A026810.
The non-strict version is column k = 2 of A344610.
This is column k = 2 of A344649.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A120452 counts partitions of 2n with rev-alt sum 2 (negative: A344741).
A124754 gives alternating sums of standard compositions (reverse: A344618).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A344611 counts partitions of 2n with reverse-alternating sum >= 0.

Programs

  • Mathematica
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&sats[#]==4&]],{n,0,30,2}]

Extensions

More terms from Bert Dobbelaere, Jun 12 2021

A103924 Number of partitions of n into parts but with two kinds of parts of sizes 1,2,3,4 and 5.

Original entry on oeis.org

1, 2, 5, 10, 20, 36, 64, 107, 177, 282, 443, 678, 1026, 1522, 2234, 3231, 4628, 6550, 9193, 12774, 17619, 24098, 32740, 44161, 59213, 78894, 104553, 137787, 180702, 235806, 306354, 396226, 510392, 654787, 836911, 1065734, 1352475, 1710535, 2156536, 2710318
Offset: 0

Author

Wolfdieter Lang, Mar 24 2005

Keywords

Comments

See A103923 for other combinatorial interpretations of a(n).
Convolution of A001401 and A000041. - Vaclav Kotesovec, Aug 28 2015
Also the sum of binomial (D(p), 5) over partitions p of n+15, where D(p) is the number of different part sizes in p. - Emily Anible, Jun 09 2018

References

  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958 (reprinted 1962), p. 90.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.

Crossrefs

Sixth column (m=5) of Fine-Riordan triangle A008951 and of triangle A103923, i.e. the p_2(n, m) array of the Gupta et al. reference.
Cf. A000712 (all parts of two kinds).

Programs

  • Maple
    with(numtheory): a:= proc(n) a(n):=`if`(n=0, 1, add(add(d*`if`(d<6, 2, 1), d=divisors(j)) *a(n-j), j=1..n)/n) end: seq(a(n), n=0..40); # Alois P. Heinz, Sep 14 2014
  • Mathematica
    a[n_] := a[n] = If[n==0, 1, Sum[Sum[d*If[d<6, 2, 1], {d, Divisors[j]}] * a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Aug 28 2015, after Alois P. Heinz *)
    nmax=60; CoefficientList[Series[Product[1/(1-x^k), {k, 1, 5}] * Product[1/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 28 2015 *)
    Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@5],  {n,0,39}] (* Robert Price, Jul 29 2020 *)
    T[n_, 0] := PartitionsP[n];
    T[n_, m_] /; (n >= m(m+1)/2) := T[n, m] = T[n-m, m-1] + T[n-m, m];
    T[, ] = 0;
    a[n_] := T[n+15, 5];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)

Formula

G.f.: (product(1/(1-x^k), k=1..5)^2)*product(1/(1-x^j), j=6..infty).
a(n) = sum(A000710(n-5*j), j=0..floor(n/5)), n>=0.
a(n) ~ 3*n^(3/2) * exp(Pi*sqrt(2*n/3)) / (20*sqrt(2)*Pi^5). - Vaclav Kotesovec, Aug 28 2015
Showing 1-10 of 11 results. Next