OFFSET
0,1
COMMENTS
The even terms are the number of holes of SierpiĆski triangle-like fractals. The odd terms are the total number of holes and triangles. - Kival Ngaokrajang, Mar 30 2014
All terms are divisible by 3 (see g.f.). - Joerg Arndt, Dec 20 2014
Former title a(n) = Sum_{j=0..2*n} Sum_{k=0..j} A026536(j, k) was incorrect. - G. C. Greubel, Apr 12 2022
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Kival Ngaokrajang, Illustration of initial terms
Index entries for linear recurrences with constant coefficients, signature (1, 6, -6).
FORMULA
G.f.: 3*(1+2*x-2*x^2)/((1-x)*(1-6*x^2)). - Ralf Stephan, Feb 03 2004
From G. C. Greubel, Apr 12 2022: (Start)
a(n) = (3/5)*( -1 + 3*6^(n/2)*(1 + (-1)^n) + 8*6^((n-1)/2)*(1 - (-1)^n) ).
a(2*n) = (3/5)*(6^(n+1) - 1).
a(2*n+1) = (3/5)*(16*6^n -1).
a(n) = a(n-1) + 6*a(n-2) - a(n-3). (End)
MATHEMATICA
Table[(3/5)*(-1 +3*6^(n/2)*(1+(-1)^n) +8*6^((n-1)/2)*(1-(-1)^n)), {n, 0, 40}] (* G. C. Greubel, Apr 12 2022 *)
PROG
(PARI) Vec( 3*(1+2*x-2*x^2)/((1-x)*(1-6*x^2))+O(x^33)); \\ Joerg Arndt, Dec 20 2014
(Magma) [(3/5)*(-1 + 6^(1+Floor(n/2))*((n+1) mod 2) + 16*6^(Floor((n-1)/2))*(n mod 2)): n in [0..40]]; // G. C. Greubel, Apr 12 2022
(SageMath) [(3/5)*(-1 + 6*6^(n/2)*((n+1)%2) + 16*6^((n-1)/2)*(n%2)) for n in (0..40)] # G. C. Greubel, Apr 12 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Name corrected by G. C. Greubel, Apr 12 2022
STATUS
approved