OFFSET
0,3
COMMENTS
LINKS
Kival Ngaokrajang, Illustration of triflake like fractal (Mitsubishi logo) for n = 0..3
Wikipedia, n-flake
Index entries for linear recurrences with constant coefficients, signature (9,-20,12).
FORMULA
From Colin Barker, Apr 15 2014: (Start)
a(n) = (72-45*2^(1+n)+23*6^n)/180 for n>1.
a(n) = 9*a(n-1)-20*a(n-2)+12*a(n-3) for n>4.
G.f.: -x^2*(2*x^2-3*x+3) / ((x-1)*(2*x-1)*(6*x-1)). (End).
MATHEMATICA
Join[{0, 0}, LinearRecurrence[{9, -20, 12}, {3, 24, 158}, 30]] (* Harvey P. Dale, Jan 31 2015 *)
PROG
(PARI) {a(n)=if(n<=0, 0, if(n<2, 0, if(n<3, 3, 6*a(n-1)+2*2^(n-1)-2)))}
for(n=0, 100, print1(a(n), ", "))
(PARI) concat([0, 0], Vec(-x^2*(2*x^2-3*x+3)/((x-1)*(2*x-1)*(6*x-1)) + O(x^100))) \\ Colin Barker, Apr 15 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kival Ngaokrajang, Apr 14 2014
STATUS
approved