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

A239829 Triangular array: T(n,k) = number of partitions of 2n - 1 that have alternating sum 2k - 1.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 7, 5, 2, 1, 12, 10, 5, 2, 1, 19, 19, 10, 5, 2, 1, 30, 33, 20, 10, 5, 2, 1, 45, 57, 36, 20, 10, 5, 2, 1, 67, 92, 64, 36, 20, 10, 5, 2, 1, 97, 147, 107, 65, 36, 20, 10, 5, 2, 1, 139, 227, 177, 110, 65, 36, 20, 10, 5, 2, 1, 195, 345, 282, 184
Offset: 1

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) = (number of partitions of 2n-1 having AS(p) = 1) = A000070(n) for n >= 1. Columns 2 and 3 are essentially A000098 and A103924, and the limiting column (after deleting initial 0's), A000712. The sum of numbers in row n is A000041(2n-1). The corresponding array for partitions into distinct parts is given by A152157 (defined as the number of partitions of 2n+1 into 2k+1 odd parts).

Examples

			First nine rows:
1
2 ... 1
4 ... 2 ... 1
7 ... 5 ... 2 ... 1
12 .. 10 .. 5 ... 2 ... 1
19 .. 19 .. 10 .. 5 ... 2 ... 1
30 .. 33 .. 20 .. 10 .. 5 ... 2 ... 1
45 .. 57 .. 36 .. 20 .. 10 .. 5 ... 2 ... 1
67 .. 92 .. 64 .. 36 .. 20 .. 10 .. 5 ... 2 ... 1
The partitions of 5 are 5, 41, 32, 311, 221, 2111, 11111, with respective alternating sums 5, 3, 1, 3, 1, 1, 1, so that row 2 of the array is 4 .. 2 .. 1.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, x^(1/2), `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=1..n))(b(2*n-1$2, 1)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Mar 30 2014
  • Mathematica
    z = 15; 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 - 1], 2 k - 1]; u = Table[t[n, k], {n, 1, z}, {k, 1, n}]
    TableForm[u]  (* A239829, array *)
    Flatten[u]    (* A239829, sequence *)
    (* Peter J. C. Moses, Mar 21 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, x^(1/2), If[i<1, 0, Expand[b[n, i-1, t] + If[i>n, 0, b[n-i, i, -t]*x^((t*i)/2)]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[2n-1, 2n-1, 1]]; Table[T[n], {n, 1, 14}] // Flatten (* Jean-François Alcover, Aug 27 2016, after Alois P. Heinz *)

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

A000710 Number of partitions of n, with two kinds of 1, 2, 3 and 4.

Original entry on oeis.org

1, 2, 5, 10, 20, 35, 62, 102, 167, 262, 407, 614, 919, 1345, 1952, 2788, 3950, 5524, 7671, 10540, 14388, 19470, 26190, 34968, 46439, 61275, 80455, 105047, 136541, 176593, 227460, 291673, 372605, 474085, 601105, 759380, 956249, 1200143, 1501749, 1873407
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of 2*n+4 with exactly 4 odd parts. - Vladeta Jovovic, Jan 12 2005
Convolution of A000041 and A001400. - Vaclav Kotesovec, Aug 18 2015
Also the sum of binomial (D(p), 4) over partitions p of n+10, where D(p) is the number of different part sizes in p. - Emily Anible, Jun 09 2018

Examples

			a(2) = 5 because we have 2, 2', 1+1, 1+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

Cf. A000712.
Fifth column of Riordan triangle A008951 and of triangle A103923.

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<5,2,1)): seq(a(n), n=0..40); # Alois P. Heinz, Sep 08 2008
  • Mathematica
    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[#<5, 2, 1]&]; Table[a[n], {n, 0, 39}] (* Jean-François Alcover, Mar 10 2014, after Alois P. Heinz *)
    nmax = 50; CoefficientList[Series[1/((1-x)(1-x^2)(1-x^3)(1-x^4))*Product[1/(1-x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 18 2015 *)
    Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@4], {n,0,39}] (* 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 + 10, 4];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)

Formula

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

Extensions

Edited by Emeric Deutsch, Mar 22 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

A000412 Number of bipartite partitions of n white objects and 3 black ones.

Original entry on oeis.org

3, 7, 16, 31, 57, 97, 162, 257, 401, 608, 907, 1325, 1914, 2719, 3824, 5313, 7316, 9973, 13495, 18105, 24132, 31938, 42021, 54948, 71484, 92492, 119120, 152686, 194887, 247693, 313613, 395547, 497154, 622688, 777424, 967525, 1200572, 1485393, 1832779, 2255317
Offset: 0

Keywords

Comments

Number of ways to factor p^n*q^3 where p and q are distinct primes.
Number of Gaussian partitions of n+3*i or 3+n*i where a "Gaussian partition" is a way of writing a Gaussian integer with nonnegative parts as a sum of Gaussian integers with nonnegative parts, imaginary numbers and real numbers. For k = 3+1*i (where i is the imaginary unit), the a(1)=7 ways to write k (where parentheses represent a complex number and a lack of them represents a sum of a real and imaginary number) would be 3+i, (3+i), 2+1+i, (2+i)+1, (1+i)+2, 1+1+1+i, (1+i)+1+1. - Yali Harrary, Nov 20 2022
a(n) is the number of multiset partitions of the multiset {r^n, s^3}. - Joerg Arndt, Jan 01 2024

References

  • M. S. Cheema and H. Gupta, Tables of Partitions of Gaussian Integers. National Institute of Sciences of India, Mathematical Tables, Vol. 1, New Delhi, 1956, p. 1.
  • 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

Column 3 of A054225.
Cf. A005380.

Programs

  • Mathematica
    max = 40; col = 3; s1 = Series[Product[1/(1-x^(n-k)*y^k), {n, 1, max+2}, {k, 0, n}], {y, 0, col}] // Normal; s2 = Series[s1, {x, 0, max+1}]; a[n_] := SeriesCoefficient[s2, {x, 0, n}, {y, 0, col}]; Table[ a[n] , {n, 0, max}] (* Jean-François Alcover, Mar 13 2014 *)
    nmax = 50; CoefficientList[Series[(3 + x - x^2 - 2*x^3 - x^4 + x^5)/((1-x)*(1-x^2)*(1-x^3)) * Product[1/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Feb 01 2016 *)

Formula

a(n) = if n <= 3 then A054225(3,n), otherwise a(n) = A054225(n,3). - Reinhard Zumkeller, Nov 30 2011
a(n) ~ exp(Pi*sqrt(2*n/3)) * sqrt(n) / (2*sqrt(2)*Pi^3). - Vaclav Kotesovec, Feb 01 2016
a(n) = A000098(n) + A000070(n) + A014153(n). - Yali Harrary, Nov 20 2022

Extensions

Edited by Christian G. Bower, Jan 08 2004

A100835 Number of partitions of n with at most 2 odd parts.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 8, 7, 14, 12, 24, 19, 39, 30, 62, 45, 95, 67, 144, 97, 212, 139, 309, 195, 442, 272, 626, 373, 873, 508, 1209, 684, 1653, 915, 2245, 1212, 3019, 1597, 4035, 2087, 5348, 2714, 7051, 3506, 9229, 4508, 12022, 5763, 15565, 7338, 20063, 9296, 25722
Offset: 0

Author

Vladeta Jovovic, Jan 13 2005

Keywords

Examples

			a(5) = 4 because we have [5], [4,1], [3,2] and [2,2,1] (the partitions [3,1,1], [2,1,1,1] and [1,1,1,1,1] do not qualify).
		

Crossrefs

Programs

  • Maple
    g:=(1+x/(1-x^2)+x^2/(1-x^2)/(1-x^4))/product(1-x^(2*i), i=1..40): gser:=series(g, x, 60): seq(coeff(gser, x, n), n=0..55); # Emeric Deutsch, Feb 16 2006
  • Mathematica
    nmax = 50; CoefficientList[Series[(1+x/(1-x^2)+x^2/(1-x^2)/(1-x^4)) * Product[1/(1-x^(2*k)), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Mar 07 2016 *)

Formula

G.f.: (1+x/(1-x^2)+x^2/(1-x^2)/(1-x^4))/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).

Extensions

More terms from Emeric Deutsch, Feb 16 2006

A329384 G.f.: (1 + x) * (1 + x^2) * (1 + x^3) * Product_{k>=1} (1 + x^k).

Original entry on oeis.org

1, 2, 3, 6, 8, 11, 16, 20, 26, 34, 43, 54, 68, 84, 103, 127, 154, 186, 225, 269, 321, 383, 453, 535, 631, 740, 866, 1012, 1178, 1368, 1587, 1835, 2117, 2440, 2804, 3217, 3687, 4215, 4812, 5487, 6244, 7096, 8055, 9128, 10331, 11681, 13187, 14870, 16752, 18846, 21180
Offset: 0

Author

Ilya Gutkovskiy, Jun 07 2020

Keywords

Comments

Number of partitions of n into distinct parts if there are two types of 1's, two types of 2's and two types of 3's.

Programs

  • Mathematica
    nmax = 50; CoefficientList[Series[(1 + x) (1 + x^2) (1 + x^3) Product[(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x]
    a[0] = 1; a[n_] := a[n] = (1/n) Sum[Sum[(-1)^(k/d + 1) If[d < 4, 2, 1] d, {d, Divisors[k]}] a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 50}]

Formula

a(n) = A036469(n) + A036469(n-3) - A036469(n-4) - A036469(n-7).
a(n) ~ 2*exp(Pi*sqrt(n/3)) / (3^(1/4)*n^(3/4)). - Vaclav Kotesovec, Jun 11 2020
Showing 1-10 of 11 results. Next