OFFSET
0,3
COMMENTS
At stage n, we count (6*n^2-6*n+5-3*(2*n-1)*(-1)^n)/8 unit up-pointing triangles and 3*(2*n^2-2*n+1+(2*n-1)*(-1)^n)/8 unit down-pointing triangles.
At stage n, the total number of unit triangles is (3*n^2-3*n+2)/2 = A005448(n). It is the same total as for A064412. Note also that A064412 gives number of triangles in a geometrical structure according to expansion side-side (mode S-S).
The edges of several unit triangles can form larger size triangles, and these are also up- or down-pointing. The number of all such larger is given by :(14*n^3-9*n^2+11*n+18-(9*n^2+3*n+14)*(-1)^n-4*((-1)^((2*n+1-(-1)^n)/4)))/64 up-pointing triangles and (14*n^3-15*n^2+35*n-6+(9*n^2+21*n+2)*(-1)^n+4*((-1)^((2*n-1+(-1)^n)/4)))/64 down-pointing triangles.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Luce ETIENNE, Illustration of initial terms
Kival Ngaokrajang, Illustration of triangles expansion
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,2,-2,0,2,-1).
FORMULA
a(n) = (7*n^3-3*n^2+4*n)/2 for n even.
a(n) = (28*n^3+30*n^2+16*n+7+(-1)^n)/8 for n odd.
a(n) = (14*n^3-12*n^2+23*n+6+3*(3*n-2)*(-1)^n+2*((-1)^((2*n-1+(-1)^n)/4)-(-1)^((6*n-1+(-1)^n)/4)))/32.
G.f.: x*(1+2*x+2*x^2+8*x^3+2*x^4+5*x^5+x^6) / ((1-x)^4*(1+x)^2*(1+x^2)). - Colin Barker, Feb 24 2016
EXAMPLE
a(0)= 0, a(1) = 1, a(2) = 4, a(3) = 7+3 = 10, a(4) = 19 + 6 + 1 = 26, a(5) = 31 + 12 + 4 + 1 = 48.
MATHEMATICA
Table[(14 n^3 - 12 n^2 + 23 n + 6 + 3 (3 n - 2) (-1)^n + 2 ((-1)^((2*n - 1 + (-1)^n) / 4) - (-1)^((6 n - 1 + (-1)^n) / 4))) / 32, {n, 0, 45}] (* Vincenzo Librandi, Feb 19 2016 *)
PROG
(Magma) [(14*n^3-12*n^2+23*n+6+3*(3*n-2)*(-1)^n+2*((-1)^((2*n-1+(-1)^n) div 4)-(-1)^((6*n-1+(-1)^n) div 4)))/32: n in [0..50]]; // Vincenzo Librandi, Feb 19 2016
(PARI) concat(0, Vec(x*(1+2*x+2*x^2+8*x^3+2*x^4+5*x^5+x^6)/((1-x)^4*(1+x)^2*(1+x^2)) + O(x^50))) \\ Colin Barker, Feb 24 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Luce ETIENNE, Feb 18 2016
STATUS
approved