OFFSET
5,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 5..1000
Wikipedia, Partition of a set
Index entries for linear recurrences with constant coefficients, signature (10,-35,50,-24).
FORMULA
G.f.: x^5*(24*x^4-460*x^3+599*x^2-241*x+30)/Product_{j=1..4} (j*x-1).
From Colin Barker, Dec 24 2017: (Start)
a(n) = 8 + 13*2^(n-5) + 7*3^(n-5) + 4^(n-5) for n>5.
a(n) = 10*a(n-1) - 35*a(n-2) + 50*a(n-3) - 24*a(n-4) for n>9.
(End)
MATHEMATICA
Join[{30}, LinearRecurrence[{10, -35, 50, -24}, {59, 139, 365, 1039}, 30]] (* Vincenzo Librandi, Apr 13 2016 *)
PROG
(Magma) I:=[30, 59, 139, 365, 1039]; [n le 5 select I[n] else 10*Self(n-1)-35*Self(n-2)+50*Self(n-3)-24*Self(n-4): n in [1..30]]; // Vincenzo Librandi, Apr 13 2016
(PARI) Vec(x^5*(30 - 241*x + 599*x^2 - 460*x^3 + 24*x^4) / ((1 - x)*(1 - 2*x)*(1 - 3*x)*(1 - 4*x)) + O(x^40)) \\ Colin Barker, Dec 24 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Apr 13 2016
STATUS
approved