OFFSET
0,3
COMMENTS
This sequence counts partially ordered partitions of (n) into parts (1,2,3,4) in which only the position (order) of the 1's are important. The 1's behave as placeholders for unordered 2's,3's and 4's.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,1,1,1,-1,-1,-1,0,1)
FORMULA
a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7) + a(n-9)
G.f.: 1/(1-x-x^2-x^3-x^4+x^5+x^6+x^7-x^9).
EXAMPLE
a(6)=26; these are (42,24=one),(411),(141),(114),(33),(321,231=one),(123,132=one),(312),(213),(3111=four),(222),(2211),(1122),(2112),(1221),(1212),(2121),(21111=five),(111111).
MATHEMATICA
LinearRecurrence[{1, 1, 1, 1, -1, -1, -1, 0, 1}, {1, 1, 2, 4, 8, 14, 26, 48, 89}, 50] (* Vincenzo Librandi, May 19 2015 *)
PROG
(PARI) Vec(1/(-x^9+x^7+x^6+x^5-x^4-x^3-x^2-x+1) + O(x^100)) \\ Colin Barker, May 17 2015
(Magma) I:=[1, 1, 2, 4, 8, 14, 26, 48, 89]; [n le 9 select I[n] else Self(n-1)+Self(n-2)+Self(n-3)+Self(n-4)-Self(n-5)-Self(n-6)-Self(n-7)+Self(n-9): n in [1..40]]; // Vincenzo Librandi, May 19 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Neil McGrath, May 16 2015
EXTENSIONS
More terms from Vincenzo Librandi, May 19 2015
STATUS
approved