OFFSET
1,5
COMMENTS
Total number of hexagons after n iterations is A179178. See illustration.
LINKS
Kival Ngaokrajang, Illustration of initial terms
Index entries for linear recurrences with constant coefficients, signature (2, 0, -2, 1).
FORMULA
Conjectures from Colin Barker, Jan 03 2015: (Start)
a(n) = (27 - 3*(-1)^n - 28*n + 6*n^2)/8 for n>5.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>6.
G.f.: -x^4*(2*x^5 - 4*x^4 + 3*x^2 + x + 1) / ((x-1)^3*(x+1)).
(End)
MATHEMATICA
LinearRecurrence[{2, 0, -2, 1}, {0, 0, 0, 1, 3, 9, 16, 23, 33}, 60] (* Harvey P. Dale, Oct 30 2015 *)
PROG
(PARI)
{
a=1; d1=0; print1("0, 0, 0, 1", ", ");
for(n=4, 100,
if(n<5, d1=2,
if(n<6, d1=6,
if(n<7, d1=7,
if(Mod(n, 2)==0, d1=d1+3
)
)
)
);
a=a+d1;
print1(a, ", ")
)
}
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
Kival Ngaokrajang, Jan 03 2015
STATUS
approved