OFFSET
0,3
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,2,-2,0,2,-1).
FORMULA
G.f.: x^2*(x^2+2)*(x^2+x+1) / ((x-1)^4*(x+1)^2*(x^2+1)).
a(n) = (6*n^3+6*n^2-3*n-5+(3*n+1)*(-1)^n+2*((-1)^((2*n-1+(-1)^n)/4)+(-1)^((2*n+1-(-1)^n)/4)))/32. - Luce ETIENNE, Feb 17 2017
EXAMPLE
For n=3 the 6 partitions of 3*3 = 9 are [1,1,1,6], [1,1,2,5], [1,1,3,4], [1,2,2,4], [1,2,3,3] and [2,2,2,3].
MATHEMATICA
LinearRecurrence[{2, 0, -2, 2, -2, 0, 2, -1}, {0, 0, 2, 6, 15, 27, 47, 72}, 60] (* Harvey P. Dale, Jul 18 2021 *)
PROG
(PARI) concat(0, vector(40, n, k=0; forpart(p=3*n, k++, , [4, 4]); k))
(PARI) concat([0, 0], Vec(x^2*(x^2+2)*(x^2+x+1)/((x-1)^4*(x+1)^2*(x^2+1)) + O(x^100)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Mar 23 2015
STATUS
approved