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

A381841 Position of the n-th occurrence of the digit 3 in A105083(n-1) for n>=1.

Original entry on oeis.org

3, 9, 12, 16, 22, 28, 31, 37, 40, 44, 50, 53, 57, 63, 69, 72, 76, 82, 88, 91, 97, 100, 104, 110, 116, 119, 125, 128, 132, 138, 141, 145, 151, 157, 160, 166, 169, 173, 179, 182, 186, 192, 198, 201, 205, 211, 217, 220, 226, 229, 233, 239, 242, 246, 252, 258
Offset: 1

Views

Author

Jeffrey Shallit, Mar 08 2025

Keywords

Crossrefs

Formula

a(n) = A064105(n) + 1.
a(n) = A136495(n) + A136496(n).

A092782 The ternary tribonacci word; also a Rauzy fractal sequence: fixed point of the morphism 1 -> 12, 2 -> 13, 3 -> 1, starting from a(1) = 1.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Apr 23 2004

Keywords

Comments

See A080843 for the {0,1,2} version, which in a sense is the most basic version.
See also A103269 for another version with further references and comments.
Also called a tribonacci word. In the limit the ratios #1's : #2's : #3's are t^2 : t : 1 where t is the tribonacci constant 1.839286755... (A058265). - Frank M Jackson, Mar 29 2018
a(n)-1 is the number of trailing 0's in the maximal tribonacci representation of n (A352103). - Amiram Eldar, Feb 29 2024

Examples

			From _Joerg Arndt_, Sep 14 2013: (Start)
The first few steps of the substitution are
Start: 1
Maps:
  1 --> 12
  2 --> 13
  3 --> 1
-------------
0:   (#=1)
  1
1:   (#=2)
  12
2:   (#=4)
  1213
3:   (#=7)
  1213121
4:   (#=13)
  1213121121312
5:   (#=24)
  121312112131212131211213
6:   (#=44)
  12131211213121213121121312131211213121213121
7:   (#=81)
  121312112131212131211213121312112131212131211213121121312121312112131213121121312
(End)
		

References

  • This entry has a fairly complete list of references and links concerning the ternary tribonacci word. - N. J. A. Sloane, Aug 17 2018
  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 246.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

See A080843 for a {0,1,2} version.
First differences: A317950.

Programs

  • Maple
    f(1):= (1, 2): f(2):= (1, 3): f(3):= (1): A:= [1]:
    for i from 1 to 16 do A:= map(f, A) od:
    A; # 19513 terms of A092782; A103269; from N. J. A. Sloane, Aug 06 2018
  • Mathematica
    Nest[ Flatten[# /. {1 -> {1, 2}, 2 -> {1, 3}, 3 -> 1}] &, {1}, 8] (* Robert G. Wilson v, Mar 04 2005 and updated Apr 29 2018 *)
  • PARI
    w=vector(9,x,[]); w[1]=[1];
    for(n=2,9,for(k=1,#w[n-1],m=w[n-1][k];v=[];if(m-1,if(m-2,v=[1],v=[1,3]),v=[1,2]);w[n]=concat(w[n],v)));
    w[9] \\ Gerald McGarvey, Dec 18 2009
    
  • PARI
    strsub(s, vv, off=0)=
    {
        my( nl=#vv, r=[], ct=1 );
        while ( ct <= #s,
            r = concat(r, vv[ s[ct] + (1-off) ] );
            ct += 1;
        );
        return( r );
    }
    t=[1];  for (k=1, 10, t=strsub( t, [[1,2], [1,3], [1]], 1 ) );  t
    \\ Joerg Arndt, Sep 14 2013
    
  • PARI
    A092782_vec(N,s=[[1,2],[1,3],1],A=[1])={while(#AM. F. Hasler, Dec 14 2018

Formula

a(n) = 1 for n in A003144; a(n) = 2 for n in A003145; a(n) = 3 for n in A003146.
a(n) = A080843(n-1) + 1. - Joerg Arndt, Sep 14 2013

Extensions

Additional references and links added by N. J. A. Sloane, Aug 17 2018

A073058 Define s(1)={1,2}, s(2)={1,3} and s(3)={1}. For a finite sequence A={a_1, ..., a_n}, with elements in {1,2,3}, define t(A) to be the concatenation of A, s(a_1), s(a_2), ... and s(a_n). Start with the sequence {1,2,3} and repeatedly apply t; limiting sequence is shown.

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Aug 16 2002

Keywords

Comments

A fractal sequence related to a sequence of Rauzy.

Crossrefs

Programs

  • Mathematica
    Nest[ Flatten[ Join[#, # /. {1 -> {1, 2}, 2 -> {1, 3}, 3 -> {1}}]] &, {1, 2, 3},
    4] (* Robert G. Wilson v, Jan 01 2017 *)

A202342 Numbers occurring exactly twice in Hofstadter H-sequence A005374.

Original entry on oeis.org

1, 4, 5, 7, 10, 13, 14, 17, 18, 20, 23, 24, 26, 29, 32, 33, 35, 38, 41, 42, 45, 46, 48, 51, 54, 55, 58, 59, 61, 64, 65, 67, 70, 73, 74, 77, 78, 80, 83, 84, 86, 89, 92, 93, 95, 98, 101, 102, 105, 106, 108, 111, 112, 114, 117, 120, 121, 123, 126, 129, 130, 133
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 17 2011

Keywords

Comments

Position of the n-th occurrence of the digit 1 in A105083(n-1) for n>=1. - Jeffrey Shallit, Mar 08 2025

Crossrefs

Cf. A005374, A105083, A202340, A136495, A136496, A202341 (complement).

Programs

  • Haskell
    import Data.List (elemIndices)
    a202342 n = a202342_list !! (n-1)
    a202342_list = elemIndices 2 a202340_list

Formula

A202340(a(n)) = 2.
a(n) = A005374(A136496(n)). - Alan Michael Gómez Calderón, Dec 22 2024
a(n) = A136495(A136495(n)). - Alan Michael Gómez Calderón, Jan 06 2025

A136495 Solution of the complementary equation b(n)=a(a(n))+n.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 10, 12, 13, 14, 16, 17, 18, 20, 22, 23, 24, 26, 28, 29, 31, 32, 33, 35, 37, 38, 40, 41, 42, 44, 45, 46, 48, 50, 51, 53, 54, 55, 57, 58, 59, 61, 63, 64, 65, 67, 69, 70, 72, 73, 74, 76, 77, 78, 80, 82, 83, 84, 86, 88, 89, 91, 92, 93, 95, 97, 98, 100, 101, 102
Offset: 1

Views

Author

Clark Kimberling, Jan 01 2008

Keywords

Comments

b = 1 + (column 1 of Z) = 1 + A020942. The pair (a,b) also satisfy the following complementary equations: b(n)=a(a(a(n)))+1; a(b(n))=a(n)+b(n); b(a(n))=a(n)+b(n)-1; (and others).
Let Z = (3rd order Zeckendorf array) = A136189. Then a = ordered union of columns 1,3,4,6,7,9,10,12,13,... of Z, b = ordered union of columns 2,5,8,11,14,... of Z.
Position of the n-th occurrence of either 1 or 3 in A105083(n-1) for n>=1. - Jeffrey Shallit, Mar 08 2025

Examples

			b(1) = a(a(1))+1 = a(1)+1 = 1+1 = 2;
b(2) = a(a(2))+2 = a(3)+2 = 4+2 = 6;
b(3) = a(a(3))+3 = a(4)+3 = 5+3 = 8;
b(4) = a(a(4))+4 = a(5)+4 = 7+4 = 11.
		

References

  • Clark Kimberling and Peter J. C. Moses, Complementary equations and Zeckendorf arrays, in Applications of Fibonacci Numbers, vol.10, Proceedings of the Thirteenth International Conference on Fibonacci Numbers and Their Applications, William Webb, editor, Congressus Numerantium, Winnipeg, Manitoba 201 (2010) 161-178.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a136495 n = (fromJust $ n `elemIndex` tail a005374_list) + 1
    -- Reinhard Zumkeller, Dec 17 2011

Formula

A005374(a(n)) = n. - Reinhard Zumkeller, Dec 17 2011
a(n) = A005374(A005374(n-1)) + n. - Alan Michael Gómez Calderón, Jul 16 2025

A136496 Solution of the complementary equation b(n)=a(a(n))+n; this is sequence b; sequence a is A136495.

Original entry on oeis.org

2, 6, 8, 11, 15, 19, 21, 25, 27, 30, 34, 36, 39, 43, 47, 49, 52, 56, 60, 62, 66, 68, 71, 75, 79, 81, 85, 87, 90, 94, 96, 99, 103, 107, 109, 113, 115, 118, 122, 124, 127, 131, 135, 137, 140, 144, 148, 150, 154, 156, 159, 163, 165, 168, 172, 176, 178, 181, 185, 189
Offset: 1

Views

Author

Clark Kimberling, Jan 01 2008

Keywords

Comments

b = 1 + (column 1 of Z) = 1 + A020942. The pair (a,b) also satisfy the following complementary equations: b(n)=a(a(a(n)))+1; a(b(n))=a(n)+b(n); b(a(n))=a(n)+b(n)-1; (and others).
Position of the n-th occurrence of the digit 2 in A105083(n-1) for n>=1. - Jeffrey Shallit, Mar 08 2025

Examples

			b(1) = a(a(1))+1 = a(1)+1 = 1+1 = 2;
b(2) = a(a(2))+2 = a(3)+2 = 4+2 = 6;
b(3) = a(a(3))+3 = a(4)+3 = 5+3 = 8;
b(4) = a(a(4))+4 = a(5)+4 = 7+4 = 11.
		

References

  • Clark Kimberling and Peter J. C. Moses, Complementary equations and Zeckendorf arrays, in Applications of Fibonacci Numbers, vol.10, Proceedings of the Thirteenth International Conference on Fibonacci Numbers and Their Applications, William Webb, editor, Congressus Numerantium, Winnipeg, Manitoba 201 (2010) 161-178.

Crossrefs

Formula

Let Z = (3rd order Zeckendorf array) = A136189. Then a = ordered union of columns 1,3,4,6,7,9,10,12,13,... of Z, b = ordered union of columns 2,5,8,11,14,... of Z.
a(n) = A136495(n) + A005374(n-1) + n. - Alan Michael Gómez Calderón, Dec 23 2024

A245553 A Rauzy fractal sequence: trajectory of 1 under morphism 1 -> 2,3; 2 -> 3; 3 -> 1.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Aug 03 2014

Keywords

Crossrefs

Programs

  • Mathematica
    Nest[ Function[ l, {Flatten[(l /. {1 -> {2, 3}, 2 -> {3}, 3 -> {1}})] }], {1}, 15]

A245554 A Rauzy fractal sequence: trajectory of 1 under morphism 1 -> 1,2,1,3; 2 -> 3; 3 -> 1.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Aug 03 2014

Keywords

Crossrefs

Programs

  • Mathematica
    Nest[ Function[ l, {Flatten[(l /. {1 -> {1, 2, 1, 3}, 2 -> {3}, 3 -> {1}})] }], {1}, 9]

A245555 Trajectory of 1 under the morphism 1 -> 12, 2 -> 23, 3 -> 31.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Aug 03 2014

Keywords

Comments

The morphism 1->12, 2->21 gives the {1,2} version of the Thue-Morse sequence A001285, cf. A010060.
The morphism 0->01, 1->12, 2->20 gives the generalized Thue-Morse sequence A071858.

Crossrefs

Essentially the same as A071858.

Programs

  • Mathematica
    Nest[ Function[ l, {Flatten[(l /. {1 -> {1, 2}, 2 -> {2, 3}, 3 -> {3, 1}})] }], {1}, 9]
  • PARI
    {a(n) = my(v = [1]); if( n<1, 0, while( #vMichael Somos, Aug 05 2014 */

Formula

a(n) = A071858(n+1) + 1. - Michel Dekking, Sep 29 2020
Showing 1-9 of 9 results.