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-5 of 5 results.

A001590 Tribonacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) with a(0)=0, a(1)=1, a(2)=0.

Original entry on oeis.org

0, 1, 0, 1, 2, 3, 6, 11, 20, 37, 68, 125, 230, 423, 778, 1431, 2632, 4841, 8904, 16377, 30122, 55403, 101902, 187427, 344732, 634061, 1166220, 2145013, 3945294, 7256527, 13346834, 24548655, 45152016, 83047505, 152748176, 280947697, 516743378, 950439251
Offset: 0

Views

Author

Keywords

Comments

The name "tribonacci number" is less well-defined than "Fibonacci number". The sequence A000073 (which begins 0, 0, 1) is probably the most important version, but the name has also been applied to A000213, A001590, and A081172. - N. J. A. Sloane, Jul 25 2024
Dimensions of the homogeneous components of the higher order peak algebra associated to cubic roots of unity (Hilbert series = 1 + 1*t + 2*t^2 + 3*t^3 + 6*t^4 + 11*t^5 ...). - Jean-Yves Thibon (jyt(AT)univ-mlv.fr), Oct 22 2006
Starting with offset 3: (1, 2, 3, 6, 11, 10, 37, ...) = row sums of triangle A145579. - Gary W. Adamson, Oct 13 2008
Starting (1, 2, 3, 6, 11, ...) = INVERT transform of the periodic sequence (1, 1, 0, 1, 1, 0, 1, 1, 0, ...). - Gary W. Adamson, May 04 2009
The comment of May 04 2009 is equivalent to: The numbers of ordered compositions of n using integers that are not multiples of 3 is equal to a(n+2) for n>=1, see [Hoggatt-Bicknell (1975) eq (2.7)]. - Gary W. Adamson, May 13 2013
Primes in the sequence are 2, 3, 11, 37, 634061, 7256527, ... in A231574. - R. J. Mathar, Aug 09 2012
Pisano period lengths: 1, 2, 13, 8, 31, 26, 48, 16, 39, 62,110,104,168, 48,403, 32, 96, 78, 360, 248, ... . - R. J. Mathar, Aug 10 2012
a(n+1) is the top left entry of the n-th power of any of 3 X 3 matrices [0, 1, 0; 1, 1, 1; 1, 0, 0], [0, 1, 1; 1, 1, 0; 0, 1, 0], [0, 1, 1; 0, 0, 1; 1, 0, 1] or [0, 0, 1; 1, 0, 0; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
a(n+3) equals the number of n-length binary words avoiding runs of zeros of lengths 3i+2, (i=0,1,2,...). - Milan Janjic, Feb 26 2015
Sums of pairs of successive terms of A000073. - N. J. A. Sloane, Oct 30 2016
The power Q^n, for n >= 0, of the tribonacci Q-matrix Q = matrix([1, 1, 1], [1, 0, 0], [0, 1, 0]) is, by the Cayley-Hamilton theorem, Q^n = matrix([a(n+2), a(n+1) + a(n), a(n+1)], [a(n+1), a(n) + a(n-1), a(n)], [a(n), a(n-1) + a(n-2), a(n-1)]), with a(-2) = -1 and a(-1) = 1. One can use a(n) = a(n-1) + a(n-2) + a(n-3) in order to obtain a(-1) and a(-2). - Wolfdieter Lang, Aug 13 2018
a(n+2) is the number of entries n, for n>=1, in the sequence {A278038(k)}A278038(0)%20=%201).%20-%20_Wolfdieter%20Lang">{k>=1} (without A278038(0) = 1). - _Wolfdieter Lang, Sep 11 2018
In terms of the tribonacci numbers T(n) = A000073(n) the nonnegative powers of the Q-matrix (from the Aug 13 2018 comment) are Q^n = T(n)*Q^2 + (T(n-1) + T(n-2))*Q + T(n-1)*1_3, for n >= 0, with T(-1) = 1, T(-2) = -1. This is equivalent to the powers t^n of the tribonacci constant t = A058255 (or also for powers of the complex solutions). - Wolfdieter Lang, Oct 24 2018

Examples

			a(12)=a(11)+a(10)+a(9): 230=125+68+37.
For n=5 the partitions of 5 are 1+1+1+1+1 (1 composition), 1+1+1+2 (4 compositions), 1+2+2 (3 compositions), 1+1+3 (not contrib because 3 is a part), 2+3 (no contrib because 3 is a part), 1+4 (2 compositions) and 5 (1 composition), total 1+4+3+2+1=11 =a(5+2) - _R. J. Mathar_, Jan 13 2023
		

References

  • Kenneth Edwards and Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    a:=[0,1,0];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # Muniru A Asiru, Oct 24 2018
  • Magma
    I:=[0,1,0]; [n le 3 select I[n]  else Self(n-1)+Self(n-2)+Self(n-3): n in [1..40]]; // Vincenzo Librandi, Apr 19 2018
    
  • Maple
    seq(coeff(series(x*(1-x)/(1-x-x^2-x^3),x,n+1), x, n), n = 0 .. 40); # Muniru A Asiru, Oct 24 2018
    # alternative
    A001590 := proc(n)
        option remember;
        if n <=2 then
            op(n+1,[0,1,0]) ;
        else
            procname(n-1)+procname(n-2)+procname(n-3) ;
        end if;
    end proc:
    seq(A001590(n),n=0..30) ;# R. J. Mathar, Nov 22 2024
  • Mathematica
    LinearRecurrence[{1,1,1}, {0,1,0}, 50] (* Vladimir Joseph Stephan Orlovsky, Jan 28 2012 *)
    RecurrenceTable[{a[0]==0, a[1]==1, a[2]==0, a[n]==a[n-1]+a[n-2]+a[n-3]}, a, {n, 40}] (* Vincenzo Librandi, Apr 19 2018 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; 1,1,1]^n*[0;1;0])[1,1] \\ Charles R Greathouse IV, Jul 28 2015
    
  • Sage
    def A001590():
        W = [0, 1, 0]
        while True:
            yield W[0]
            W.append(sum(W))
            W.pop(0)
    a = A001590(); [next(a) for  in range(38)]  # _Peter Luschny, Sep 12 2016
    

Formula

G.f.: x*(1-x)/(1-x-x^2-x^3).
Limit a(n)/a(n-1) = t where t is the real solution of t^3 = 1 + t + t^2, t = A058265 = 1.839286755... . If T(n) = A000073(n) then t^n = T(n-1) + a(n)*t + T(n)*t^2, for n >= 0, with T(-1) = 1.
a(3*n) = Sum_{k+l+m=n} (n!/k!l!m!)*a(l+2*m). Example: a(12)=a(8)+4a(7)+10a(6)+16a(5)+19a(4)+16a(3)+10a(2)+4a(1)+a(0) The coefficients are the trinomial coefficients. T(n) and T(n-1) also satisfy this equation. (T(-1)=1)
From Reinhard Zumkeller, May 22 2006: (Start)
a(n) = A000073(n+1)-A000073(n);
a(n) = A000073(n-1)+A000073(n-2) for n>1;
A000213(n-2) = a(n+1)-a(n) for n>1. (End)
a(n) + a(n+1) = A000213(n). - Philippe Deléham, Sep 25 2006
If p[1]=0, p[i]=2, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n+1)=det A. - Milan Janjic, May 02 2010
For n>=4, a(n)=2*a(n-1)-a(n-4). - Bob Selcoe, Feb 18 2014
a(-1-n) = -A078046(n). - Michael Somos, Jun 01 2014
a(n) = Sum_{r root of x^3-x^2-x-1} r^n/(3*r+1). - Fabian Pereyra, Nov 22 2024

Extensions

Additional comments from Miklos Kristof, Jul 03 2002

A027052 Triangular array T read by rows: T(n,0) = T(n,2n) = 1 for n >= 0, T(n,1)=0 for n >= 1, T(n,2)=1 for n >= 2 and for n >= 3, T(n,k) = T(n-1,k-3) + T(n-1, k-2) + T(n-1,k-1) for 3 <= k <= 2n-1. T(n,k)=0 for k < 0 or k > 2n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 3, 4, 1, 1, 0, 1, 2, 3, 6, 9, 8, 1, 1, 0, 1, 2, 3, 6, 11, 18, 23, 18, 1, 1, 0, 1, 2, 3, 6, 11, 20, 35, 52, 59, 42, 1, 1, 0, 1, 2, 3, 6, 11, 20, 37, 66, 107, 146, 153, 102, 1, 1, 0, 1, 2, 3, 6, 11, 20, 37, 68, 123, 210, 319, 406, 401, 256, 1
Offset: 0

Views

Author

Keywords

Comments

The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446. - Jeremy Gardiner, Mar 16 2003

Examples

			Triangle T(n,k) for 0 <= k <= 2n:
  1;
  1, 0, 1;
  1, 0, 1, 2, 1;
  1, 0, 1, 2, 3, 4, 1;
  1, 0, 1, 2, 3, 6, 9, 8, 1;
		

Crossrefs

Cf. A001590, a tribonacci sequence.
Cf. A160999 (row sums), A005408 (row lengths).
Diagonals T(n, n+c): A027053 (c=2), A027054 (c=3), A027055 (c=4).
Diagonals T(n, 2n-c): A027056 (c=1), A027058 (c=2), A027059 (c=3), A027060 (c=4), A027061(c=5), A027062 (c=6), A027063 (c=7), A027064 (c=8), A027065 (c=9), A027066 (c=10).
Other related sequences: A027057, A027071.
Other arrays of this type: A027023, A027082, A027113.

Programs

  • GAP
    T:= function(n,k)
        if k=0 or k=2 or k=2*n then return 1;
        elif k=1 then return 0;
        else return Sum([1..3], j-> T(n-1, k-j) );
        fi;
      end;
    Flat(List([0..10], n-> List([0..2*n], k-> T(n,k) ))); # G. C. Greubel, Nov 05 2019
  • Maple
    T:= proc(n, k) option remember;
          if k=0 or k=2 or k=2*n then 1
        elif k=1 then 0
        else add(T(n-1, k-j), j=1..3)
          fi
        end:
    seq(seq(T(n, k), k=0..2*n), n=0..10); # G. C. Greubel, Nov 05 2019
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 || k==2 || k==2*n, 1, If[k==1, 0, Sum[T[n-1, k-j], {j, 3}]]]; Table[T[n, k], {n, 0, 12}, {k, 0, 2*n}]//Flatten (* G. C. Greubel, Nov 05 2019 *)
  • PARI
    {T(n, k) = if(k==0 || k==2 || k==2*n, 1, if(k==1, 0, sum(j=1,3, T(n-1, k-j)) ))};
    for(n=0, 10, for(k=0,2*n, print1(T(n,k), ", "))) \\ G. C. Greubel, Nov 05 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==0 or k==2 or k==2*n): return 1
        elif (k==1): return 0
        else: return sum(T(n-1, k-j) for j in (1..3))
    [[T(n, k) for k in (0..2*n)] for n in (0..10)] # G. C. Greubel, Nov 05 2019
    

Formula

A001590(k+1) = T(n,k) if 0 <= k <= n. - Michael Somos, Jun 01 2014

Extensions

Offset and keyword:tabl corrected by R. J. Mathar, Jun 01 2009

A308359 Triangle T(n,w) read by rows: the number of fixed polyominoes with n cells and width w of the convex hull.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 9, 8, 1, 1, 18, 31, 12, 1, 1, 35, 95, 68, 16, 1, 1, 66, 269, 282, 121, 20, 1, 1, 123, 721, 1027, 638, 190, 24, 1, 1, 228, 1866, 3468, 2817, 1226, 275, 28, 1, 1, 421, 4728, 11132, 11254, 6391, 2110, 376, 32, 1, 1, 776, 11804, 34558, 42099, 29388, 12758, 3354, 493, 36, 1
Offset: 1

Views

Author

R. J. Mathar, May 22 2019

Keywords

Comments

The sequence counts the fixed n-ominoes with prescribed bounding box width w and variable height w <= h <= n.

Examples

			T(3,2) = 4 counts the 4 variants of the L-shaped tromino rotated by multiples of 90 degrees. T(4,2) = 9 counts one O-tetromino in a 2 X 2 box, 4 L-tetrominoes in a 3 X 2 box, 2 T-tetromoes in a 3 X 2 box, and 2 Z-tetrominoes in a 3 X 2 box.
The triangle starts
  1;
  1,   1;
  1,   4,   1;
  1,   9,   8,   1;
  1,  18,  31,  12,   1;
  1,  35,  95,  68,  16,   1;
  1,  66, 269, 282, 121,  20,   1;
		

Crossrefs

Cf. A027053 (column w=2), A335606 (w=3), A001168 (row sums), A273895, A292357 (prescribed w and h).

Formula

T(n,1) = T(n,n) = 1 (the straight n-ominoes).
T(n,n-1) = 4*n-8 for n >= 3 (width n-1 and height 2).
Conjecture: T(n,n-2) = 8*n^2 - 51*n + 86 for n >= 5.

A027024 a(n) = T(n,n+2), T given by A027023.

Original entry on oeis.org

1, 5, 13, 27, 53, 101, 189, 351, 649, 1197, 2205, 4059, 7469, 13741, 25277, 46495, 85521, 157301, 289325, 532155, 978789, 1800277, 3311229, 6090303, 11201817, 20603357, 37895485, 69700667, 128199517, 235795677, 433695869
Offset: 2

Views

Author

Keywords

Crossrefs

Pairwise sums of A027053.

Programs

  • GAP
    a:=[1,5,13,27];; for n in [5..35] do a[n]:=2*a[n-1]-a[n-4]; od; a; # G. C. Greubel, Nov 04 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 35); Coefficients(R!( x^2*(1+x)^3/((1-x)*(1-x-x^2-x^3)) )); // G. C. Greubel, Nov 04 2019
    
  • Maple
    seq(coeff(series(x^2*(1+x)^3/((1-x)*(1-x-x^2-x^3)), x, n+1), x, n), n = 2..35); # G. C. Greubel, Nov 04 2019
  • Mathematica
    Drop[CoefficientList[Series[x^2*(1+x)^3/((1-x)*(1-x-x^2-x^3)), {x, 0, 35}], x], 2] (* or *) LinearRecurrence[{2,0,0,-1}, {1,5,13,27}, 35] (* G. C. Greubel, Nov 04 2019 *)
  • PARI
    my(x='x+O('x^35)); Vec(x^2*(1+x)^3/((1-x)*(1-x-x^2-x^3))) \\ G. C. Greubel, Nov 04 2019
    
  • Sage
    def A027024_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x^2*(1+x)^3/((1-x)*(1-x-x^2-x^3)) ).list()
    a=A027024_list(35); a[2:] # G. C. Greubel, Nov 04 2019
    

Formula

G.f.: x^2*(1+x)^3/((1-x)*(1-x-x^2-x^3)).
a(n) = a(n-1) + a(n-2) + a(n-3) + 8, for n>4. - Greg Dresden, Feb 09 2020
a(n) = A000213(n+2)-4. - R. J. Mathar, Jun 24 2020

A335606 The number of fixed n-ominoes with a convex hull of width 3.

Original entry on oeis.org

1, 8, 31, 95, 269, 721, 1866, 4728, 11804, 29162, 71502, 174342, 423341, 1024786, 2474934, 5966625, 14365256, 34550674, 83035396, 199440433, 478814076, 1149133511, 2757142136, 6613933242, 15863281135, 38042981575, 91225540813, 218739876078, 524464594304, 1257437814143, 3014693395137
Offset: 3

Views

Author

R. J. Mathar, Jun 15 2020

Keywords

Comments

Obtained from Zeilberger's tables by subtracting the numbers of width <= 3 and of width <= 2.

Examples

			a(3)=1 counts 1 3-omino of shape 1x3.
a(4)=8 counts 8 4-ominoes of shape 2x3.
a(5)=31 counts 6 5-ominoes of shape 2x3 and 25 5-ominoes of shape 3x3.
a(6)=95 counts 1 6-omino of shape 2x3, 44 6-ominoes of shape 3x3 and 50 6-ominoes of shape 4x3.
		

Crossrefs

Cf. A308359, A027053 (width 2).

Programs

  • Mathematica
    LinearRecurrence[{5, -6, -4, 8, 1, 2, -8, 0, -1, 9, -2, -1, -3, 1}, {1, 8, 31, 95, 269, 721, 1866, 4728, 11804, 29162, 71502, 174342, 423341, 1024786, 2474934}, 31] (* Georg Fischer, Jan 16 2021 *)

Formula

a(n) = A308359(n,3).
G.f.: -x^3*(1+x) *(x^10 -x^9 -3*x^8 +2*x^7 -x^6 -2*x^5 +7*x^4 -3*x^3 -5*x^2 +2*x +1) / ( (x-1) *(x^3 +x^2 +x -1) *(x^10 -3*x^9 -x^8 +2*x^6 +x^4 -4*x^3 +3*x -1) ).
a(n)= 5*a(n-1) -6*a(n-2) -4*a(n-3) +8*a(n-4) +a(n-5) +2*a(n-6) -8*a(n-7) -a(n-9) +9*a(n-10) -2*a(n-11) -a(n-12) -3*a(n-13) +a(n-14).
Showing 1-5 of 5 results.