OFFSET
4,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 4..1000
Wikipedia, Partition of a set
Index entries for linear recurrences with constant coefficients, signature (6,-11,6).
FORMULA
G.f.: x^4*(3*x-2)*(2*x^2-15*x+5)/Product_{j=1..3} (j*x-1).
From Colin Barker, May 21 2017: (Start)
G.f.: x^4*(2 - 3*x)*(5 - 15*x + 2*x^2) / ((1 - x)*(1 - 2*x)*(1 - 3*x)).
a(n) = 4 + 2^(n-2) + 3^(n-4) for n>4.
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) for n>7.
(End)
EXAMPLE
a(4) = 10: 1234, 123|4, 12|34, 12|3|4, 13|24, 13|2|4, 1|234, 1|23|4, 1|2|34, 1|2|3|4.
MATHEMATICA
Join[{10}, LinearRecurrence[{6, -11, 6}, {15, 29, 63}, 30]] (* Vincenzo Librandi, Apr 13 2016 *)
PROG
(Magma) I:=[10, 15, 29, 63]; [n le 4 select I[n] else 6*Self(n-1) -11*Self(n-2)+6*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Apr 13 2016
(PARI) Vec(x^4*(2 - 3*x)*(5 - 15*x + 2*x^2) / ((1 - x)*(1 - 2*x)*(1 - 3*x)) + O(x^40)) \\ Colin Barker, May 21 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Apr 13 2016
STATUS
approved