OFFSET
0,2
COMMENTS
Number of partitions of 5*n+12 or 5*n+13 into 5 parts (+-) 3 mod 5. For example, the a(3) = 9 partitions of 27 are: [18,3,2,2,2], [13,8,2,2,2], [17,3,3,2,2], [12,7,3,3,2], [7,7,7,3,3], [13,7,3,2,2], [8,8,7,2,2], [12,8,3,2,2], [8,7,7,3,2]. - Richard Turk, Apr 23 2016
Number of partitions of n into two kinds of parts 1, two kinds of parts 2, and one kind of parts 3. - Joerg Arndt, Apr 24 2016
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,1,-3,-1,1,3,-1,-2,1).
FORMULA
a(n) = floor((n + 1) * (9*(-1)^n + n^3 + 17*n^2 + 95*n + 184)/288 + 1/2). - Tani Akinari, Oct 07 2012
a(n) = 2*a(n-1) + a(n-2) - 3*a(n-3) - a(n-4) + a(n-5) + 3*a(n-6) - a(n-7) - 2*a(n-8) + a(n-9) for n >= 9, with initial values as shown. - Harvey P. Dale, May 20 2013
a(n) = (6*n*(9*((-1)^n + 31) + n*(n*(n + 18) + 112)) + 243*(-1)^n + 128*cos((2*Pi*n)/3) + 1357)/1728. - Ilya Gutkovskiy, Apr 23 2016
a(n) = 1 + 175*n/288 + 47*n^2/144 + n^3/16 + n^4/288 + (9/16 + n/8)*floor(n/2) + 2*floor(n/3)/9 + floor((n+1)/3)/9. - Vaclav Kotesovec, Apr 24 2016
a(n) = a(-9-n) for all n in Z. - Michael Somos, Aug 16 2023
EXAMPLE
G.f. = 1 + 2*x + 5*x^2 + 9*x^3 + 16*x^4 + 25*x^5 + 39*x^6 + ... - Michael Somos, Aug 16 2023
MAPLE
with(combstruct):ZL:=[st, {st=Prod(left, right), left=Set(U, card=r), right=Set(U, card<r), U=Sequence(Z, card>=1)}, unlabeled]: subs(r=5, stack): seq(count(subs(r=3, ZL), size=m), m=3..47) ; # Zerinvary Lajos, Mar 09 2007
MATHEMATICA
CoefficientList[Series[1/((1-x)^2(1-x^2)^2(1-x^3)), {x, 0, 50}], x] (* or *) LinearRecurrence[{2, 1, -3, -1, 1, 3, -1, -2, 1}, {1, 2, 5, 9, 16, 25, 39, 56, 80}, 50] (* Harvey P. Dale, May 20 2013 *)
a[ n_] := Round[(n + 1)*(9*(-1)^n + n^3 + 17*n^2 + 95*n + 184)/288]; (* Michael Somos, Aug 16 2023*)
PROG
(PARI) a(n)=1/576*(2*n^4+36*n^3+224*n^2+558*n+495+(18*n+81)*(-1)^n-64*(if(n%3, 1, 0)))
(PARI) x='x+O('x^99); Vec(1/((1-x)^2*(1-x^2)^2*(1-x^3))) \\ Altug Alkan, Sep 18 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Aug 24 2004
STATUS
approved