A000710 Number of partitions of n, with two kinds of 1, 2, 3 and 4.
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
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).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- N. J. A. Sloane, Transforms
Crossrefs
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
Comments