OFFSET
4,2
COMMENTS
Old name was: "Number of stacks of n pikelets, distance 5 flips from a well-ordered stack".
LINKS
G. C. Greubel, Table of n, a(n) for n = 4..1000
Index entries for linear recurrences with constant coefficients, signature (6,-15,20,-15,6,-1).
FORMULA
G.f.: x^4*(1+14*x+176*x^2-49*x^3-31*x^4+9*x^5) / (1-x)^6. - Colin Barker, Jun 04 2014
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6). - Wesley Ivan Hurt, Aug 28 2015
E.g.f.: (x^5 -(5/6)*x^4 - (67/6)*x^3 + 75*x^2 - 219*x + 265)*exp(x) + (3/2)*x^3 + (23/2)*x^2 - 46*x - 265. - G. C. Greubel, Aug 29 2015
MAPLE
A028294:=n->n^5 - (65/6)*n^4 + (173/6)*n^3 + (148/3)*n^2 - (862/3)*n + 265: seq(A028294(n), n=4..40); # Wesley Ivan Hurt, Aug 28 2015
MATHEMATICA
CoefficientList[Series[(9*x^5 - 31*x^4 - 49*x^3 + 176*x^2 + 14*x + 1)/(x - 1)^6, {x, 0, 40}], x] (* Wesley Ivan Hurt, Aug 28 2015 *)
Table[n^5 - (65/6) n^4 + (173/6) n^3 + (148/3) n^2 - (862/3)n + 265, {n, 4, 40}] (* Vincenzo Librandi, Aug 29 2015 *)
LinearRecurrence[{6, -15, 20, -15, 6, -1}, {1, 20, 281, 1357, 4281, 10666}, 40] (* Harvey P. Dale, Dec 29 2018 *)
PROG
(PARI) Vec(x^4*(9*x^5-31*x^4-49*x^3+176*x^2+14*x+1)/(x-1)^6 + O(x^100)) \\ Colin Barker, Jun 04 2014
(Magma) [n^5 - (65/6)*n^4 + (173/6)*n^3 + (148/3)*n^2 - (862/3)*n + 265 : n in [4..40]]; // Wesley Ivan Hurt, Aug 28 2015
(Magma) I:=[1, 20, 281, 1357, 4281, 10666]; [n le 6 select I[n] else 6*Self(n-1)-15*Self(n-2)+20*Self(n-3)-15*Self(n-4)+6*Self(n-5)-Self(n-6): n in [1..40]]; // Vincenzo Librandi, Aug 29 2015
(SageMath) [(6*n^5 -65*n^4 +173*n^3 +296*n^2 -1724*n +1590)/6 for n in range(4, 41)] # G. C. Greubel, Jan 03 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from David Wasserman, Jan 22 2005
Entry revised by N. J. A. Sloane, Jun 15 2014
STATUS
approved