OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
F. Bergeron, M. Bousquet-Mélou and S. Dulucq, Standard paths in the composition poset, Ann. Sci. Math. Quebec, 19 (1995), no. 2, 139-151.
Index entries for linear recurrences with constant coefficients, signature (7,-17,17,-6).
FORMULA
a(n) = n + (7 + 3^(n+1) - 9*2^n)/2, n>0. - R. J. Mathar, Mar 18 2011
E.g.f.: (-1 + (7+2*x)*exp(x) - 9*exp(2*x) + 3*exp(3*x))/2. - G. C. Greubel, Nov 07 2018
MATHEMATICA
Join[{0}, LinearRecurrence[{7, -17, 17, -6}, {0, 1, 11, 57}, 50]] (* G. C. Greubel, Nov 07 2018 *)
PROG
(PARI) concat([0, 0], Vec(x^2*(1+4*x-3*x^2)/((1-x)^2*(1-2*x)*(1-3*x)) + O(x^40))) \\ Michel Marcus, Nov 07 2018
(Magma) I:=[0, 1, 11, 57]; [0] cat [n le 4 select I[n] else 7*Self(n-1) - 17*Self(n-2) +17*Self(n-3) -6*Self(n-4): n in [1..30]]; // G. C. Greubel, Nov 07 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 12 2011
STATUS
approved