login
A034857
a(n) = C(n+2,3) + 2*C(n,2) + 2*(n-2).
2
-1, 6, 18, 36, 61, 94, 136, 188, 251, 326, 414, 516, 633, 766, 916, 1084, 1271, 1478, 1706, 1956, 2229, 2526, 2848, 3196, 3571, 3974, 4406, 4868, 5361, 5886, 6444, 7036, 7663, 8326, 9026, 9764, 10541, 11358, 12216, 13116, 14059, 15046, 16078, 17156, 18281, 19454, 20676
OFFSET
1,2
LINKS
J. Riordan, Enumeration of trees by height and diameter, IBM J. Res. Dev. 4 (1960), 473-478.
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
Sequence in context: A069958 A028896 A295026 * A372847 A116367 A225384
KEYWORD
sign,easy
STATUS
approved