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-10 of 53 results. Next

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

A231575 Indices of primes in A001590.

Original entry on oeis.org

4, 5, 7, 9, 25, 29, 49, 79, 1613, 15205
Offset: 1

Views

Author

Robert Price, Nov 18 2013

Keywords

Comments

a(11) > 2*10^5.

Crossrefs

Programs

  • PARI
    v=[1,0,1]; for(n=4,1e4, if(ispseudoprime(t=v[1]+v[2]+v[3]), print1(n", ")); v=[v[2],v[3],t]) \\ Charles R Greathouse IV, Nov 18 2013

Formula

A001590(a(n)) = A231574(n). - Arthur O'Dwyer, 24 Jul 2024

Extensions

Name clarified by Arthur O'Dwyer, Jul 24 2024

A235862 Indices of primes in A141523.

Original entry on oeis.org

0, 3, 4, 5, 8, 10, 14, 16, 24, 30, 40, 54, 63, 66, 67, 109, 188, 203, 421, 463, 704, 730, 798, 1155, 1259, 1376, 1789, 2095, 2650, 3833, 4538, 4794, 4840, 5386, 8348, 15176, 17282, 21250, 21386, 21825, 31242, 32843, 33706, 37026, 47546, 66848
Offset: 1

Views

Author

Robert Price, Jan 16 2014

Keywords

Comments

a(47) > 2*10^5.

Crossrefs

Programs

  • Mathematica
    a={3,1,1}; Print[0]; For[n=3, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], Print[n]]; a=RotateLeft[a]; a[[3]]=sum]

Extensions

Name clarified by Arthur O'Dwyer, Jul 25 2024

A232542 Primes in A100683.

Original entry on oeis.org

2, 2, 3, 7, 41, 467, 859, 8012003, 168650767, 17843905055671832482869722050793, 2337143892123435886770270228393473, 563028582965218666043722998152482699
Offset: 1

Views

Author

Robert Price, Nov 25 2013

Keywords

Crossrefs

Programs

  • Mathematica
    a={-1,2,2}; Print[2]; Print[2]; For[n=3, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], Print[sum]]; a=RotateLeft[a]; a[[3]]=sum]

Extensions

Name clarified by Arthur O'Dwyer, Jul 25 2024

A230607 Primes in the tribonacci-like sequence A214899.

Original entry on oeis.org

2, 2, 5, 173, 1979, 10035601, 1314434453, 15043078019, 75946890143515970461691, 9947307490759622919990767, 33651500197152003774080593, 113842209720657202395344053, 577291982170349695261586984393, 33503139717732963900675717496847941
Offset: 1

Views

Author

Robert Price, Dec 05 2013

Keywords

Crossrefs

Programs

  • Mathematica
    a={2,1,2}; Print[2]; Print[2]; For[n=3, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], Print[sum]]; a=RotateLeft[a]; a[[3]]=sum]
    Select[LinearRecurrence[{1,1,1},{2,1,2},300],PrimeQ] (* Harvey P. Dale, Jul 30 2015 *)

Extensions

More terms from Harvey P. Dale, Jul 30 2015

A232498 Primes in the tribonacci-like sequence, A020992.

Original entry on oeis.org

2, 3, 19, 4567, 52267, 325219, 2967036956187340614662532876709507060271690954641131383
Offset: 1

Views

Author

Robert Price, Dec 12 2013

Keywords

Crossrefs

Programs

  • Mathematica
    a={0,2,1}; Print[2] For[n=3, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], Print[sum]]; a=RotateLeft[a]; a[[3]]=sum]

A232543 Indices of primes in A100683.

Original entry on oeis.org

1, 2, 3, 4, 7, 11, 12, 27, 32, 119, 127, 136, 611, 755, 872, 1676, 5363, 15623, 27564, 42679, 54576, 74123, 91043, 104331
Offset: 1

Views

Author

Robert Price, Nov 25 2013

Keywords

Comments

a(25) > 2*10^5.

Crossrefs

Programs

  • Mathematica
    a={-1,2,2};Print[1],Print[2];For[n=3,n<=1000,n++,sum=Plus@@a;If[PrimeQ[sum],Print[n]];a=RotateLeft[a]; a[[3]]=sum]

Formula

A100683(a(n)) = A232542(n). - Arthur O'Dwyer, 25 Jul 2024

Extensions

Name clarified by Arthur O'Dwyer, Jul 25 2024

A233554 Indices of primes in the tribonacci-like sequence, A020992.

Original entry on oeis.org

1, 3, 6, 15, 19, 22, 207, 542, 2374, 10579, 17726, 43182
Offset: 1

Views

Author

Robert Price, Dec 12 2013

Keywords

Comments

a(13) > 2*10^5.

Crossrefs

Programs

  • Mathematica
    a={0,2,1};Print[1];For[n=3,n<=1000,n++,sum=Plus@@a;If[PrimeQ[sum],Print[n]];a=RotateLeft[a]; a[[3]]=sum]

A234696 Indices of primes in the tribonacci-like sequence, A214727.

Original entry on oeis.org

1, 2, 3, 8, 16, 20, 64, 208, 364, 2652, 7763, 17280, 24104, 31823, 70864, 74008
Offset: 1

Views

Author

Robert Price, Dec 29 2013

Keywords

Comments

a(17) > 2*10^5.

Crossrefs

Programs

  • Mathematica
    a={1, 2, 2}; Print[2]; Print[2]; For[n=3, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], Print[n]]; a=RotateLeft[a]; a[[3]]=sum]
    Position[LinearRecurrence[{1,1,1},{1,2,2},75000],?PrimeQ]-1//Flatten (* _Harvey P. Dale, Sep 02 2016 *)

A235873 Primes in the tribonacci-like sequence, A141523.

Original entry on oeis.org

3, 5, 7, 13, 83, 281, 3217, 10883, 1425427, 55187617, 24453221203, 124001884480009, 29872617402415741, 185875267730565697, 341877918058715653, 44580781450601596678810171573, 36012536557658790037420884825332617431175065740791
Offset: 1

Views

Author

Robert Price, Jan 16 2014

Keywords

Crossrefs

Programs

  • Mathematica
    a={3,1,1}; Print[3]; For[n=3, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], Print[sum]]; a=RotateLeft[a]; a[[3]]=sum]
Showing 1-10 of 53 results. Next