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-9 of 9 results.

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

A124577 Define p(alpha) to be the number of H-conjugacy classes where H is a Young subgroup of type alpha of the symmetric group S_n. Then a(n) = sum p(alpha) where |alpha| = n and alpha has at most n parts.

Original entry on oeis.org

1, 1, 6, 39, 356, 4055, 57786, 983535, 19520264, 441967518, 11235798510, 316719689506, 9800860032876, 330230585628437, 12032866998445818, 471416196117401340, 19758835313514076176, 882185444649249777913, 41797472220815112375966, 2094455101139881670407954
Offset: 0

Views

Author

Richard Bayley (r.t.bayley(AT)qmul.ac.uk), Nov 05 2006

Keywords

Comments

p((0,n)) = A000041, p((1,n)) = A000070, p((2,n)) = A093695;
Also main diagonal of A209664. - Wouter Meeussen, Mar 11 2012
Number of partitions of n into n sorts of parts. a(2) = 6: [2a], [2b], [1a,1a], [1a,1b], [1b,1a], [1b,1b]. - Alois P. Heinz, Sep 08 2014

Examples

			E.g p((2,1)) = # H-conjugacy classes of S_3 where H = Yng((2,1)) isom S_2 times S_1 . Then a(3) = p((3)) + p((2,1)) + p((2,0,1)) + p((1,2)) + p((1,1,1))+ p((1,0,2)+ p((0,2,1)) + p((0,1,2)) + p((0,0,3)) = 3+4+4+4+6+4+3+4+4+3 = 39.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, k) +`if`(i>n, 0, k*b(n-i, i, k))))
        end:
    a:= n-> b(n$3):
    seq(a(n), n=0..20);  # Alois P. Heinz, Sep 08 2014
  • Mathematica
    p[n_Integer, v_] := Sum[Subscript[x, j]^n, {j, v}];
    p[par_List, v_] := Times @@ (p[#, v] & /@ par);
    Tr /@ Table[(p[#, l] & /@ IntegerPartitions[l]) /. Subscript[x, ] -> 1, {l, 19}] (* _Wouter Meeussen, Mar 11 2012 *)
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1, k] + If[i > n, 0, k*b[n - i, i, k]]]]; a[n_] := b[n, n, n]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)
  • PARI
    {a(n)=polcoeff(1/prod(k=1,n,1-n*x^k +x*O(x^n)),n)} \\ Paul D. Hanna, Nov 26 2009

Formula

Let x = x_1x_2x_3... and x^alpha = x_1^(alpha_1)x_2^(alpha_2)x_3^(alpha_3).... Let Phi = set of all primitive necklaces. If b is a primitive necklace then C(b) = Content(b) = (beta_1, beta_2,beta_3,.....) where beta_i = the number of times i occurs in b. For example if b=[11233] then C(b) = (2,1,2). To generate the p(alpha) we do the following. sum_alpha p(alpha)x^alpha = prod_(b in Phi) prod_(k = 1)^infinity 1/(1- x^(c(b) times k )) = prod_(b in Phi) prod_(k = 1)^infinity (1+ x^(k times C(b)) + x^(2k times C(b)) + x^(3k times C(b)) + ....)
From Paul D. Hanna, Nov 26 2009: (Start)
a(n) = [x^n] Product_{k>=1} 1/(1 - n*x^k) for n>0.
a(n) = Sum_{k=1..n} A008284(n,k)*n^k, where A008284(n,k) = number of partitions of n in which the greatest part is k, 1<=k<=n. (End)
a(n) ~ n^n * (1 + 1/n + 2/n^2 + 3/n^3 + 5/n^4 + 7/n^5 + 11/n^6 + 15/n^7 + 22/n^8 + 30/n^9 + 42/n^10), where the coefficients are A000041(k)/n^k. - Vaclav Kotesovec, Mar 19 2015

Extensions

Extended with formula by Paul D. Hanna, Nov 26 2009
a(0) inserted and more terms from Alois P. Heinz, Sep 08 2014

A093694 Number of one-element transitions from the partitions of n to the partitions of n+1 for labeled parts.

Original entry on oeis.org

1, 2, 5, 9, 17, 27, 46, 69, 108, 158, 234, 331, 476, 657, 915, 1244, 1694, 2262, 3029, 3988, 5257, 6844, 8901, 11461, 14749, 18809, 23958, 30304, 38263, 48018, 60167, 74977, 93276, 115509, 142772, 175759, 215991, 264449, 323216, 393772, 478884
Offset: 0

Views

Author

Thomas Wieder, Apr 10 2004

Keywords

Comments

For the unlabeled case, the number of one-element transitions from the partitions of n to the partitions of n+1 is given by A000070. Example: There are A000070(4) = 12 transitions from n=4 to n=5: [1111] -> [11111], [1111] -> [1112], [112] -> [1112], [112] -> [113], [112] -> [122], [13] -> [113], [13] -> [14], [13] -> [23], [22] -> [23], [22] -> [122], [4] -> [14], [4] -> [5].
a(n) is also the total number of parts in all partitions of the integer n+1 which contain at least one part 1.
More generally, a(n) is also the total number of parts in all partitions of n+k that contain k as a part, if k >= 1. - Omar E. Pol, Sep 25 2013
Also partitions of n into 2 sorts of parts where all parts of the first sort precede all parts of the second sort; see example. [Joerg Arndt, Apr 28 2013]
Number of vertical elements in the structure of A225610. - Omar E. Pol, Aug 01 2013

Examples

			In the labeled case, we have 9 one-element transitions from all partitions of n=3 to the partitions of n+1=4: [1,1,1] -> [1,1,1,1]; [1,1,1] -> [1,1,2]; [1,1,1] -> [1,1,2]; [1,1,1] -> [1,1,2]; [1,2] -> [1,1,2]; [1,2] -> [1,3]; [1,2] -> [2,2]; [3] -> [1,3]; [3] -> [4].
For n = 3 we have the following partitions of 3+1 = 4 which contain at least one part 1: [1111], [112], [13] and these partitions contain 4 + 3 + 2 = 9 = a(3) parts.
There are a(4)=17 partitions of 4 into 2 sorts where all parts of the first sort precede all parts of the second sort. Here p:s stands for "part p of sort s":
01:  [ 1:0  1:0  1:0  1:0  ]
02:  [ 1:0  1:0  1:0  1:1  ]
03:  [ 1:0  1:0  1:1  1:1  ]
04:  [ 1:0  1:1  1:1  1:1  ]
05:  [ 1:1  1:1  1:1  1:1  ]
06:  [ 2:0  1:0  1:0  ]
07:  [ 2:0  1:0  1:1  ]
08:  [ 2:0  1:1  1:1  ]
09:  [ 2:0  2:0  ]
10:  [ 2:0  2:1  ]
11:  [ 2:1  1:1  1:1  ]
12:  [ 2:1  2:1  ]
13:  [ 3:0  1:0  ]
14:  [ 3:0  1:1  ]
15:  [ 3:1  1:1  ]
16:  [ 4:0  ]
17:  [ 4:1  ]
- _Joerg Arndt_, Apr 28 2013
		

Crossrefs

Programs

  • Maple
    main := proc(n::integer) local a,ndxp,ListOfPartitions; with(combinat): with(ListTools): ListOfPartitions:=partition(n-1); a:=0; for ndxp from 1 to nops(ListOfPartitions) do if Occurrences(1, ListOfPartitions[ndxp]) > 0 then a:=a+nops(Flatten(ListOfPartitions[ndxp])); print("ndxp, Flatten(ListOfPartitions[ndxp]):",ndxp, Flatten(ListOfPartitions[ndxp])); print("ndxp, ListOfPartitions[ndxp], a:",ndxp, ListOfPartitions[ndxp],a); # End of if-clause *** Occurrences(1, ListOfPartitions[ndxp]) *** fi; end do; print("n, a(n):",n,a); end proc;
    ##
    b:= proc(n,i) option remember; local x, y;
          if n<=0 or i=0 then [0, 0]
        elif i=1 then [1, n]
        else x:= b(n, i-1);
             y:= b(n-i, i);
             [x[1]+y[1], x[2]+y[2]+y[1]]
          fi
        end:
    a:= n-> b(n+1, n+1)[2]:
    seq(a(n), n=0..100);  # Alois P. Heinz, Apr 24 2011
  • Mathematica
    f[n_] := Block[{l = Sort[ Flatten[ IntegerPartitions[n]]]}, Length[l] - Count[l, 1]]; g[n_] := (f[n] + Sum[PartitionsP[k], {k, 0, n}]); Table[ g[n], {n, 0, 40}] (* Robert G. Wilson v, Jul 13 2004 *)
    b[n_, i_] := b[n, i] = Module[{x, y}, If[n <= 0 || i == 0, {0, 0}, If[i == 1, {1, n}, x = b[n, i-1]; y = b[n-i, i]; {x[[1]] + y[[1]], x[[2]] + y[[2]] + y[[1]]}]]]; a[n_] := b[n+1, n+1][[2]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 10 2015, after Alois P. Heinz *)
  • PARI
    a(n) = numbpart(n) + sum(m=1, n, numdiv(m)*numbpart(n - m)); \\ Indranil Ghosh, Apr 25 2017
    
  • Python
    from sympy import divisor_count, npartitions
    def a(n): return npartitions(n) + sum([divisor_count(m)*npartitions(n - m) for m in range(1, n + 1)]) # Indranil Ghosh, Apr 25 2017

Formula

a(n) = Sum_k=1^p(n) (nops(p(k, n)) + 1), where p(n) is the number of partitions of n and nops(p(k, n)) is the number of parts in the k-th partition p(n, k) of n.
a(n) = Sum_k=1^p(n) nops(p(k, n)[subject to: at least one p(l, k, n) = 1]; p(n) = number of partitions of n, p(k, n) = k-th partition, p(l, k, n) = l-th part in the k-th partition p(k, n) of integer n.
G.f.: sum(n>=0, (n+1) * x^n / prod(k=1..n, 1-x^k ) ). - Joerg Arndt, Apr 17 2011
a(n) = A000041(n) + A006128(n). - Omar E. Pol, Aug 01 2013
a(n) ~ exp(Pi*sqrt(2*n/3))*(2*gamma + log(6*n/Pi^2))/(4*Pi*sqrt(2*n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Oct 24 2016

Extensions

More terms from Robert G. Wilson v, Jul 13 2004

A322210 G.f.: P(x,y) = Product_{n>=1} 1/(1 - (x^n + y^n)), where P(x,y) = Sum_{n>=0} Sum_{k>=0} T(n,k) * x^n*y^k, as a square table of coefficients T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 4, 3, 5, 7, 10, 7, 5, 7, 12, 18, 18, 12, 7, 11, 19, 34, 38, 34, 19, 11, 15, 30, 56, 74, 74, 56, 30, 15, 22, 45, 94, 133, 158, 133, 94, 45, 22, 30, 67, 146, 233, 297, 297, 233, 146, 67, 30, 42, 97, 228, 385, 550, 602, 550, 385, 228, 97, 42, 56, 139, 340, 623, 951, 1166, 1166, 951, 623, 340, 139, 56
Offset: 0

Views

Author

Paul D. Hanna, Nov 30 2018

Keywords

Comments

Conjecture 1: the triangular table T(n,k) is the number of ways to form the subsum k from the partitions of n, where n and k are integers such that 0 <= k <= n. For example, t(4,2)=10; the five partitions of 4 are (4), (3,1), (2,2), (2,1,1), (1,1,1,1) with subsum 2 occurring {0,0,2,2,6) times for a total of 10. - George Beck, Jan 03 2020
From Wouter Meeussen, Mar 09 2023: (Start)
Conjecture 2: the square table T(n,k) is the coefficient of s_lambda in the sum over all partitions lambda |-n and nu |-k of (s_rho/mu) where s_lambda*s_mu = Sum(rho|-n+k; C(rho, lambda, mu) s_rho). Simply stated as: multiply lambda with mu, and, for each term in the result, take the skew Schur function with mu and count how often you get the original lambda back. Sum up over all lambda and mu of the size n and k.
Conjecture 3: the triangular table T(n,k) is analogous to conjecture 2, but counting s_lambda in s_(lambda/mu) * s_mu with lambda |- n and mu |- k and 0<=k<=n. (End)

Examples

			G.f.: P(x,y) = 1 + (x + y) + (2*x^2 + 2*x*y + 2*y^2) + (3*x^3 + 4*x^2*y + 4*x*y^2 + 3*y^3) + (5*x^4 + 7*x^3*y + 10*x^2*y^2 + 7*x*y^3 + 5*y^4) + (7*x^5 + 12*x^4*y + 18*x^3*y^2 + 18*x^2*y^3 + 12*x*y^4 + 7*y^5) + (11*x^6 +19*x^5*y + 34*x^4*y^2 + 38*x^3*y^3 + 34*x^2*y^4 + 19*x*y^5 + 11*y^6) + (15*x^7 + 30*x^6*y + 56*x^5*y^2 + 74*x^4*y^3 + 74*x^3*y^4 + 56*x^2*y^5 + 30*x*y^6 + 15*y^7) + (22*x^8 + 45*x^7*y + 94*x^6*y^2 + 133*x^5*y^3 + 158*x^4*y^4 + 133*x^3*y^5 + 94*x^2*y^6 + 45*x*y^7 + 22*y^8) + ...
such that
P(x,y) = Product_{n>=1} 1/(1 - (x^n + y^n)),
where
P(x,y) = Sum_{n>=0} Sum_{k>=0} T(n,k) * x^n*y^k.
SQUARE TABLE.
The square table of coefficients T(n,k) of x^n*y^k in P(x,y) begins
   1,   1,   2,    3,    5,     7,    11,     15,     22,     30, ...
   1,   2,   4,    7,   12,    19,    30,     45,     67,     97, ...
   2,   4,  10,   18,   34,    56,    94,    146,    228,    340, ...
   3,   7,  18,   38,   74,   133,   233,    385,    623,    977, ...
   5,  12,  34,   74,  158,   297,   550,    951,   1614,   2627, ...
   7,  19,  56,  133,  297,   602,  1166,   2133,   3775,   6437, ...
  11,  30,  94,  233,  550,  1166,  2382,   4551,   8424,  14953, ...
  15,  45, 146,  385,  951,  2133,  4551,   9142,  17639,  32680, ...
  22,  67, 228,  623, 1614,  3775,  8424,  17639,  35492,  68356, ...
  30,  97, 340,  977, 2627,  6437, 14953,  32680,  68356, 136936, ...
  42, 139, 506, 1501, 4202, 10692, 25835,  58659, 127443, 264747, ...
  56, 195, 730, 2255, 6531, 17290, 43313, 102149, 229998, 495195, ...
  ...
TRIANGLE.
Alternatively, this sequence may be written as a triangle, starting as
   1;
   1,   1;
   2,   2,   2;
   3,   4,   4,   3;
   5,   7,  10,   7,    5;
   7,  12,  18,  18,   12,    7;
  11,  19,  34,  38,   34,   19,   11;
  15,  30,  56,  74,   74,   56,   30,   15;
  22,  45,  94, 133,  158,  133,   94,   45,   22;
  30,  67, 146, 233,  297,  297,  233,  146,   67,  30;
  42,  97, 228, 385,  550,  602,  550,  385,  228,  97,  42;
  56, 139, 340, 623,  951, 1166, 1166,  951,  623, 340, 139,  56;
  77, 195, 506, 977, 1614, 2133, 2382, 2133, 1614, 977, 506, 195, 77;
  ...
		

Crossrefs

Cf. A322200 (log).
Cf. A000041 (row 0 = partitions), A000070 (row 1), A093695(k+2) (row 2).
Main diagonal gives A322211.
Antidiagonal sums give A070933.
Cf. A284593.
Cf. A361286.

Programs

  • Maple
    b:= proc(n, i) option remember; expand(`if`(n=0 or i=1,
          (x+1)^n, b(n, i-1) +(x^i+1)*b(n-i, min(n-i, i))))
        end:
    T:= (n, k)-> coeff(b(n+k$2), x, k):
    seq(seq(T(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Aug 23 2019
  • Mathematica
    b[n_, i_] := b[n, i] = Expand[If[n == 0 || i == 1, (x + 1)^n, b[n, i - 1] + (x^i + 1) b[n - i, Min[n - i, i]]]];
    T[n_, k_] := Coefficient[b[n + k, n + k], x, k];
    Table[Table[T[n, d - n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Dec 06 2019, after Alois P. Heinz *)
  • PARI
    {P = 1/prod(n=1,61, (1 - (x^n + y^n) +O(x^61) +O(y^61)) );}
    {T(n,k) = polcoeff( polcoeff( P,n,x),k,y)}
    for(n=0,16, for(k=0,16, print1( T(n,k),", ") );print(""))

Formula

FORMULAS FOR TERMS.
T(n,k) = T(k,n) for n >= 0, k >= 0.
T(n,0) = A000041(n) for n >= 0, where A000041 is the partition numbers.
T(n,1) = A000070(n) for n >= 0, where A000070 is the sum of partitions.
ROW GENERATING FUNCTIONS.
Row 0: 1/( Product_{n>=1} (1 - x^n) ).
Row 1: 1/( (1-x) * Product_{n>=1} (1 - x^n) ).
Row 2: 2/( (1-x) * (1-x^2) * Product_{n>=1} (1 - x^n) ).

A096541 Number of parts unequal to 1 in all partitions of the integer n. Also the difference between the labeled and the unlabeled case of one-element transitions from the partitions of n to the partitions of n+1.

Original entry on oeis.org

0, 0, 1, 2, 5, 8, 16, 24, 41, 61, 95, 136, 204, 284, 407, 560, 779, 1050, 1432, 1901, 2543, 3338, 4393, 5698, 7411, 9513, 12226, 15562, 19803, 24993, 31538, 39506, 49456, 61546, 76499, 94603, 116858, 143679, 176431, 215802, 263576, 320796, 389900
Offset: 0

Views

Author

Thomas Wieder, Jun 24 2004

Keywords

Comments

Also column 2 of A181187. - Omar E. Pol, Feb 18 2012
Sum over all partitions of n of the difference between the number of parts and the number of distinct parts. - Alois P. Heinz, Nov 18 2020

Examples

			The partitions of n=5 are [11111], [1112], [113], [122], [23], [14], [5] and they contain 0 + 1 + 1 + 2 + 2 + 1 + 1 = 8 = A096541(5) parts unequal to 1.
		

Crossrefs

Programs

  • Maple
    main := proc(n::integer) local a,ndxp,ndxprt,ListOfPartitions,iverbose; with(combinat): ListOfPartitions:=partition(n); a:=0; for ndxp from 1 to nops(ListOfPartitions) do for ndxprt from 1 to nops(ListOfPartitions[ndxp]) do if op(ndxprt,ListOfPartitions[ndxp]) <> 1 then a := a + 1; fi; end do; end do; print("n, a(n):",n,a); end proc;
    # second Maple program:
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, 0]
        else f:= b(n, i-1); g:= `if`(i>n, [0, 0], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+g[1]]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=0..60); # Alois P. Heinz, Apr 04 2012
  • Mathematica
    f[n_] := Block[{l = Sort[ Flatten[ IntegerPartitions[n]]]}, Length[l] - Count[l, 1]]; Table[ f[n], {n, 0, 20}] (* Robert G. Wilson v, Jun 30 2004 *)
    a[n_] := Sum[(DivisorSigma[0, k] - 1)*PartitionsP[n - k], {k, 1, n}]; Table[a[n], {n, 0, 42}] (* Jean-François Alcover, Jan 14 2013, after Vladeta Jovovic *)
  • PARI
    a(n)=sum(k=1,n,(numdiv(k)-1)*numbpart(n-k)) \\ Charles R Greathouse IV, Jan 14 2013

Formula

a(n) = A093694(n) - A000070(n).
a(n) = Sum_{k=1..n} (tau(k)-1)*numbpart(n-k). - Vladeta Jovovic, Jun 26 2004
a(n) ~ exp(Pi*sqrt(2*n/3))*(2*gamma - 2 + log(6*n/Pi^2))/(4*Pi*sqrt(2*n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Oct 24 2016
a(n) = Sum_{i=1..floor(n/2)} A066633(n-i,i). - George Beck, Feb 15 2020
G.f.: Sum_{k>=1} x^(2*k)/(1 - x^k) / Product_{j>=1} (1 - x^j). - Ilya Gutkovskiy, Mar 05 2021

Extensions

More terms from Robert G. Wilson v, Jun 30 2004

A094533 Number of one-element transitions among partitions of the integer n for labeled parts.

Original entry on oeis.org

0, 0, 2, 8, 22, 48, 98, 178, 316, 524, 856, 1334, 2066, 3084, 4578, 6626, 9530, 13434, 18854, 26022, 35764, 48520, 65526, 87550, 116536, 153674, 201906, 263258, 342006, 441366, 567754, 726032, 925588, 1174010, 1484664, 1869072, 2346586, 2934044
Offset: 0

Views

Author

Thomas Wieder, Jun 05 2004

Keywords

Examples

			In the labeled case we have 22 one-element transitions among all partitions of n=4:
[1,1,1,1] -> [1,1,2] arises 6 times (the first 1 added to the second 1 gives 2, the first 1 added to the third 1 gives 2, the first 1 added to the fourth 1 gives 2, the second 1 added to the third 1 gives 2, the second 1 added to the fourth 1 gives 2, the third 1 added to the fourth 1 gives 2),
[1,1,2] -> [2,2] arises 1 times,
[1,1,2] -> [1,3] arises 2 times,
[2,2] -> [1,3] arises 1 times,
[1,3] -> [4] arises 1 time,
which gives 11 upwards transitions and 22 transitions in total if we include downwards transitions.
n=4: partition number p=1 is [1,1,1,1],
parts d(1,1)=1, d(2,1)=1 contribute 1,
parts d(1,1)=1, d(3,1)=1 contribute 1,
etc...
parts d(3,1)=1, d(4,1)=1 contribute 1,
(in total 6 contributions by [1,1,1,1]);
partition number p=2 is [1,1,2],
parts d(1,2)=1, d(2,2)=1 contribute 1,
parts d(1,2)=1, d(3,2)=2 contribute 1,
parts d(2,2)=1, d(3,2)=2 contribute 1;
partition number p=3 is [2,2],
parts d(1,3)=2, d(2,3)=2 contribute 1;
partition number p=4 is [1,3],
parts d(1,4)=1, d(2,4)=3 contribute 1;
partition number p=5 is [4],
part d(1,5)=4 contributes 0;
		

Crossrefs

Cf. A093695.

Programs

  • Maple
    main := proc(n::integer) local a,ndxp,ListOfPartitions,APartition,PartOfAPartition; with(combinat): ListOfPartitions:=partition(n); a:=0; for ndxp from 1 to nops(ListOfPartitions) do APartition := ListOfPartitions[ndxp]; a := a + nops(APartition)^2 - nops(APartition); end do; print("n, a(n):",n,a); end proc;
    # second Maple program:
    b:= proc(n, i) option remember; local f, g;
          if n=0 then [1, [1]] elif i<1 then [0, [0]]
        else f:= b(n, i-1); g:= `if`(i>n, [0, [0]], b(n-i, i));
             [f[1]+g[1], zip((x, y)-> x+y, f[2], [0, g[2][]], 0)]
          fi
        end:
    a:= n-> (l-> add(l[t+1]*t*(t-1), t=1..nops(l)-1))(b(n$2)[2]):
    seq(a(n), n=0..50);  # Alois P. Heinz, Apr 05 2012
  • Mathematica
    a[n_] := Block[{p = IntegerPartitions[n], l = PartitionsP[n]}, Sum[ Length[p[[k]]]^2 - Length[p[[k]]], {k, l}]]; Table[ a[n], {n, 0, 37}] (* Robert G. Wilson v, Jul 13 2004, updated by Jean-François Alcover, Jan 29 2014 *)
    Simplify@Table[SeriesCoefficient[(Log[1 - x]^2 - Log[1 - x] Log[x] + QPolyGamma[1, x] (2 Log[1 - x] - Log[x] + QPolyGamma[1, x]) + QPolyGamma[1, 1, x])/(QPochhammer[x] Log[x]^2), {x, 0, n}], {n, 0, 40}] (* Vladimir Reshetnikov, Nov 21 2016 *)
    Simplify@Table[SeriesCoefficient[2 q^2/QPochhammer[q + a, q], {a, 0, 2}, {q, 0, n}], {n, 0, 40}] (* Vladimir Reshetnikov, Nov 22 2016 *)

Formula

a(n) = Sum_p=1^P(n) Sum_i=1^D(p) Sum_j=i^D(p) 1 [subject to: d(i, p) <= d(j, p) ]; P(n) = number of partitions of n, D(p) = number of parts in partition p, d(i, p) and d(j, p) = parts number i and j in partition p of integer n.
a(n) = Sum_i=1^P(n) p(i, n)^2 - p(i, n), where P(n) is the number of integer partitions of n and p(i, n) is the number of parts of the i-th partition of n.

Extensions

More terms from Robert G. Wilson v, Jul 13 2004

A135348 Total sum of squares of number of distinct parts in all partitions of n.

Original entry on oeis.org

1, 2, 6, 11, 22, 37, 64, 101, 161, 243, 367, 535, 778, 1103, 1558, 2160, 2981, 4056, 5493, 7355, 9804, 12948, 17026, 22217, 28872, 37276, 47942, 61314, 78134, 99081, 125223, 157577, 197672, 247011, 307765, 382130, 473171, 584056, 719089, 882796
Offset: 1

Views

Author

Vladeta Jovovic, Feb 16 2008

Keywords

Examples

			a(5)=22: the partitions of 5 are 1+1+1+1+1 (1 distinct part), 1+1+1+2 (2 d.p.), 1+2+2 (2 d.p.), 1+1+3 (2 d.p.), 2+3 (2 d.p.), 1+4 (2 d.p.) and 5 (1. d.p.). The sum of the squares of the number of distinct parts is 1 +2^2 +2^2 +2^2 +2^2 +2^2 +1^2= 22. - _R. J. Mathar_, Mar 12 2023
		

Crossrefs

Programs

  • Maple
    A135348 := proc(n)
        local gf,m ;
        gf := x*(1+x^2)/(1-x)/(1-x^2) ;
        for m from 1 to n do
            gf := taylor(gf/(1-x^m),x=0,n+1)
        od:
        coeftayl(gf,x=0,n) ;
    end:
    seq(A135348(n),n=1..80) ; # R. J. Mathar, Feb 19 2008
  • Mathematica
    nmax = 50; Rest[CoefficientList[Series[x*(1 + x^2)/((1 - x)*(1 - x^2)) * Product[1/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, May 29 2018 *)
  • PARI
    A135348(N,x='x)=Vec((1+x^2)/prod(m=1,N-1,1-x^m,(1-x+O(x^N))*(1-x^2))) \\ M. F. Hasler, May 13 2018

Formula

G.f.: x*(1+x^2)/((1-x)*(1-x^2)*Product_{m>0} (1-x^m)). Euler transform of 2,3,1,0,1,1,1,1,1,... .
a(n) ~ sqrt(3) * exp(Pi*sqrt(2*n/3)) / (2*Pi^2). - Vaclav Kotesovec, May 29 2018
Convolution of 0, 1, 1, 3, 3, 5, 5, ... (A109613) by A000041. - R. J. Mathar, Mar 12 2023

Extensions

More terms from R. J. Mathar, Feb 19 2008

A094251 Number of one-element transitions between all set partitions of n labeled elements.

Original entry on oeis.org

0, 0, 2, 18, 104, 580, 3282, 19236, 117672, 753048, 5041880, 35283402, 257718540, 1961679824, 15534932350, 127788932430, 1090212468512, 9632275777296, 88013486026710, 830637659785996, 8087069127986020, 81132805319035260, 837852685505824120, 8897619270153977254
Offset: 0

Views

Author

Thomas Wieder, Apr 25 2004

Keywords

Examples

			a(3) = 18 because there are 18 one-element transitions among the set partitions of n=3 elements ([x,z,y,...] means element 1 belongs to set x, element 2 belongs to set z, element 3 belongs to set y):
[1, 1, 1] -> [1, 1, 2]; [1, 1, 1] -> [1, 2, 1]; [1, 1, 1] -> [1, 2, 2];
[1, 1, 2] -> [1, 1, 1]; [1, 1, 2] -> [1, 2, 1]; [1, 1, 2] -> [1, 2, 2];
[1, 1, 2] -> [1, 2, 3]; [1, 2, 1] -> [1, 1, 1]; [1, 2, 1] -> [1, 1, 2];
[1, 2, 1] -> [1, 2, 2]; [1, 2, 1] -> [1, 2, 3]; [1, 2, 2] -> [1, 1, 1];
[1, 2, 2] -> [1, 1, 2]; [1, 2, 2] -> [1, 2, 1]; [1, 2, 2] -> [1, 2, 3];
[1, 2, 3] -> [1, 1, 2]; [1, 2, 3] -> [1, 2, 1]; [1, 2, 3] -> [1, 2, 2];
		

Crossrefs

Programs

  • Maple
    a:= proc(m) local b, r;
          b:= proc(n, i, p, l) local g, h, k;
                if i=0 then if n=0 then g:= l[1]; h:= l[2]; k:= l[3]+g+h;
                    r:= r+p*(g*(g-1)/2+g*(k-g)+h*(1+2*(k-1))+(m-g-2*h)*k) fi
              else b(n, i-1, p, `if`(i<3, [0, l[]], l));
                   seq(b(n-i*j, i-1, p*n!/(i!)^j/(n-i*j)!/j!,
                       `if`(i<3, [j, l[]], [l[]+j])), j=1..n/i)
                fi
              end;
          r:=0; b(m, max(m, 2), 1, [0]); r
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 13 2012
  • Mathematica
    a[m_] := Module[{b, r}, b[n_, i_, p_, l_List] := Module[{g, h, k}, If[i == 0, If[n == 0, g = l[[1]]; h = l[[2]]; k = l[[3]] + g + h; r = r + p(g(g - 1)/2 + g(k - g) + h(1 + 2(k - 1)) + (m - g - 2h)k)], b[n, i - 1, p, If[i < 3, Prepend[l, 0], l]]; Table[b[n - i j, i - 1, p n!/(i!)^j/(n - i j)!/j!, If[i < 3, Prepend[l, j], l + j]], {j, 1, n/i}]]]; r = 0; b[m, Max[m, 2], 1, {0}]; r];
    a /@ Range[0, 25] (* Jean-François Alcover, Nov 18 2020, after Alois P. Heinz *)

Extensions

a(6)-a(23) from Alois P. Heinz, Apr 12 2012

A096586 Number of one-element transitions among all integer partitions of the integers from m=0 to m=n in the unlabeled case.

Original entry on oeis.org

0, 2, 8, 20, 44, 86, 158, 274, 458, 738, 1160, 1778, 2674, 3948, 5744, 8236, 11670, 16344, 22664, 31126, 42390, 57260, 76790, 102260, 135320, 177976, 232778, 302814, 391972, 504948, 647592, 826956, 1051750, 1332438, 1681856, 2115376, 2651726
Offset: 0

Views

Author

Thomas Wieder, Jul 02 2004

Keywords

Comments

We set A096586(0) = 0.

Examples

			a(5) = 2*43 = 86 because:
11 -> 2, 111 -> 12, 12 -> 3, 1111 -> 112, 112 -> 13, 112 -> 22,
13 -> 22, 13 -> 4, 11111 -> 1112, 1112 -> 122, 1112 -> 113, 122 -> 23,
122 -> 113, 113 -> 23, 113 -> 14, 23 -> 14, 14 -> 5,
0 -> 1,
1 -> 11, 1 -> 2, 11 -> 111, 11 -> 12, 2 -> 12, 2 -> 3, 111 -> 1111,
111 -> 112, 12 -> 112, 12 -> 13, 12 -> 22, 3 -> 13, 3 -> 4,
1111 -> 11111, 1111 -> 1112, 112 -> 1112, 112 -> 113, 112 -> 122,
13 -> 113, 13 -> 14, 13 -> 23, 22 -> 23, 22 -> 122, 4 -> 14, 4 -> 5,
which gives 43 transitions and (counting upwards and downwards transitions) we have 2*43 = 86 = A096586(5).
		

Crossrefs

Programs

  • Mathematica
    (* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) a[0] = 0; a[n_] := Block[{p = Partitions[n + 1], l = PartitionsP[n + 1]}, Sum[ Length[ Union[ p[[k]] ]]^2 - Length[ Union[ p[[k]] ]], {k, l}]]; b = CoefficientList[ Series[1/(1 - x)*Product[1/(1 - x^k), {k, 75}], {x, 0, 45}], x]; f[n_] := Sum[a[k] + 2b[[k]], {k, n}] - 1; Table[ f[n], {n, 36}] (* Robert G. Wilson v, Jul 13 2004 *)

Formula

A096586(n) = Sum_k=0^n A093695(k) + 2 * Sum_l=0^(n-1) A000070(l).

Extensions

More terms from Robert G. Wilson v, Jul 13 2004
Showing 1-9 of 9 results.