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 11-20 of 401 results. Next

A046737 Reduced period of A000073 mod n.

Original entry on oeis.org

1, 4, 13, 8, 31, 52, 16, 16, 13, 124, 110, 104, 56, 16, 403, 32, 96, 52, 120, 248, 208, 220, 553, 208, 155, 56, 39, 16, 140, 1612, 331, 64, 1430, 96, 496, 104, 469, 120, 728, 496, 560, 208, 308, 440, 403, 2212, 46, 416, 112, 620, 1248, 56, 52, 156
Offset: 1

Views

Author

Keywords

Comments

See A046738 for the period of the tribonacci numbers mod n. The ratio of the period to the reduced period is either 1 or 3. Robinson discusses the relationship between the period and the reduced period of a sequence. For the Fibonacci numbers, the analogous sequence is A001177. - T. D. Noe, Jan 14 2009

Examples

			From _T. D. Noe_, Jan 14 2009: (Start)
The tribonacci sequence (starting with 1) mod 7 has a period that repeats
  1, 1, 2, 4, 0, 6, 3, 2, 4, 2, 1, 0, 3, 4, 0, 0,
  4, 4, 1, 2, 0, 3, 5, 1, 2, 1, 4, 0, 5, 2, 0, 0,
  2, 2, 4, 1, 0, 5, 6, 4, 1, 4, 2, 0, 6, 1, 0, 0.
The first pair of zeros occurs at the 16th term. Hence a(7)=16.
(End)
		

Crossrefs

Cf. A000073, A001177, A046738, A154753 (restriction to prime indices), A386236.

Extensions

Improved name from T. D. Noe, Jan 14 2009

A117189 Binomial transform of the tribonacci sequence A000073 (shifted left twice).

Original entry on oeis.org

1, 2, 5, 14, 40, 114, 324, 920, 2612, 7416, 21056, 59784, 169744, 481952, 1368400, 3885280, 11031424, 31321376, 88930368, 252498816, 716916544, 2035531648, 5779458048, 16409538688, 46591385856, 132286304768, 375598753024, 1066432564736, 3027907856384
Offset: 0

Views

Author

Gary W. Adamson, Mar 01 2006

Keywords

Comments

a(n)/a(n-1) tends to 2.83928675... = A058265 + 1.
Partial sums are in A073357. - R. J. Mathar, Apr 02 2008

Examples

			a(4) = 14 = 1*1 + 3*1 + 3*2 + 1*4;
a(6) = 324 = 2*114 + 1*40 + 2*14 + 3*5 + 4*2 + 5*1. - _Bob Selcoe_, Jun 28 2014
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-(x - 1)^2/(-1 + 4*x - 4*x^2 + 2*x^3), {x, 0, 30}], x] (* Wesley Ivan Hurt, Jul 05 2014 *)
    LinearRecurrence[{4,-4,2},{1,2,5},40] (* Harvey P. Dale, Oct 10 2016 *)

Formula

Binomial transform of A000073 starting with A000073(2): (1, 1, 2, 4, 7, 13, ...).
a(n) = 4*a(n-1)-4*a(n-2)+2*a(n-3), n>2. - T. D. Noe, Nov 07 2006
O.g.f.: -(x-1)^2/(-1+4*x-4*x^2+2*x^3). - R. J. Mathar, Apr 02 2008
a(n) = 2*a(n-1) + Sum_{j=1..n-1} j*a(n-j-1), n>=1; with a(0) = 1. - Bob Selcoe, Jun 28 2014

Extensions

Corrected and extended by T. D. Noe, Nov 07 2006

A213816 Tribonacci sequences A000073 and A001590 interleaved.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 6, 7, 11, 13, 20, 24, 37, 44, 68, 81, 125, 149, 230, 274, 423, 504, 778, 927, 1431, 1705, 2632, 3136, 4841, 5768, 8904, 10609, 16377, 19513, 30122, 35890, 55403, 66012, 101902, 121415, 187427, 223317, 344732, 410744, 634061, 755476, 1166220
Offset: 1

Views

Author

Loeky Haryanto, Jun 22 2012

Keywords

Comments

Bruce (see link) formulated the sequence using the following two equations:
a(2n) = a(2n-1)+a(2n-3),
a(2n+1) = a(2n-1)+a(2n-2),
with n>1 and initial conditions a(1)=a(2)=a(3)= 1.
These equations lead to a pair of tribonacci-type recurrence equations, for n>2:
a(2n+1) = a(2n-1)+a(2n-3)+a(2n-5),
a(2n+2) = a(2n)+a(2n-2)+a(2n-4).
It could be more appropriate to consider the sequence as a kind of two-dimensional tribonacci sequence (a(2n-1),a(2n)), i.e. as (1, 1), (1, 2), (2, 3), (4, 6), (7, 11), (13, 20), (24, 37), (44, 68), (81, 125), (149, 230), (274, 423), (504, 778), (927, 1431), (1705, 2632), (3136, 4841),... since after the first three initial pairs, the next pair can be obtained by adding three previous pairs component-wise. However, the first three initial pairs (1, 1), (1, 2), (2, 3) are redundant in comparison with the original integer sequence that needs only three initial integers 1, 1 and 1.
One method to construct the two-dimensional sequence is by using the well-known tribonacci-related morphism f with f(a) = ab, f(b) = ac, f(c) = a on the monoid of strings over the alphabet {a, b, c}. Using component-wise map, the following sequence of pairs is obtained: (c,b), (a, ac), (ab, aba), (abac, abacab), (abacaba, abacabaabac), (abacabaabacab, abacabaabacababacaba), ...; which is initialized by the pair (c,b) and any pair (x,y) is followed by (f(x),f(y)). The length of every string in every component consitutes the two-dimensional sequence.

Examples

			The first 14 pairs of string and its length are
(c, 1);
(b, 1);
(a, 1);
(ac, 2);
(ab, 2);
(aba, 3);
(abac, 4);
(abacab, 6);
(abacaba, 7);
(abacabaabac, 11);
(abacabaabacab, 13);
(abacabaabacababacaba, 20);
(abacabaabacababacabaabac, 24);
(abacabaabacababacabaabacabacabaabacab, 37); ...
		

Crossrefs

Cf. A000073.

Programs

  • Magma
    I:=[1, 1, 1, 2, 2, 3]; [n le 6 select I[n] else Self(n-2) + Self(n-4) + Self(n-6): n in [1..50]]; // G. C. Greubel, Nov 03 2018
  • Maple
    with(StringTools):
    # The following procedure defines the morphism f
    Morphf := proc (x::string) local Start, L, Init, i;
    Init := x;
    L := length(Init);
    Start := 1;
    for i from Start to 2*L do
       if Init[i] = "c" then
             Init := Insert(Init, i, "a");     i := i+1; L := L+1;
             Init := Delete(Init, i-1 .. i-1); i := i-1; L := L-1;
       elif Init[i] = "b" then
             Init := Insert(Init, i, "ac");    i := i+2; L := L+2;
             Init := Delete(Init, i-2 .. i-2); i := i-1; L := L-1;
       elif Init[i] = "a" then
             Init := Insert(Init, i, "b");     i := i+1; L := L+1;
       end if;
    end do;
    eval(Init);
    end proc:
    #The following procedure is intended to create sequence of
    #strings c, b, a, ac, ab, aba, abac, ..., etc, obtained by
    #iterating the morphism f n times but it starts from the third
    #string "a", i.e. leaving the first two strings "c" and "b"
    #behind:
    TribWord := proc (x1, x2::string, n) local A, B, C, i;
    A := x1; B := x2;
    for i to n do
       if type(i, odd) = true then
          A := Morphf(A);
          C := A;
       else
          B := Morphf(B); C := B
       end if;
    end do;
    eval(C);
    end proc;
    #The following command will print a(1), a(2), ..., a(30).
    for i to 30 do
    printf("%d%s", length(TribWord("c", "b", i-2)), `, `);
    end do
  • Mathematica
    LinearRecurrence[{0, 1, 0, 1, 0, 1}, {1, 1, 1, 2, 2, 3}, 48] (* Bruno Berselli, Jun 25 2012 *)
  • PARI
    x='x+O('x^50); Vec(x*(1+x+x^3)/(1-x^2-x^4-x^6)) \\ G. C. Greubel, Nov 03 2018
    

Formula

G.f.: x*(1+x+x^3)/(1-x^2-x^4-x^6). [corrected by G. C. Greubel, Nov 03 2018]
a(1) = a(2) = a(3) = 1; for n>1:
a(2n) = a(2n-1) + a(2n-3),
a(2n+1) = a(2n-1) + a(2n-2).

A073717 a(n) = T(2n+1), where T(n) are the tribonacci numbers A000073.

Original entry on oeis.org

0, 1, 4, 13, 44, 149, 504, 1705, 5768, 19513, 66012, 223317, 755476, 2555757, 8646064, 29249425, 98950096, 334745777, 1132436852, 3831006429, 12960201916, 43844049029, 148323355432, 501774317241, 1697490356184, 5742568741225
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Aug 05 2002

Keywords

Comments

In general, the bisection of a third-order linear recurrence with signature (x,y,z) will result in a third-order recurrence with signature (x^2 + 2*y, 2*z*x - y^2, z^2). - Gary Detlefs, May 29 2024

Crossrefs

Row sums of A216182.

Programs

  • Magma
    [n le 3 select (n-1)^2 else 3*Self(n-1) +Self(n-2) +Self(n-3): n in [1..31]]; // G. C. Greubel, Nov 19 2021
    
  • Mathematica
    CoefficientList[Series[(x+x^2)/(1-3x-x^2-x^3), {x, 0, 30}], x]
    LinearRecurrence[{3,1,1},{0,1,4},30] (* Harvey P. Dale, Sep 07 2015 *)
  • Sage
    def A073717_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1+x)/(1-3*x-x^2-x^3) ).list()
    A073717_list(30) # G. C. Greubel, Nov 19 2021

Formula

a(n) = 3*a(n-1) + a(n-2) + a(n-3), a(0)=0, a(1)=1, a(2)=4.
G.f.: x*(1+x)/(1-3*x-x^2-x^3).
a(n+1) = Sum_{k=0..n} A216182(n,k). - Philippe Deléham, Mar 11 2013
a(n) = A113300(n-1) + A113300(n). - R. J. Mathar, Jul 04 2019

A101757 Indices of semiprimes in A000073.

Original entry on oeis.org

5, 12, 18, 42, 44, 50, 58, 67, 74, 83, 90, 95, 126, 142, 194, 210, 211, 275, 367, 382, 479, 655, 734, 818, 839, 926, 939, 1047
Offset: 1

Views

Author

Jonathan Vos Post and Ray Chandler, Dec 26 2004

Keywords

Comments

a(29) >= 1091. A000073(1091) is a 288-digit composite number with unknown factorization. Other possible terms are 1390, 1630, 2034, 2131, 2339, ... - Tyler Busby, Feb 09 2023

Crossrefs

Equivalent sequence for primes: A303263.

Programs

Formula

A000073(a(n)) = A101758(n).

Extensions

More terms from David Wasserman, Apr 03 2008

A154754 Ratio of the period and the reduced period of the Fibonacci 3-step sequence A000073 mod prime(n).

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3
Offset: 1

Views

Author

T. D. Noe, Jan 15 2009

Keywords

Comments

See A046737 for more information about the reduced period.
For the Fibonacci 3-step (tribonacci) sequence, only 1 and 3 appear. A116515 is the analogous sequence for Fibonacci numbers. Let the terms in the reduced period be denoted by R. When the ratio is 3, the full period can be written as R,aR,bR, where a and b are multipliers that are the two solutions of the equation x^2+x+1 = 0 (mod p). What order do the solutions appear as a and b? See A154755 and A154756 for the primes that produce ratios of 1 and 3, respectively. Observe that there are approximately three times as many 1's as 3's.

Examples

			The tribonacci sequence (starting with 1) mod 7 is 1,1,2,4,0,6,3,2,4, 2,1,0,3,4,0,0,4,4,1,2,0,3,5,1,2,1,4,0,5,2,0,0,2,2,4,1,0,5,6,4,1,4,2,0, 6,1,0,0, which has 3 pairs of 0-0 terms. Hence a(4)=3.
		

Crossrefs

See the comments for the relationships with A116515, A154755, A154756.
See the formula section for the relationships with A106302, A154753, A386236.
Cf. A000073.
For the periods modulo all positive integers see A046737, A046738.

Programs

  • Mathematica
    Table[p=Prime[i]; a={1,0,0}; a0=a; k=0; zeros=0; While[k++; s=Mod[Plus@@a,p]; a=RotateLeft[a]; a[[ -1]]=s; If[Rest[a]=={0,0}, zeros++ ]; a!=a0]; zeros, {i,200}]

Formula

a(n) = A106302(n) / A154753(n).
a(n) = A386236(prime(n)), where prime(n) is the n-th prime.

A271591 Second most significant bit of the tribonacci number A000073(n).

Original entry on oeis.org

0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1
Offset: 4

Views

Author

Andres Cicuttin, Apr 10 2016

Keywords

Comments

It is conjectured that after the first two 0's, the number of consecutive 0's is only 4 or 5, and the number of consecutive 1's is only 3 or 4 (tested up to n=10^4). The sequence looks quasiperiodic (or with a very long true period if any).

Examples

			(Second MSB in parenthesis)
  n   A000073(n)      A000073(n)
      decimal         binary
  4      2        ->   1(0)
  5      4        ->   1(0)0
  6      7        ->   1(1)1
  7      13       ->   1(1)01
  8      24       ->   1(1)000
  9      44       ->   1(0)1100
  10     81       ->   1(0)10001
  11     149      ->   1(0)010101
		

Crossrefs

Cf. A000073 (tribonacci numbers), A079944 (2nd msb), A272170.

Programs

  • Mathematica
    a = LinearRecurrence[{1, 1, 1}, {0, 0, 1}, 120];(* to generate A000073 *)
    Table[IntegerDigits[a, 2][[i]][[2]], {i, 5, Length[a]}]
  • Python
    A271591_list, a, b, c = [], 0, 1 ,1
    for n in range(4,10001):
        a, b, c = b, c, a+b+c
        A271591_list.append(int(bin(c)[3])) # Chai Wah Wu, Feb 07 2018

Formula

a(n) = floor(A000073(n)/(2^(ceiling(log_2(A000073(n) + 1)) - 2))) - 2.
a(n) = A079944(A000073(n)-2). - Michel Marcus, Apr 22 2016

A303263 Indices of primes in tribonacci sequence A000073.

Original entry on oeis.org

4, 6, 7, 11, 87, 98, 215, 802, 4202, 18699, 96879
Offset: 1

Views

Author

M. F. Hasler, Apr 18 2018

Keywords

Comments

T = A000073 is defined by T(n+1) = T(n) + T(n-1) + T(n-2), T(2) = 1, T(1) = T(0) = 0.
The largest terms correspond to unproven probable primes T(a(n)).

Crossrefs

Cf. A000073 (= T), A092836 (= T(a(n))), A092835 (= a(n) - 1).
Cf. A001605 (indices of primes in Fibonacci numbers A000045).

Programs

  • Mathematica
    -1 + Position[LinearRecurrence[{1, 1, 1}, {0, 0, 1}, 10^4], ?PrimeQ][[All, 1]] (* _Michael De Vlieger, Apr 21 2018 *)
  • PARI
    a(n,N=4,S=vector(N,i,i>N-2))={for(i=N,oo,ispseudoprime(S[i%N+1]=2*S[(i-1)%N+1]-S[i%N+1])&&!n--&&return(i))}

Formula

a(n) = A092835(n) + 1 = index of A092836(n) in A000073.

A337283 a(n) = Sum_{i=0..n} i*T(i)^2, where T(i) = A000073(i) is the i-th tribonacci number.

Original entry on oeis.org

0, 0, 2, 5, 21, 101, 395, 1578, 6186, 23610, 89220, 333431, 1234343, 4536551, 16567157, 60172532, 217524468, 783111476, 2809027334, 10043413545, 35805255545, 127314522569, 451629771519, 1598650868766, 5647706073630, 19916305738030, 70117445671624, 246478579433947, 865201260035147
Offset: 0

Views

Author

N. J. A. Sloane, Sep 12 2020

Keywords

References

  • Raphael Schumacher, Explicit formulas for sums involving the squares of the first n Tribonacci numbers, Fib. Q., 58:3 (2020), 194-202.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 30); [0,0] cat Coefficients(R!( x^2*(1-x^2)*(2-7*x+7*x^2+3*x^3+9*x^4+7*x^5+x^6+x^7+x^8)/((1-x)*(1+x+x^2-x^3)*(1-3*x-x^2-x^3))^2 )); // G. C. Greubel, Nov 20 2021
    
  • Mathematica
    T[n_]:= T[n]= If[n<2, 0, If[n==2, 1, T[n-1] +T[n-2] +T[n-3]]]; (* A000073 *)
    a[n_]:= a[n]= Sum[j*T[j]^2, {j,0,n}];
    Table[a[n], {n,0,30}] (* G. C. Greubel, Nov 20 2021 *)
  • PARI
    concat([0,0], Vec(x^2*(1+x)*(2 -7*x +7*x^2 +3*x^3 +9*x^4 +7*x^5 +x^6 + x^7 +x^8)/((1-x)*(1 +x +x^2 -x^3)^2*(1 -3*x -x^2 -x^3)^2) + O(x^30))) \\ Colin Barker, Sep 19 2020
    
  • Sage
    @CachedFunction
    def T(n): # A000073
        if (n<2): return 0
        elif (n==2): return 1
        else: return T(n-1) +T(n-2) +T(n-3)
    def A337283(n): return sum( j*T(j)^2 for j in (0..n) )
    [A337283(n) for n in (0..40)] # G. C. Greubel, Nov 20 2021

Formula

From Colin Barker, Sep 13 2020: (Start)
G.f.: x^2*(1 + x)*(2 - 7*x + 7*x^2 + 3*x^3 + 9*x^4 + 7*x^5 + x^6 + x^7 + x^8) / ((1 - x)*(1 + x + x^2 - x^3)^2*(1 - 3*x - x^2 - x^3)^2).
a(n) = 5*a(n-1) - 2*a(n-2) - 2*a(n-3) - 35*a(n-4) + 3*a(n-5) + 48*a(n-7) - 11*a(n-8) + 7*a(n-9) - 14*a(n-10) + 2*a(n-11) - a(n-12) + a(n-13) for n>12.
(End)
a(n) = Sum_{j=0..n} j*A085697(j). - G. C. Greubel, Nov 20 2021

A337284 a(n) = Sum_{i=1..n} (i-1)*T(i)^2, where T(i) = A000073(i) is the i-th tribonacci number.

Original entry on oeis.org

0, 1, 3, 15, 79, 324, 1338, 5370, 20858, 79907, 301917, 1127753, 4175945, 15347222, 56045572, 203563012, 735880196, 2649245173, 9502874215, 33976624115, 121128306995, 430701953720, 1527852568478, 5408197139806, 19106052817630, 67376379676855, 237205619596129, 833831061604429, 2926954896983117
Offset: 1

Views

Author

N. J. A. Sloane, Sep 12 2020

Keywords

References

  • R. Schumacher, Explicit formulas for sums involving the squares of the first n Tribonacci numbers, Fib. Q., 58:3 (2020), 194-202. (Note that this paper uses an offset for the tribonacci numbers that is different from that used in A000073).

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( x^2*(1-2*x+2*x^2+12*x^3+8*x^5+2*x^6+4*x^7+3*x^8+2*x^9)/((1-x)*(1-2*x-3*x^2-6*x^3+x^4+x^6)^2) )); // G. C. Greubel, Nov 22 2021
    
  • Mathematica
    T[n_]:= T[n]= If[n<2, 0, If[n==2, 1, T[n-1] +T[n-2] +T[n-3]]];
    a[n_]:= a[n]= Sum[(j-1)*T[j]^2, {j,0,n}];
    Table[a[n], {n,40}] (* G. C. Greubel, Nov 22 2021 *)
  • Sage
    @CachedFunction
    def T(n): # A000073
        if (n<2): return 0
        elif (n==2): return 1
        else: return T(n-1) +T(n-2) +T(n-3)
    def A337284(n): return sum( (j-1)*T(j)^2 for j in (0..n) )
    [A337284(n) for n in (1..40)] # G. C. Greubel, Nov 22 2021

Formula

Schumacher (on page 194) gives two explicit formulas for a(n) in terms of tribonacci numbers.
From Colin Barker, Sep 14 2020: (Start)
G.f.: x^2*(1 - 2*x + 2*x^2 + 12*x^3 + 8*x^5 + 2*x^6 + 4*x^7 + 3*x^8 + 2*x^9) / ((1 - x)*(1 + x + x^2 - x^3)^2*(1 - 3*x - x^2 - x^3)^2)
a(n) = 5*a(n-1) - 2*a(n-2) - 2*a(n-3) - 35*a(n-4) + 3*a(n-5) + 48*a(n-7) - 11*a(n-8) + 7*a(n-9) - 14*a(n-10) + 2*a(n-11) - a(n-12) + a(n-13) for n>13.
(End)
a(n) = A337283(n) - A107239(n). - G. C. Greubel, Nov 22 2021
Previous Showing 11-20 of 401 results. Next