login
Number of partitions of n, with two kinds of 1, 2, 3 and 4.
(Formerly M1375 N0535)
12

%I M1375 N0535 #58 May 30 2021 12:59:20

%S 1,2,5,10,20,35,62,102,167,262,407,614,919,1345,1952,2788,3950,5524,

%T 7671,10540,14388,19470,26190,34968,46439,61275,80455,105047,136541,

%U 176593,227460,291673,372605,474085,601105,759380,956249,1200143,1501749,1873407

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

%C Also number of partitions of 2*n+4 with exactly 4 odd parts. - _Vladeta Jovovic_, Jan 12 2005

%C Convolution of A000041 and A001400. - _Vaclav Kotesovec_, Aug 18 2015

%C 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

%D H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.

%D J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Alois P. Heinz, <a href="/A000710/b000710.txt">Table of n, a(n) for n = 0..1000</a>

%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>

%F Euler transform of 2 2 2 2 1 1 1...

%F G.f.: 1/((1-x)(1-x^2)(1-x^3)(1-x^4)*Product_{k>=1} (1-x^k)).

%F a(n) = Sum_{j=0..floor(n/4)} A000098(n-4*j), n >= 0.

%F a(n) ~ sqrt(3)*n * exp(Pi*sqrt(2*n/3)) / (8*Pi^4). - _Vaclav Kotesovec_, Aug 18 2015

%e a(2) = 5 because we have 2, 2', 1+1, 1+1', 1'+1'.

%p 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

%t 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_ *)

%t 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 *)

%t Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@4], {n,0,39}] (* _Robert Price_, Jul 28 2020 *)

%t T[n_, 0] := PartitionsP[n];

%t T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];

%t T[_, _] = 0;

%t a[n_] := T[n + 10, 4];

%t Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, May 30 2021 *)

%Y Cf. A000712.

%Y Cf. A000070, A008951, A000097, A000098.

%Y Fifth column of Riordan triangle A008951 and of triangle A103923.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_

%E Edited by _Emeric Deutsch_, Mar 22 2005