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 40 results. Next

A003144 Positions of letter a in the tribonacci word abacabaabacababac... generated by a->ab, b->ac, c->a (cf. A092782).

Original entry on oeis.org

1, 3, 5, 7, 8, 10, 12, 14, 16, 18, 20, 21, 23, 25, 27, 29, 31, 32, 34, 36, 38, 40, 42, 44, 45, 47, 49, 51, 52, 54, 56, 58, 60, 62, 64, 65, 67, 69, 71, 73, 75, 76, 78, 80, 82, 84, 86, 88, 89, 91, 93, 95, 97, 99, 101, 102, 104, 106, 108, 110, 112, 113, 115, 117, 119, 121, 123, 125
Offset: 1

Views

Author

Keywords

Comments

From Philippe Deléham, Feb 27 2009: (Start)
A003144, A003145, A003146 may be defined as follows. Consider the morphism psi: a -> ab, b -> ac, c -> a. The image (or trajectory) of a under repeated application of this map is the infinite ternary tribonacci word a, b, a, c, a, b, a, a, b, a, c, a, b, a, b, a, c, ... (setting a = 1, b = 2, c = 3 gives A092782). The indices of a, b, c give respectively A003144, A003145, A003146. (End) [For the word with a -> 0, b -> 1, c -> 2 with offset 0 see A080843. - Wolfdieter Lang, Aug 10 2018]
The infinite word may also be defined as the limit S_oo where S_1 = a, S_n = psi(S_{n-1}). Or, by S_1 = a, S_2 = ab, S_3 = abac, and thereafter S_n = S_{n-1} S_{n-2} S_{n-3}. It is the unique word such that S_oo = psi(S_oo).
Also, indices of a in the sequence closed under a -> abac, b -> aba, c -> ab; starting with a(1) = a. - Philippe Deléham, Apr 16 2004
Theorem: A number m is in this sequence iff the tribonacci representation of m-1 ends with 0. [Duchene and Rigo, Remark 2.5] - N. J. A. Sloane, Nov 18 2016; corrected Mar 02 2019.

References

  • Eric Duchêne, Aviezri S. Fraenkel, Vladimir Gurvich, Nhan Bao Ho, Clark Kimberling, Urban Larsson, Wythoff Visions, Games of No Chance, Vol. 5; MSRI Publications, Vol. 70 (2017), pages 101-153.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003145, A003146, A080843, A092782, A058265, A275926, A276793, A276796, A278039 (subtract 1 from each term, and use offset 0).
First differences are A276788.
For tribonacci representations of numbers see A278038.

Programs

  • Maple
    M:=17; S[1]:=`a`; S[2]:=`ab`; S[3]:=`abac`;
    for n from 4 to M do S[n]:=cat(S[n-1], S[n-2], S[n-3]); od:
    t0:=S[M]: l:=length(t0); t1:=[];
    for i from 1 to l do if substring(t0,i..i) = `a` then t1:=[op(t1),i]; fi; od: t1; # N. J. A. Sloane, Nov 01 2006
  • Mathematica
    A003144L = StringPosition[SubstitutionSystem[{"a" -> "ab", "b" -> "ac", "c" -> "a"}, "a", {#}][[1]], "a"][[All, 1]] &; A003144L[7] (* JungHwan Min, Dec 22 2016 *)

Formula

It appears that a(n) is always either floor(n*t) or floor(n*t)+1 for all n, where t is the tribonacci constant A058265. See A275926. - N. J. A. Sloane, Oct 28 2016. This is true - see the Dekking et al. paper. - N. J. A. Sloane, Jul 22 2019

Extensions

More terms from Philippe Deléham, Apr 16 2004
Entry revised by N. J. A. Sloane, Oct 13 2016

A003145 Positions of letter b in the tribonacci word abacabaabacababac... generated by a->ab, b->ac, c->a (cf. A092782).

Original entry on oeis.org

2, 6, 9, 13, 15, 19, 22, 26, 30, 33, 37, 39, 43, 46, 50, 53, 57, 59, 63, 66, 70, 74, 77, 81, 83, 87, 90, 94, 96, 100, 103, 107, 111, 114, 118, 120, 124, 127, 131, 134, 138, 140, 144, 147, 151, 155, 158, 162, 164, 168, 171, 175, 179, 182, 186, 188, 192, 195, 199, 202, 206, 208
Offset: 1

Views

Author

Keywords

Comments

A003144, A003145, A003146 may be defined as follows. Consider the map psi: a -> ab, b -> ac, c -> a. The image (or trajectory) of a under repeated application of this map is the infinite word a, b, a, c, a, b, a, a, b, a, c, a, b, a, b, a, c, ... (setting a = 1, b = 2, c = 3 gives A092782). The indices of a, b, c give respectively A003144, A003145, A003146. - Philippe Deléham, Feb 27 2009
The infinite word may also be defined as the limit S_oo where S_1 = a, S_n = psi(S_{n-1}). Or, by S_1 = a, S_2 = ab, S_3 = abac, and thereafter S_n = S_{n-1} S_{n-2} S_{n-3}. It is the unique word such that S_oo = psi(S_oo).
Also indices of b in the sequence closed under a -> abac, b -> aba, c -> ab; starting with a(1) = a. - Philippe Deléham, Apr 16 2004
Theorem: A number m is in this sequence iff the tribonacci representation of m-1 ends with 01. [Duchene and Rigo, Remark 2.5] - N. J. A. Sloane, Mar 02 2019

References

  • Eric Duchêne, Aviezri S. Fraenkel, Vladimir Gurvich, Nhan Bao Ho, Clark Kimberling, Urban Larsson, Wythoff Visions, Games of No Chance, Vol. 5; MSRI Publications, Vol. 70 (2017), pages 101-153.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First differences give A276789. A278040 (subtract 1 from each term, and use offset 1).
For tribonacci representations of numbers see A278038.

Programs

  • Maple
    M:=17; S[1]:=`a`; S[2]:=`ab`; S[3]:=`abac`;
    for n from 4 to M do S[n]:=cat(S[n-1], S[n-2], S[n-3]); od:
    t0:=S[M]: l:=length(t0); t1:=[];
    for i from 1 to l do if substring(t0,i..i) = `b` then t1:=[op(t1),i]; fi; od: # N. J. A. Sloane
  • Mathematica
    StringPosition[SubstitutionSystem[{"a" -> "ab", "b" -> "ac", "c" -> "a"}, "b", {#}][[1]], "b"][[All, 1]] &@9 (* Michael De Vlieger, Mar 30 2017, Version 10.2, after JungHwan Min at A003144 *)

Formula

It appears that a(n) = floor(n*t^2) + eps for all n, where t is the tribonacci constant A058265 and eps is 0, 1, or 2. See A276799. - N. J. A. Sloane, Oct 28 2016. This is true - see the Dekking et al. paper. - N. J. A. Sloane, Jul 22 2019

Extensions

More terms from Philippe Deléham, Apr 16 2004
Corrected by T. D. Noe and N. J. A. Sloane, Nov 01 2006
Entry revised by N. J. A. Sloane, Oct 13 2016

A003146 Positions of letter c in the tribonacci word abacabaabacababac... generated by a->ab, b->ac, c->a (cf. A092782).

Original entry on oeis.org

4, 11, 17, 24, 28, 35, 41, 48, 55, 61, 68, 72, 79, 85, 92, 98, 105, 109, 116, 122, 129, 136, 142, 149, 153, 160, 166, 173, 177, 184, 190, 197, 204, 210, 217, 221, 228, 234, 241, 247, 254, 258, 265, 271, 278, 285, 291, 298, 302, 309, 315, 322, 329, 335, 342, 346, 353, 359
Offset: 1

Views

Author

Keywords

Comments

Comment from Philippe Deléham, Feb 27 2009: A003144, A003145, A003146 may be defined as follows. Consider the map psi: a -> ab, b -> ac, c -> a. The image (or trajectory) of a under repeated application of this map is the infinite word a, b, a, c, a, b, a, a, b, a, c, a, b, a, b, a, c, ... (setting a = 1, b = 2, c = 3 gives A092782). The indices of a, b, c give respectively A003144, A003145, A003146.
The infinite word may also be defined as the limit S_oo where S_1 = a, S_n = psi(S_{n-1}). Or, by S_1 = a, S_2 = ab, S_3 = abac, and thereafter S_n = S_{n-1} S_{n-2} S_{n-3}. It is the unique word such that S_oo = psi(S_oo).
Also, indices of c in the sequence closed under a -> abac, b -> aba, c -> ab; starting with a(1) = a. - Philippe Deléham, Apr 16 2004
Theorem: A number m is in this sequence iff the tribonacci representation of m-1 ends with 11. [Duchene and Rigo, Remark 2.5] - N. J. A. Sloane, Mar 02 2019

References

  • Eric Duchêne, Aviezri S. Fraenkel, Vladimir Gurvich, Nhan Bao Ho, Clark Kimberling, Urban Larsson, Wythoff Visions, Games of No Chance, Vol. 5; MSRI Publications, Vol. 70 (2017), pages 101-153.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First differences are A276792. A278041 (subtract 1 from each term, and use offset 0).
For tribonacci representations of numbers see A278038.

Programs

  • Maple
    M:=17; S[1]:=`a`; S[2]:=`ab`; S[3]:=`abac`;
    for n from 4 to M do S[n]:=cat(S[n-1], S[n-2], S[n-3]); od:
    t0:=S[M]: l:=length(t0); t1:=[];
    for i from 1 to l do if substring(t0,i..i) = `c` then t1:=[op(t1),i]; fi; od:
    # N. J. A. Sloane, Nov 01 2006
  • Mathematica
    StringPosition[SubstitutionSystem[{"a" -> "ab", "b" -> "ac", "c" -> "a"}, "c", {#}][[1]], "c"][[All, 1]] &@ 11 (* Michael De Vlieger, Mar 30 2017, Version 10.2, after JungHwan Min at A003144 *)

Formula

It appears that a(n) = floor(n*t^3) + eps for all n, where t is the tribonacci constant A058265 and eps is 0, 1, 2, or 3. See A277721. - N. J. A. Sloane, Oct 28 2016. This is true - see the Dekking et al. paper. - N. J. A. Sloane, Jul 22 2019

Extensions

More terms from Philippe Deléham, Apr 16 2004
Entry revised by N. J. A. Sloane, Oct 13 2016

A319967 a(n) = A003145(A003144(n)) where A003144 and A003145 are positions of '1' and '2' in the tribonacci word A092782.

Original entry on oeis.org

2, 9, 15, 22, 26, 33, 39, 46, 53, 59, 66, 70, 77, 83, 90, 96, 103, 107, 114, 120, 127, 134, 140, 147, 151, 158, 164, 171, 175, 182, 188, 195, 202, 208, 215, 219, 226, 232, 239, 245, 252, 256, 263, 269, 276, 283, 289, 296, 300, 307, 313, 320, 327, 333, 340, 344
Offset: 1

Views

Author

N. J. A. Sloane, Oct 05 2018

Keywords

Comments

By analogy with the Wythoff compound sequences A003622 etc., the nine compounds of A003144, A003145, A003146 might be called the tribonacci compound sequences. They are A278040, A278041, and A319966-A319972.
This sequence gives the positions of the word bac in the tribonacci word t = abacabaa..., fixed point of the morphism a->ab, b->ac, c->a. This follows from the fact that the word ac is always preceded in t by the letter b, and the formula BA = C-2, where A := A003144, B := A003145, C := A003146. - Michel Dekking, Apr 09 2019

Crossrefs

Cf. A092782 (ternary tribonacci word).

Formula

a(n+1) = B(A(n)) = B(A(n) + 1) - 2 = A(n) + B(n) + n + 1, for n >= 0, where B = A278039 and A = A278040. For a proof see the W. Lang link in A278040, Proposition 9, eq. (51). - Wolfdieter Lang, Dec 13 2018

Extensions

More terms from Rémy Sigrist, Oct 16 2018

A113534 Ascending descending base exponent transform of the flipped tribonacci substitution (A092782).

Original entry on oeis.org

1, 3, 6, 7, 20, 10, 39, 12, 26, 19, 20, 43, 21, 78, 24, 53, 30, 57, 43, 88, 61, 59, 56, 43, 90, 42, 155, 46, 109, 53, 122, 75, 105, 114, 73, 122, 62, 197, 63, 172, 71, 136, 96, 183, 140, 122, 139, 86, 179, 81, 304, 83, 185, 98, 153, 162, 160, 261, 121, 192, 107, 236, 126
Offset: 1

Views

Author

Jonathan Vos Post, Jan 13 2006

Keywords

Comments

The flipped tribonacci substitution (A092782) b(n) is the fixed point of the morphism 1 -> 12, 2 -> 13, 3 -> 1, starting from b(1) = 1. The transformed sequence a(n) satisfies n <= a(n) <= 27 n but the bound can be determined to be much tighter.

Examples

			a(1) = A092782(1)^A092782(1) = 1^1 = 1.
a(2) = A092782(1)^A092782(2) + A092782(2)^A092782(1) = 1^2 + 2^1 = 3.
a(3) = 1^1 + 2^2 + 1^1 = 6.
a(4) = 1^3 + 2^1 + 1^2 + 3^1 = 7.
a(5) = 1^1 + 2^3 + 1^1 + 3^2 + 1^1 = 20.
a(6) = 1^2 + 2^1 + 1^3 + 3^1 + 1^2 + 2^1 = 10.
a(7) = 1^1 + 2^2 + 1^1 + 3^3 + 1^1 + 2^2 + 1^1 = 39.
a(8) = 1^1 + 2^1 + 1^2 + 3^1 + 1^3 + 2^1 + 1^2 + 1^1 = 12.
a(9) = 1^2 + 2^1 + 1^1 + 3^2 + 1^1 + 2^3 + 1^1 + 1^2 + 2^1 = 26.
a(10) = 1^1 + 2^2 + 1^1 + 3^1 + 1^2 + 2^1 + 1^3 + 1^1 + 2^2 + 1^1 = 19.
a(11) = 1^3 + 2^1 + 1^2 + 3^1 + 1^1 + 2^2 + 1^1 + 1^3 + 2^1 + 1^2 + 3^1 = 20.
a(12) = 1^1 + 2^3 + 1^1 + 3^2 + 1^1 + 2^1 + 1^2 + 1^1 + 2^3 + 1^1 + 3^2 + 1^1 = 43.
		

Crossrefs

Programs

  • Mathematica
    A092782[n_] := Nest[Function[l, {Flatten[(l /. {1 -> {1, 2}, 2 -> {1, 3}, 3 -> {1}})]}], {1}, n][[1]]; Table[Sum[(A092782[k][[k]])^((A092782[n - k + 1][[n - k + 1]])), {k, 1, n}], {n, 1, 10}] (* G. C. Greubel, May 18 2017 *)

Formula

a(n) = Sum_{k=1..n} A092782(k)^(A092782(n-k+1)). - G. C. Greubel, May 17 2017

Extensions

a(3) corrected by Giovanni Resta, Jun 13 2016
a(13) onward from G. C. Greubel, May 18 2017

A295561 Prefixal-derivation of A092782.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 27 2017

Keywords

Crossrefs

Cf. A092782.

Extensions

Terms a(19) and beyond from Lars Blomberg, Nov 28 2017

A324470 Partial sums of ternary tribonacci word A092782.

Original entry on oeis.org

1, 3, 4, 7, 8, 10, 11, 12, 14, 15, 18, 19, 21, 22, 24, 25, 28, 29, 31, 32, 33, 35, 36, 39, 40, 42, 43, 46, 47, 49, 50, 51, 53, 54, 57, 58, 60, 61, 63, 64, 67, 68, 70, 71, 72, 74, 75, 78, 79, 81, 82, 83, 85, 86, 89, 90, 92, 93, 95, 96, 99, 100, 102, 103
Offset: 1

Views

Author

N. J. A. Sloane, Mar 03 2019

Keywords

Crossrefs

A080843 Tribonacci word: limit S(infinity), where S(0) = 0, S(1) = 0,1, S(2) = 0,1,0,2 and for n >= 0, S(n+3) = S(n+2) S(n+1) S(n).

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 1, 0, 2
Offset: 0

Views

Author

N. J. A. Sloane, Mar 29 2003

Keywords

Comments

An Arnoux-Rauzy or episturmian word.
From N. J. A. Sloane, Jul 10 2018: (Start)
The initial terms in a form suitable for copying:
0,1,0,2,0,1,0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,2,0,1,0,0,1,0,2,0,1,
0,1,0,2,0,1,0,0,1,0,2,0,1,0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,2,0,1,
0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,2,0,1,
0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,
2,0,1,0,2,0,1,0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,2,0,1,0,0,1,0,2,0,
1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,2,0,
1,0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,2,0,
1,0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,0,2,0,1,0,0,1,0,2,0,1,0,1,0,2,0,1,0,0,1,
...
Let TTW(a,b,c) denote this sequence written over the alphabet {a,b,c}. It begins:
a,b,a,c,a,b,a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,c,a,b,a,a,b,a,c,a,b,
a,b,a,c,a,b,a,a,b,a,c,a,b,a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,c,a,b,
a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,c,a,b,
a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,
c,a,b,a,c,a,b,a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,c,a,b,a,a,b,a,c,a,
b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,c,a,
b,a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,c,a,
b,a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,a,c,a,b,a,a,b,a,c,a,b,a,b,a,c,a,b,a,a,b,
... (End)
From Wolfdieter Lang, Aug 14 2018: (Start)
The substitution sequence 0 -> 0, 1; 1-> 0, 2; 2 -> 0 read as an irregular triangle with rows l >= 1 and length T(l+2), with the tribonacci numbers T = A000073, leads to the tribonacci tree TriT with level TriT(l) for l >= 1 given by a(0), a(1), ..., a(T(l+2)-1).
E.g., l = 4: 0 1 0 2 0 1 0 with T(6) = 7 leaves (nodes). See the example below.
This tree can be used to find the tribonacci representation of nonnegative n given in A278038, call it ZTri(n) (Z for generalized Zeckendorf), by replacing every 2 by 1, and reading from bottom to top, omitting the final 0, except for n = 0 which is represented by 0. See the example below. (End)

Examples

			From _Joerg Arndt_, Mar 12 2013: (Start)
The first few steps of the substitution are
Start: 0
Rules:
  0 --> 01
  1 --> 02
  2 --> 0
-------------
0:   (#=1)
  0
1:   (#=2)
  01
2:   (#=4)
  0102
3:   (#=7)
  0102010
4:   (#=13)
  0102010010201
5:   (#=24)
  010201001020101020100102
6:   (#=44)
  01020100102010102010010201020100102010102010
7:   (#=81)
  010201001020101020100102010201001020101020100102010010201010201001020102010010201
(End)
From _Wolfdieter Lang_, Aug 14 2018: (Start)
The levels l of the tree TriT begin (the branches (edges) have been omitted):
Substitution rule: 0 -> 0 1; 1 -> 0 2; 2 -> 0.
l=1:                                 0
l=2:                  0                                 1
l=3:             0             1                  0             2
l=4:         0      1       0     2          0       1          0
l=5:      0    1  0   2   0   1   0        0   1   0   2      0    1
...
----------------------------------------------------------------------------------
n =       0    1  2   3   4   5   6        7   8   9  10     11   12
The tribonacci representation of n >= 0 (A278038; here at level 5 for n = 0.. 12) is obtained by reading from bottom to top (along the branches not shown) replacing 2 with 1, omitting the last 0 except for n = 0.
          0    1  0   1   0   1   0        0   1   0  1      0    1
                  1   1   0   0   1        0   0   1  1      0    0
                          1   1   1        0   0   0  0      1    1
                                           1   1   1  1      1    1
E.g., ZTri(9) = A278038(9) = 1010. (End)
		

References

  • The entry A092782 has a more complete list of references and links. - N. J. A. Sloane, Aug 17 2018
  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 246.

Crossrefs

Cf. A003849 (the Fibonacci word), A092782.
See A092782 for a version over the alphabet {1,2,3}.
See A278045 for another construction.
First differences: A317950. Partial sums: A319198.

Programs

  • Maple
    M:=17; S[1]:=`0`; S[2]:=`01`; S[3]:=`0102`;
    for n from 4 to M do S[n]:=cat(S[n-1], S[n-2], S[n-3]); od:
    t0:=S[M]: l:=length(t0); for i from 1 to l do lprint(i,substring(t0,i..i)); od:
    # N. J. A. Sloane, Nov 01 2006
    # A version that uses the letters a,b,c:
    M:=10; B[1]:=`a`; B[2]:=`ab`; B[3]:=`abac`;
    for n from 4 to M do B[n]:=cat(B[n-1], B[n-2], B[n-3]); od:
    B[10]; # N. J. A. Sloane, Oct 30 2018
  • Mathematica
    Nest[Flatten[ # /. {0 -> {0, 1}, 1 -> {0, 2}, 2 -> {0}}] &, {0}, 8] (* updated by Robert G. Wilson v, Nov 07 2010 *)
    SubstitutionSystem[{0->{0,1},1->{0,2},2->{0}},{0},{8}]//Flatten (* Harvey P. Dale, Nov 21 2021 *)
  • 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=[0];  for (k=1, 10, t=strsub( t, [[0,1], [0,2], [0]], 0 ) );  t
    \\ Joerg Arndt, Sep 14 2013

Formula

Fixed point of morphism 0 -> 0, 1; 1 -> 0, 2; 2 -> 0.
a(n) = A092782(n+1) - 1. - Joerg Arndt, Sep 14 2013

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 06 2003

A140101 Start with Y(0)=0, X(1)=1, Y(1)=2. For n > 1, choose least positive integers Y(n) > X(n) such that neither Y(n) nor X(n) appear in {Y(k), 1 <= k < n} or {X(k), 1 <= k < n} and such that Y(n)-X(n) does not appear in {Y(k)-X(k), 1 <= k < n} or {Y(k)+X(k), 1 <= k < n}; sequence gives Y(n) (for X(n) see A140100).

Original entry on oeis.org

0, 2, 5, 8, 11, 13, 16, 19, 22, 25, 28, 31, 33, 36, 39, 42, 45, 48, 50, 53, 56, 59, 62, 65, 68, 70, 73, 76, 79, 81, 84, 87, 90, 93, 96, 99, 101, 104, 107, 110, 113, 116, 118, 121, 124, 127, 130, 133, 136, 138, 141, 144, 147, 150, 153, 156, 158, 161, 164, 167, 170, 173
Offset: 0

Views

Author

Paul D. Hanna, Jun 04 2008

Keywords

Comments

Sequence A140100 = {X(n), n >= 1} is the complement of the current sequence, while the sequence of differences, A140102 = {Y(n)-X(n), n >= 1}, forms the complement of the sequence of sums, A140103 = {Y(n)+X(n), n >= 1}.
Compare with A140099(n) = [n*(1+t)], a Beatty sequence involving the tribonacci constant t = t^3 - t^2 - 1 = 1.83928675521416113255...
Theorem: A140099(n) - A140101(n) is always in {-1,0,1} (see A275926). (See also A276385.)
Comments from N. J. A. Sloane, Aug 30 2016: (Start) This is the same problem as the "Greedy Queens in a spiral" problem described in A273059. In A273059 the queens come in sets of 4, each set of 4 being on the same shell around the central square.
a(n) specifies the shell number for the successive sets of 4 (taking the central square to be shell 0, the 8 squares around the center to be shell 1, etc.).
For example, the queens at squares 9, 13, 17, 21 in the spiral (terms A273059(2)-A273059(5)) are all on shell a(1) = 2. The next four queens, at squares 82, 92, 102, 112, are on shell a(2) = 5.
The four "spokes" in A273059 are given in A275916-A275919. The precise connection with the current sequence is that a(n) = nearest integer to (1 + sqrt(A275917(n-1)+1))/2.
This sequence links together the spokes A275916-A275919 in the sense that A275918(n) = A275917(n)+2*a(n+1), A275919(n) = A275917(n)+4*a(n+1), and A275916(n+1) = A275917(n)+6*a(n+1).
(End)
Conjecture: a(n) = A003144(n) + n. (This is from my notebook Lattices 115 page 20 from Oct 25 2016. It is now a theorem - see the Dekking et al. paper.) - N. J. A. Sloane, Jul 22 2019
The sequence is "tribonacci-synchronized"; this means there is a finite automaton recognizing the tribonacci representation of (n,a(n)) input in parallel, where a shorter input is padded with leading zeros. This finite automaton has 23 states and was verified with Walnut. In particular this finite automaton and a similar one for A140101 was used to verify that (conjecture of J. Cassaigne) either a(b(n)) = a(n)+b(n) or b(a(n)) = a(n)+b(n) for all n>=1, where b(n) = A140100(n). - Jeffrey Shallit, Oct 04 2022

Examples

			Start with Y(0)=0, X(1)=1, Y(1)=2 ; Y(1)-X(1)=1, Y(1)+X(1)=3.
Next choose X(2)=3 and Y(2)=5; Y(2)-X(2)=2, Y(2)+X(2)=8.
Next choose X(3)=4 and Y(3)=8; Y(3)-X(3)=4, Y(3)+X(3)=12.
Next choose X(4)=6 and Y(4)=11; Y(4)-X(4)=5, Y(4)+X(4)=17.
Continue to choose the least positive X and Y > X not appearing earlier
such that Y-X and Y+X do not appear earlier as a difference or sum.
This sequence gives the y-coordinates of the positive quadrant in the construction given in the examples for A140100.
		

References

  • Robbert Fokkink, Gerard Francis Ortega, Dan Rust, Corner the Empress, arXiv:2204.11805. See Table 3.

Crossrefs

Cf. A140100 (complement); A140102, A140103, A275926 (deviation from A140099).
Cf. related Beatty sequences: A140098, A140099; A000201.
Cf. A058265 (tribonacci constant).
Cf. Greedy Queens in a spiral, A273059, A275916, A275917, A275918, A275919, A275925.
See also A276385.
For first differences of A140100, A140101, A140102, A140103 see A305392, A305374, A305393, A305394.
The indicator function of this sequence is A305386.

Programs

  • Maple
    See link.
  • Mathematica
    y[0] = 0; x[1] = 1; y[1] = 2;
    y[n_] := y[n] = For[yn = y[n - 1] + 1, True, yn++, For[xn = x[n - 1] + 1, xn < yn, xn++, xx = Array[x, n - 1]; yy = Array[y, n - 1]; If[FreeQ[xx, xn] && FreeQ[xx, yn] && FreeQ[yy, xn] && FreeQ[yy, yn] && FreeQ[yy - xx, yn - xn] && FreeQ[yy + xx, yn - xn], x[n] = xn; Return[yn]]]];
    Table[y[n], {n, 0, 100}] (* Jean-François Alcover, Jun 17 2018 *)
  • PARI
    /* Print (x,y) coordinates of the positive quadrant */ {X=[1];Y=[2];D=[1];S=[3];print1("["X[1]","Y[1]"],"); for(n=1,100,for(j=2,2*n,if(setsearch(Set(concat(X,Y)),j)==0,Xt=concat(X,j); for(k=j+1,3*n,if(setsearch(Set(concat(Xt,Y)),k)==0, if(setsearch(Set(concat(D,S)),k-j)==0,if(setsearch(Set(concat(D,S)),k+j)==0, X=Xt;Y=concat(Y,k);D=concat(D,k-j);S=concat(S,k+j); print1("["X[ #X]","Y[ #Y]"],");break);break))))))}

Formula

CONJECTURE: the limit of a(n)/n = 1+t and limit of X(n)/n = 1+1/t so that limit of a(n)/X(n) = t = tribonacci constant (A058265), and thus the limit of [a(n) + X(n)]/[a(n) - X(n)] = t^2 and the limit of [a(n)^2 + X(n)^2]/[a(n)^2 - X(n)^2] = t.
Conjectured recursion: Take first differences: 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, ... (appears to consist of only 3's and 2's); list the run lengths: 3, 1, 6, 1, 5, 1, 6, 1, 3, 1, 6, 1, 5, 1, 6, 1, ... (it appears that every second term is 1 and the other terms are 3, 5, and 6); and bisect, getting 3, 6, 5, 6, 3, 6, 5, 6, 6, 5, 6, 3, 6, ... This is (although I do not have a proof) the recursively defined A275925. Thanks to Alois P. Heinz for providing enough terms of A273059 to enable a (morally) convincing check of this conjecture. - N. J. A. Sloane, Aug 30 2016
From Michel Dekking, Mar 17 2019: (Start)
This conjecture can be reformulated as follows (cf. A140100).
The first differences of (a(n)) = (Y(n)) as a word are given by
3 delta(x),
where x is the tribonacci word x = A092782, and delta is the morphism
1 -> 3333332,
2 -> 333332,
3 -> 3332.
This conjecture implies the frequency conjecture above: let N(i,n) be the number of letters i in a(1)a(2)...a(n). Then simple counting gives
a(7*N(1,n)+6*N(2,n)+4*N(3,n)) = 20*N(1,n)+17*N(2,n)+11*N(3,n), where we neglected the first symbol of a = Y.
It is well known (see, e.g., A092782) that the frequencies of 1, 2 and 3 in x are respectively 1/t, 1/t^2 and 1/t^3. Dividing all the N(i,n) by n, and letting n tend to infinity, we then have to see that
20/t + 17/t^2 + 11/t^3 = (1+t)*(7/t + 6/t^2 + 4/t^3).
This is a simple verification, using t^3 = t^2 + t + 1.
(End)

Extensions

Terms computed independently by Reinhard Zumkeller and Joshua Zucker
Edited and a(0)=0 added by N. J. A. Sloane, Aug 30 2016

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 *)
Showing 1-10 of 40 results. Next