OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
J. Riordan, Enumeration of trees by height and diameter, IBM J. Res. Dev. 4 (1960), 473-478.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (n^3 + 9n^2 + 8n - 24)/6. - Ralf Stephan, Feb 15 2004
From Colin Barker, Sep 09 2012: (Start)
a(n) = 4*a(n-1) -6*a(n-2) +4*a(n-3) -a(n-4).
G.f.: x*(-1 +10*x -12*x^2 +4*x^3)/(1- x)^4. (End)
MATHEMATICA
Table[(n^3 + 9n^2 + 8n - 24)/6, {n, 1, 60}] (* Vincenzo Librandi, Sep 09 2012 *)
LinearRecurrence[{4, -6, 4, -1}, {-1, 6, 18, 36}, 50] (* Harvey P. Dale, Aug 10 2023 *)
PROG
(Magma) [(n^3 + 9*n^2 + 8*n - 24)/6: n in [1..40]] // Vincenzo Librandi, Sep 09 2012
(PARI) for(n=1, 50, print1((n^3+9*n^2+8*n-24)/6, ", ")) \\ G. C. Greubel, Feb 22 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
STATUS
approved