OFFSET
0,3
COMMENTS
This sequence counts partially ordered partitions of (n) into parts (1,2,3,4) where the position (order) of 3's is unimportant.
LINKS
Robert Israel, Table of n, a(n) for n = 0..4090
Index entries for linear recurrences with constant coefficients, signature (1,1,1,0,-1,0,-1).
FORMULA
a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-5) - a(n-7).
G.f.: 1 / ((x-1)*(x+1)*(x^2+x+1)*(x^3-x^2+2*x-1)). - Colin Barker, May 17 2015
EXAMPLE
a(6)=22; these are (42),(24),(411),(141),(114),(33),(321=231=213),(312=132=123),(3111=1311=1131=1113),(222),(2211),(1122),(1221),(2112),(2121),(1212),(21111),(12111),(11211),(11121),(11112),(111111).
MAPLE
f:= gfun:-rectoproc({a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-5) - a(n-7), seq(a(i)=[1, 1, 2, 4, 7, 12, 22][i+1], i=0..6)}, a(n), remember):
map(f, [$0..50]); # Robert Israel, Apr 26 2017
MATHEMATICA
LinearRecurrence[{1, 1, 1, 0, -1, 0, -1}, {1, 1, 2, 4, 7, 12, 22}, 39] (* Robert P. P. McKone, Feb 08 2021 *)
PROG
(PARI) Vec(1/((x-1)*(x+1)*(x^2+x+1)*(x^3-x^2+2*x-1)) + O(x^100)) \\ Colin Barker, May 17 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Neil McGrath, May 13 2015
STATUS
approved