OFFSET
0,1
COMMENTS
For n >= 2, a(n) is the number of ways a triangle with side length n-1 can be completely surrounded by diamonds. See illustrations in Links. - Craig Knecht, Oct 08 2024
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000
Craig Knecht, The 110 ways the T2 triangle can be surrounded by diamonds.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = n^3 + 6*n^2 + 9*n + 2.
G.f.: 2*(1 + 5*x - 4*x^2 + x^3)/(1-x)^4. - Colin Barker, Jan 10 2012
a(n) = (n + 2)*(n^2 + 4*n + 1) = 2*A154560(n). - Bruno Berselli, Jan 10 2015
E.g.f.: (2 + 16*x + 9*x^2 + x^3)*exp(x). - G. C. Greubel, Nov 29 2018
MAPLE
seq(sum(n^2-3, k=1..n), n=2..40); # Zerinvary Lajos, Jan 28 2008
seq ((n^3)-3*n, n=2..40); # Zerinvary Lajos, Jun 17 2008
MATHEMATICA
LinearRecurrence[{4, -6, 4, -1}, {2, 18, 52, 110}, 40] (* Vladimir Joseph Stephan Orlovsky, Jan 15 2009 *)
Table[n^3 + 6 n^2 + 9 n + 2, {n, 0, 40}] (* Bruno Berselli, Jan 10 2015 *)
PROG
(Magma) [n^3+6*n^2+9*n+2: n in [0..40]]; // Vincenzo Librandi, Sep 22 2016
(PARI) vector(40, n, n--; n^3+6*n^2+9*n+2) \\ G. C. Greubel, Nov 29 2018
(Sage) [(n^3+6*n^2+9*n+2) for n in range(40)] # G. C. Greubel, Nov 29 2018
(GAP) List([0..40], n -> n^3+6*n^2+9*n+2); # G. C. Greubel, Nov 29 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Christian G. Bower, Dec 02 2000
STATUS
approved