OFFSET
1,2
COMMENTS
Number of unit triangles at n-th stage = 3n(n-1)/2 + 1, A005448.
REFERENCES
Anthony Gardiner, "Mathematical Puzzling," Dover Publications, Inc., Mineola, NY., 1987, page 88.
LINKS
N. J. A. Sloane, Illustration of initial terms
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,2,-2,0,2,-1).
FORMULA
G.f.: (1+x+x^2)(1+2x+x^2+3x^3)/((1-x)^2(1-x^2)(1-x^4)).
a(2n+1) = (7n^3+12n^2+7n+2)/2; a(2n) = (28n^3+6n^2+4n+1+(-1)^(n+1))/8. - Len Smiley, Oct 07 2001
a(n) = (14*n^3+6*n^2+5*n+7+3*(n-1)*(-1)^n-2*((-1)^((2*n-1+(-1)^n)/4)+(-1)^((6*n-1+(-1)^n)/4)))/32. - Luce ETIENNE, Jun 27 2014
EXAMPLE
a(4) = 32: 19 triangles of side 1, 10 of side 2 and 3 of side 3.
MAPLE
A064412:=n->(14*n^3+6*n^2+5*n+7+3*(n-1)*(-1)^n-2*((-1)^((2*n-1+(-1)^n)/4)+(-1)^((6*n-1+(-1)^n)/4)))/32; seq(A064412(n), n=1..30); # Wesley Ivan Hurt, Jun 27 2014
MATHEMATICA
CoefficientList[Series[(1 + x + x^2) (1 + 2 x + x^2 + 3 x^3)/((1 - x)^2 (1 - x^2) (1 - x^4)), {x, 0, 30}], x] (* Wesley Ivan Hurt, Jun 27 2014 *)
LinearRecurrence[{2, 0, -2, 2, -2, 0, 2, -1}, {1, 5, 14, 32, 60, 103, 160, 238}, 50] (* Harvey P. Dale, Apr 12 2016 *)
PROG
(PARI) a(n)=polcoeff(x*(1+x+x^2)*(1+2*x+x^2+3*x^3)/((1-x)^2*(1-x^2)*(1-x^4))+x*O(x^n), n)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert G. Wilson v, Sep 29 2001
STATUS
approved