OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Ed Pegg Jr., Pancakes
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
From G. C. Greubel, Jan 03 2024: (Start)
a(n) = (n-1)*(n-2)^4 - A028294(n) + 46*[n=1] - 23*[n=2] - 9*[n=3] + [n=4].
a(n) = (11*n^4 + 19*n^3 - 632*n^2 + 2012*n - 1686)/6 + 46*[n=1] - 23*[n=2] - 9*[n=3] + [n=4].
G.f.: x^3*(2 + 38*x + 84*x^2 - 61*x^3 - 32*x^4 + 14*x^5 - x^6)/(1-x)^5.
E.g.f.: (1/6)*(-1686 + 1410*x - 498*x^2 + 85*x^3 + 11*x^4)*exp(x) + 281 + 46*x - 23*x^2/2 - 9*x^3/3! + x^4/4!. (End)
MATHEMATICA
LinearRecurrence[{5, -10, 10, -5, 1}, {0, 0, 2, 48, 304, 999, 2393, 4791, 8542}, 50] (* G. C. Greubel, Jan 03 2024 *)
PROG
(Magma) [0, 0, 2, 48] cat [(11*n^4+19*n^3-632*n^2+2012*n-1686)/6: n in [4..50]]; // G. C. Greubel, Jan 03 2024
(SageMath) [0, 0, 2, 48] + [(11*n^4+19*n^3-632*n^2+2012*n-1686)/6 for n in range(4, 51)] # G. C. Greubel, Jan 03 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Oct 12 2002
EXTENSIONS
More terms from David Wasserman, Jan 22 2005
Name clarified by G. C. Greubel, Jan 03 2024
STATUS
approved