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.

Previous Showing 21-22 of 22 results.

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

A026565 a(n) = 6*a(n-2), starting with 1, 3, 9.

Original entry on oeis.org

1, 3, 9, 18, 54, 108, 324, 648, 1944, 3888, 11664, 23328, 69984, 139968, 419904, 839808, 2519424, 5038848, 15116544, 30233088, 90699264, 181398528, 544195584, 1088391168, 3265173504, 6530347008, 19591041024, 39182082048
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [n le 2 select 3^n else 6*Self(n-2): n in [1..35]]; // G. C. Greubel, Dec 17 2021
    
  • Mathematica
    Table[(1/4)*6^(n/2)*(3*(1+(-1)^n) + Sqrt[6]*(1-(-1)^n)) - (1/2)*Boole[n==0], {n, 0, 35}] (* G. C. Greubel, Dec 17 2021 *)
  • Sage
    def A026565(n): return ( (3/2)*6^(n/2) if (n%2==0) else 3*6^((n-1)/2) ) - bool(n==0)/2
    [A026565(n) for n in (0..30)] # G. C. Greubel, Dec 17 2021

Formula

a(n) = Sum_{j=0..2*n} A026552(n, j).
G.f.: (1+3*x+3*x^2)/(1-6*x^2). - Ralf Stephan, Feb 03 2004
a(0)=1, a(1)=3; a(n) = 3*a(n-1) if n is even, a(n) = 2*a(n-1) if n is odd. - Vincenzo Librandi, Nov 19 2010
a(n) = (1/4)*6^(n/2)*(3*(1+(-1)^n) + sqrt(6)*(1-(-1)^n)) - (1/2)*[n=0]. - G. C. Greubel, Dec 17 2021

Extensions

Better name from Ralf Stephan, Jul 17 2013
Previous Showing 21-22 of 22 results.