OFFSET
1,2
COMMENTS
This sequence in related to A095794 by a(n) = n*A095794(n) - Sum_{i=1..n-1} A095794(i), for n > 1. - Bruno Berselli, Dec 28 2010
a(n) is the area of a triangle with vertices at points (n-1,(n-1)^2), (n,n^2), and ((n+1)^2,n+1). - J. M. Bergot, Jun 03 2014
Old name was: "Number of stacks of n pikelets, distance 3 flips from a well-ordered stack".
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: x*(1+7*x-3*x^2+x^3)/(1-x)^4. Also, a(n) = 2*A002411(n) - 1 = A000578(n-1) + A001107(n). - Bruno Berselli, Dec 28 2010
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 4. - Wesley Ivan Hurt, Oct 08 2017
E.g.f.: 1 + (-1 + 2*x + 4*x^2 + x^3)*exp(x). - G. C. Greubel, Jan 03 2024
MAPLE
MATHEMATICA
Table[n^3+n^2-1, {n, 100}] (* Vladimir Joseph Stephan Orlovsky, Mar 09 2011 *)
CoefficientList[Series[(1 + 7 x - 3 x^2 + x^3)/(1-x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, Jun 20 2013 *)
LinearRecurrence[{4, -6, 4, -1}, {1, 11, 35, 79}, 50] (* Harvey P. Dale, Jul 20 2024 *)
PROG
(Magma) [(n^3+n^2-1): n in [1..50]]; // Vincenzo Librandi, Apr 06 2011
(PARI) a(n)=n^3+n^2-1 \\ Charles R Greathouse IV, Oct 07 2015
(SageMath) [n^3+n^2-1 for n in range(1, 51)] # G. C. Greubel, Jan 03 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 14 1998
EXTENSIONS
More terms from Wesley Ivan Hurt, Jun 04 2014
Entry revised by N. J. A. Sloane, Jun 15 2014
STATUS
approved