cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A026551 Expansion of 3*(1+2*x-2*x^2)/((1-x)*(1-6*x^2)).

Original entry on oeis.org

3, 9, 21, 57, 129, 345, 777, 2073, 4665, 12441, 27993, 74649, 167961, 447897, 1007769, 2687385, 6046617, 16124313, 36279705, 96745881, 217678233, 580475289, 1306069401, 3482851737, 7836416409, 20897110425, 47018498457
Offset: 0

Views

Author

Keywords

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

Crossrefs

Programs

  • 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
    
  • 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 *)
  • PARI
    Vec( 3*(1+2*x-2*x^2)/((1-x)*(1-6*x^2))+O(x^33)); \\ Joerg Arndt, Dec 20 2014
    
  • 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

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)

Extensions

Name corrected by G. C. Greubel, Apr 12 2022