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.

A136175 Tribonacci array, T(n,k).

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 11, 9, 8, 13, 20, 17, 15, 10, 24, 37, 31, 28, 19, 12, 44, 68, 57, 51, 35, 22, 14, 81, 125, 105, 94, 64, 41, 26, 16, 149, 230, 193, 173, 118, 75, 48, 30, 18, 274, 423, 355, 318, 217, 138, 88, 55, 33, 21, 504, 778, 653, 585, 399, 254, 162, 101, 61, 39, 23
Offset: 1

Views

Author

Clark Kimberling, Dec 18 2007

Keywords

Comments

As an interspersion (and dispersion), the array is, as a sequence, a permutation of the positive integers. Column k consists of the numbers m such that the least summand in the tribonacci representation of m is T(1,k). For example, column 1 consists of numbers with least summand 1. This array arises from tribonacci representations in much the same way that the Wythoff array, A035513, arises from Fibonacci (or Zeckendorf) representations.
From Abel Amene, Jul 29 2012: (Start)
(Row 1) = A000073 (offset=4) a(0)=0, a(1)=0, a(2)=1
(Row 2) = A001590 (offset=5) a(0)=0, a(1)=1, a(2)=0
(Row 3) = A000213 (offset=4) a(0)=1, a(1)=1, a(2)=1
(Row 4) = A214899 (offset=5) a(0)=2, a(1)=1, a(2)=2
(Row 5) = A020992 (offset=6) a(0)=0, a(1)=2, a(2)=1
(Row 6) = A100683 (offset=6) a(0)=-1,a(1)=2, a(2)=2
(Row 7) = A135491 (offset=4) a(0)=2, a(1)=4, a(2)=8
(Row 8) = A214727 (offset=6) a(0)=1, a(1)=1, a(2)=2
(Row 9) = A081172 (offset=8) a(0)=1, a(1)=1, a(2)=0
(column 1) = A003265
(column 2) = A353083
(End) [Corrected and extended by John Keith, May 09 2022]

Examples

			Northwest corner:
1  2   4   7   13  24   44   81  149 274 504
3  6   11  20  37  68   125  230 423 778
5  9   17  31  57  105  193  355 653
8  15  28  51  94  173  318  585
10 19  35  64  118 217  399
12 22  41  75  138 254
14 26  48  88  162
16 30  55 101
18 33  61
21 39
23
		

Crossrefs

Programs

  • Maple
    # maximum index in A73 such that A73 <= n.
    A73floorIdx := proc(n)
        local k ;
        for k from 3 do
            if A000073(k) = n then
                return k ;
            elif A000073(k) > n then
                return k -1 ;
            end if ;
        end do:
    end proc:
    # tribonacci expansion coeffs of n
    A278038 := proc(n)
        local k,L,nres ;
        k := A73floorIdx(n) ;
        L := [1] ;
        nres := n-A000073(k) ;
        while k >= 4 do
            k := k-1 ;
            if nres >= A000073(k) then
                L := [1,op(L)] ;
                nres := nres-A000073(k) ;
            else
                L := [0,op(L)] ;
            end if ;
        end do:
        return L ;
    end proc:
    A278038inv := proc(L)
        add( A000073(i+2)*op(i,L),i=1..nops(L)) ;
    end proc:
    A135175 := proc(n,k)
        option remember ;
        local a,known,prev,nprev,kprev,freb ;
        if n =1 then
            A000073(k+2) ;
        elif k>3 then
            procname(n,k-1)+procname(n,k-2)+procname(n,k-3) ;
        else
            if k = 1 then
                for a from 1 do
                    known := false ;
                    for nprev from 1 to n-1 do
                        for kprev from 1 do
                            if procname(nprev,kprev) > a then
                                break ;
                            elif procname(nprev,kprev) = a then
                                known := true ;
                            end if;
                        end do:
                    end do:
                    if not known then
                        return a ;
                    end if;
                end do:
            else
                prev := procname(n,k-1) ;
                freb := A278038(prev) ;
                return A278038inv([0,op(freb)]) ;
            end if;
        end if;
    end proc:
    seq(seq(A135175(n,d-n),n=1..d-1),d=2..12) ; # R. J. Mathar, Jun 07 2022

Formula

T(1,1)=1, T(1,2)=2, T(1,3)=4, T(1,k)=T(1,k-1)+T(1,k-2)+T(1,k-3) for k>3. Row 1 is the tribonacci basis; write B(k)=T(1,k). Each row satisfies the recurrence T(n,k)=T(n,k-1)+T(n,k-2)+T(n,k-3). T(n,1) is least number not in an earlier row. If T(n,1) has tribonacci representation B(k(1))+B(k(2))+...+B(k(m)), then T(n,2) = B(k(2))+B(k(3))+...+B(k(m+1)) and T(n,3) = B(k(3))+B(k(4))+...+B(k(m+2)). (Continued shifting of indices gives the other terms in row n, also.)

Extensions

T(3, 4) corrected and more terms by John Keith, May 09 2022

A353084 Column 0 of the extended Trithoff (tribonacci) array.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 69, 70, 71, 73, 74, 75, 76, 77, 78, 80
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Senior Group, Apr 22 2022

Keywords

Comments

This column is also called the wall of the Trithoff array.
These are the positions of letters a and b in the tribonacci word.
Complement of A003146: position of letter c in the tribonacci word.
Suppose number n_1 has tribonacci representation t that ends in 1 (such numbers are in column 1 of the Trithoff array). Then its tribonacci successor n_2 has tribonacci representation t0 (such numbers are in column 2 of the Trithoff array), and the successor of the successor n_3 has tribonacci representation t00 (such numbers are in column 3 of the Trithoff array). This sequence consists of numbers n_3-n_2-n_1.

Examples

			The first few tribonacci numbers are 1, 2, 4, 7, 13, 24, 44. The number 23 can be represented as 13+7+2+1. Thus, its tribonacci representation is 11011. The tribonacci successor of 23 is 24+13+4+2 = 43, and the next successor is 44+24+7+4 = 79. Thus, 79 - 43 - 23 = 13 is in this sequence.
		

Crossrefs

A353086 Column -1 of the extended Trithoff (Tribonacci) array.

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9, 10, 10, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 18, 18, 19, 20, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 31, 31, 32, 32, 33, 34, 34, 35, 36, 36, 37, 38, 38, 39, 40, 40, 41, 42, 42, 43, 44, 44, 45, 45, 46, 47, 47, 48, 49, 49, 50
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Senior group, Apr 22 2022

Keywords

Comments

This column is also called the seed of the Trithoff array.
This is a nondecreasing sequence containing all nonnegative integers, with some of them doubled. The doubled numbers are the positions of the letter "a" in the Tribonacci word (A003144). Correspondingly, single numbers are positions of letters "b" and "c" in the Tribonacci word.
Suppose number n_1 has Tribonacci representation t that ends in 1 (such numbers are in column 1 of the Trithoff array). Then its Tribonacci successor n_2 has Tribonacci representation t0 (such numbers are in column 2 of the Trithoff array), and the successor of the successor n_3 has Tribonacci representation t00 (such numbers are in column 3 of the Trithoff array). The seed in the same row as n_1, n_2, and n_3 is 2n_2-n_3.

Crossrefs

A353090 Column -2 of the extended Trithoff (tribonacci) array.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 25, 25, 25, 26, 26, 26, 27
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Senior group, Apr 22 2022

Keywords

Comments

This column is also called the pre-seed of the Trithoff array.
This is a nondecreasing sequence containing all nonnegative integers, with some of them doubled and some tripled. The doubled numbers are the positions of the letter "c" in the tribonacci word (A003146). Correspondingly, the tripled numbers are positions of letters "a" and "b" in the tribonacci word.
Suppose number n_1 has tribonacci representation t that ends in 1 (such numbers are in column 1 of the Trithoff array). Then its tribonacci successor n_2 has tribonacci representation t0 (such numbers are in column 2 of the Trithoff array), and the successor of the successor n_3 has tribonacci representation t00 (such numbers are in column 3 of the Trithoff array). The pre-seed in the same row as n_1, n_2, and n_3 is 2n_1-n_2.

Crossrefs

A351631 The numbers that are not doubled in column -1 of the extended Trithoff (tribonacci) array.

Original entry on oeis.org

0, 2, 4, 6, 9, 11, 13, 15, 17, 19, 22, 24, 26, 28, 30, 33, 35, 37, 39, 41, 43, 46, 48, 50, 53, 55, 57, 59, 61, 63, 66, 68, 70, 72, 74, 77, 79, 81, 83, 85, 87, 90, 92, 94, 96, 98, 100, 103, 105, 107, 109, 111, 114, 116, 118, 120, 122, 124, 127, 129, 131, 134, 136, 138, 140, 142, 144, 147, 149, 151
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Senior group, May 04 2022

Keywords

Comments

Excluding zeros, these are the indices of letters b and c in the tribonacci word.
The complement of A003144: the indices of the letter a in the tribonacci word. These numbers are doubled in column -1 in the extended Trithoff array.
Also integers with "even" lazy tribonacci representation A352103, and first column of A385436. - A.H.M. Smeets, Jun 29 2025

Crossrefs

Programs

  • Python
    def ToDual_111_Zeck(n):
        if n == 0:
            return "0"
        f0, f1, f2, sf = 1, 0, 0, 0
        while n > sf:
            f0, f1, f2 = f0+f1+f2, f0, f1
            sf += f0
        r, s = sf-n, "1"
        while f0 > 1:
            f0, f1, f2 = f1, f2, f0-f1-f2
            r, s = r%f0, s+str(1-r//f0)
        return s
    n, a = 0, 0
    while n < 70:
        s = ToDual_111_Zeck(a)
        if s[len(s)-1] == "0": # == even
            n += 1
            print(a, end = ", ")
    a += 1 # A.H.M. Smeets, Jun 28 2025
Showing 1-5 of 5 results.