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.

Showing 1-4 of 4 results.

A100477 a(n) = 3*a(n-1) + 2*a(n-2) + a(n-3) if n>=3, otherwise a(n) = n.

Original entry on oeis.org

0, 1, 2, 8, 29, 105, 381, 1382, 5013, 18184, 65960, 239261, 867887, 3148143, 11419464, 41422565, 150254766, 545028892, 1977018773, 7171368869, 26013173045, 94359275646, 342275541897, 1241558350028, 4503585409524
Offset: 0

Views

Author

gamo (gamo(AT)telecable.es), Nov 22 2004

Keywords

Comments

Weighted sum of the three previous terms.
a(n+1) is the number of ways to tile a strip of length n with 3 colors of squares, 2 colors of dominos, and 1 color of tromino, with the restriction that if the first tile is a square, then it can only use two colors. - Greg Dresden and Bora Bursali, Aug 17 2023

Crossrefs

Cf. A108153.

Programs

  • Magma
    [n le 3 select n-1 else 3*Self(n-1)+2*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, May 20 2015
    
  • Mathematica
    RecurrenceTable[{a[n]== 3a[n-1] +2a[n-2] +a[n-3], a[0]==0, a[1]==1, a[2]==2}, a, {n,0,26}] (* or *)
    CoefficientList[ Series[(x^2-x)/(x^3+2x^2+3x-1), {x,0,26}], x] (* Robert G. Wilson v, May 19 2015 *)
    LinearRecurrence[{3,2,1},{0,1,2},40] (* Harvey P. Dale, Jun 19 2015 *)
  • Perl
    #!/usr/local/bin/perl -w $d=0; $c=1; $b=2; print "$d,$c,$b,"; $a=0; for (;;){ $a=3*$b+2*$c+$d; $d=$c; $c=$b; $b=$a; print "$a,"; last if ($a >2**61); } _END_
    
  • SageMath
    @CachedFunction
    def a(n): # a = A100477
        if (n<3): return n
        else: return 3*a(n-1)+2*a(n-2)+a(n-3)
    [a(n) for n in range(41)] # G. C. Greubel, Apr 06 2023

Formula

From R. J. Mathar, Aug 22 2008: (Start)
O.g.f.: x*(1-x)/(1-3*x-2*x^2-x^3).
a(n) = A108153(n) - A108153(n-1). (End)
a(0)=0, a(1)=1, a(2)=2, a(n)=3*a(n-1)+2*a(n-2)+a(n-3). - Harvey P. Dale, Jun 19 2015

A010911 Pisot sequence E(3,11), a(n) = floor(a(n-1)^2/a(n-2) + 1/2).

Original entry on oeis.org

3, 11, 40, 145, 526, 1908, 6921, 25105, 91065, 330326, 1198213, 4346356, 15765820, 57188385, 207443151, 752472043, 2729490816, 9900859685, 35914032730, 130273308376, 472548850273, 1714107200301, 6217692609825, 22553841080350, 81811015661001, 296758421753528
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A108153.

Programs

  • Mathematica
    LinearRecurrence[{3, 2, 1}, {3, 11, 40}, 30] (* Jean-François Alcover, Oct 05 2018 *)
  • PARI
    x='x+O('x^33); Vec((3+2*x+x^2)/(1-3*x-2*x^2-x^3)) \\ Altug Alkan, Oct 05 2018

Formula

Is it true that a(n+3)=3*a(n+2)+2*a(n+1)+a(n)? - Claude Lenormand (claude.lenormand(AT)free.fr), Dec 05 2001
Empirical g.f.: (3+2*x+x^2) / (1-3*x-2*x^2-x^3). - Colin Barker, Jun 05 2016
Theorem: a(n) = 3 a(n - 1) + 2 a(n - 2) + a(n - 3) for n>=3. Proved using the PtoRv program of Ekhad-Sloane-Zeilberger, and implies the above conjectures. - N. J. A. Sloane, Sep 09 2016
a(n) = A108153(n+2). - Jinyuan Wang, Mar 10 2020

A108136 a(1)=1; a(2)=1; a(3)=1; a(n) = 3*a(n-1) + 2*a(n-2) + a(n-3).

Original entry on oeis.org

1, 1, 1, 6, 21, 76, 276, 1001, 3631, 13171, 47776, 173301, 628626, 2280256, 8271321, 30003101, 108832201, 394774126, 1431989881, 5194350096, 18841804176, 68346102601, 247916266251, 899282808131, 3262027059496, 11832563061001
Offset: 1

Views

Author

Roger L. Bagula, Jun 05 2005

Keywords

Comments

Length of steps in the 3-symbol substitution 1->{2}, 2->{3}, 3->{1,2,2,3,3,3} with characteristic polynomial: x^3 - 3*x^2 - 2*x - 1.
No term is divisible by 5. - Vladimir Joseph Stephan Orlovsky, Mar 24 2011

Programs

  • Mathematica
    LinearRecurrence[{3, 2, 1}, {1, 1, 1}, 30]

Formula

From R. J. Mathar, Oct 14 2008: (Start)
G.f.: x*(1 - 2*x - 4*x^2)/(1 - 3*x - 2*x^2 - x^3).
a(n) = A108153(n) - 2*A108153(n-1) - 4*A108153(n-2). (End)

A108152 a(n)= 3*a(n-1) +2*a(n-2) +a(n-3).

Original entry on oeis.org

1, 0, 2, 7, 25, 91, 330, 1197, 4342, 15750, 57131, 207235, 751717, 2726752, 9890925, 35877996, 130142590, 472074687, 1712387237, 6211453675, 22531210186, 81728925145, 296460649482, 1075371008922, 3900763250875, 14149492419951
Offset: 0

Views

Author

Roger L. Bagula, Jun 06 2005

Keywords

Crossrefs

Programs

  • Mathematica
    M = {{0, 1, 0}, {0, 0, 1}, {1, 2, 3}} a3 = Table[MatrixPower[M, i][[1, 2]], {i, 1, 50}]
    LinearRecurrence[{3,2,1},{1,0,2},30] (* Harvey P. Dale, Jun 06 2016 *)

Formula

G.f.: (-1+3*x)/(-1+3*x+2*x^2+x^3). [Sep 28 2009]
a(n) = A108153(n+1) -3*A108153(n). [Sep 28 2009]

Extensions

Definition replaced by recurrence by the Associate Editors of the OEIS, Sep 28 2009
Showing 1-4 of 4 results.