A026810 Number of partitions of n in which the greatest part is 4.
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
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.
Links
- Washington Bomfim, Table of n, a(n) for n = 0..10000
- Index entries for linear recurrences with constant coefficients, signature (1,1,0,0,-2,0,0,1,1,-1).
Crossrefs
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
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)
Comments