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

A005614 The binary complement of the infinite Fibonacci word A003849. Start with 1, apply 0->1, 1->10, iterate, take limit.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Previous name was: The infinite Fibonacci word (start with 1, apply 0->1, 1->10, iterate, take limit).
Characteristic function of A022342. - Philippe Deléham, May 03 2004
a(n) = number of 0's between successive 1's (see also A003589 and A007538). - Eric Angelini, Jul 06 2005
With offset 1 this is the characteristic sequence for Wythoff A-numbers A000201=[1,3,4,6,...].
Eric Angelini's comment made me think that if 1 is defined to be the number of 0's between successive 1's in a string of 0's and 1's, then this string is 101. Applying the same operation to the digits of 101 leads to 101101, the iteration leads to successive palindromes of lengths given by A001911, up to a(n). - Rémi Schulz, Jul 06 2010
For generalized Fibonacci words see A221150, A221151, A221152, ... - Peter Bala, Nov 11 2013
The limiting mean of the first n terms is phi - 1; the limiting variance is phi (A001622). - Clark Kimberling, Mar 12 2014
Apply the difference operator to every column of the Wythoff difference array, A080164, to get an array of Fibonacci numbers, F(h). Replace each F(h) with h, and apply the difference operator to every column. In the resulting array, every column is A005614. - Clark Kimberling, Mar 02 2015
Binary expansion of the rabbit constant A014565. - M. F. Hasler, Nov 10 2018

Examples

			The infinite word is 101101011011010110101101101011...
		

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003.
  • G. Melançon, Factorizing infinite words using Maple, MapleTech journal, vol. 4, no. 1, 1997, pp. 34-42, esp. p. 36.

Crossrefs

Binary complement of A003849, which is the standard form of this sequence.
Two other essentially identical sequences are A096270, A114986.
Subwords: A178992, A171676.
Cf. A000045 (Fibonacci numbers), A001468, A001911, A005206 (partial sums), A014565, A014675, A022342, A036299, A044432, A221150, A221151, A221152.
Cf. A339051 (odd bisection), A339052 (even bisection).
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A000201 as the parent: A000201, A001030, A001468, A001950, A003622, A003842, A003849, A004641, A005614, A014675, A022342, A088462, A096270, A114986, A124841. - N. J. A. Sloane, Mar 11 2021

Programs

  • Haskell
    a005614 n = a005614_list !! n
    a005614_list = map (1 -) a003849_list
    -- Reinhard Zumkeller, Apr 07 2012
    
  • Magma
    [Floor((n+1)*(-1+Sqrt(5))/2)-Floor(n*(-1+Sqrt(5))/2): n in [1..100]]; // Vincenzo Librandi, Jan 17 2019
    
  • Maple
    Digits := 50; u := evalf((1-sqrt(5))/2); A005614 := n->floor((n+1)*u)-floor(n*u);
  • Mathematica
    Nest[ Flatten[ # /. {0 -> {1}, 1 -> {1, 0}}] &, {1}, 10] (* Robert G. Wilson v, Jan 30 2005 *)
    Flatten[Nest[{#, #[[1]]} &, {1, 0}, 9]] (* IWABUCHI Yu(u)ki, Oct 23 2013 *)
    SubstitutionSystem[{0 -> {1}, 1 -> {1, 0}}, {1, 0}, 9] // Last (* Jean-François Alcover, Feb 06 2020 *)
  • PARI
    a(n,w1,s0,s1)=local(w2); for(i=2,n,w2=[ ]; for(k=1,length(w1),w2=concat(w2, if(w1[ k ],s1,s0))); w1=w2); w2
    for(n=2,10,print(n" "a(n,[ 0 ],[ 1 ],[ 1,0 ]))) \\ Gives successive convergents to sequence
    
  • PARI
    /* for m>=1 compute exactly A183136(m+1)+1 terms of the sequence */
    r=(1+sqrt(5))/2;v=[1,0];for(n=2,m,v=concat(v,vector(floor((n+1)/r),i,v[i]));a(n)=v[n];) /* Benoit Cloitre, Jan 16 2013 */
    
  • Python
    from math import isqrt
    def A005614(n): return (n+isqrt(m:=5*(n+2)**2)>>1)-(n+1+isqrt(m-10*n-15)>>1) # Chai Wah Wu, Aug 17 2022

Formula

Define strings S(0)=1, S(1)=10, thereafter S(n)=S(n-1)S(n-2); iterate. Sequence is S(oo). The individual S(n)'s are given in A036299.
a(n) = floor((n+2)*u) - floor((n+1)*u), where u = (-1 + sqrt(5))/2.
Sum_{n>=0} a(n)/2^(n+1) = A014565. - R. J. Mathar, Jul 19 2013
From Peter Bala, Nov 11 2013: (Start)
If we read the present sequence as the digits of a decimal constant c = 0.101101011011010 ... then we have the series representation c = Sum_{n >= 1} 1/10^floor(n*phi). An alternative representation is c = Sum_{n >= 1} 1/10^floor(n/phi) - 10/9.
The constant 9*c has the simple continued fraction representation [0; 1, 10, 10, 100, 1000, ..., 10^Fibonacci(n), ...]. See A010100.
Using this result we can find the alternating series representation c = 1/9 - 9*Sum_{n >= 1} (-1)^(n+1)*(1 + 10^Fibonacci(3*n+1))/( (10^(Fibonacci(3*n - 1)) - 1)*(10^(Fibonacci(3*n + 2)) - 1) ). The series converges very rapidly: for example, the first 10 terms of the series give a value for c accurate to more than 5.7 million decimal places. Cf. A014565. (End)
a(n) = A005206(n+1) - A005206(n). a(2*n) = A339052(n); a(2*n+1) = A339051(n+1). - Peter Bala, Aug 09 2022

Extensions

Corrected by Clark Kimberling, Oct 04 2000
Name corrected by Michel Dekking, Apr 02 2019

A316342 Fibonacci word A003849 with first two terms replaced by 2's.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 14 2018

Keywords

Comments

A word that is morphic; but neither pure morphic, uniform morphic, primitive morphic, nor recurrent.

Crossrefs

Cf. A003849.
Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.

Programs

  • Mathematica
    Join[{2, 2}, SubstitutionSystem[{0 -> {0, 1}, 1 -> {0}}, {0}, {10}][[1, 3;;]]] (* Paolo Xausa, Jan 30 2025 *)

A316825 Fibonacci word A003849 with its initial term changed to 2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 14 2018

Keywords

Comments

A word that is pure morphic, but neither uniform morphic, primitive morphic, nor recurrent.

Crossrefs

Cf. A003849.
Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.

Programs

  • Mathematica
    Join[{2}, SubstitutionSystem[{0 -> {0, 1}, 1 -> {0}}, {0}, {10}][[1, 2;;]]] (* Paolo Xausa, Jan 30 2025 *)

A085357 Common residues of binomial(3n,n)/(2n+1) modulo 2: relates ternary trees (A001764) to the infinite Fibonacci word (A003849).

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Jun 25 2003

Keywords

Comments

The n-th runs of ones is given by: 3 - A003849(n) (infinite Fibonacci word) = A076662(n+1). Runs of zeros are given by: A085358 and are also directly related to the Fibonacci sequence. Coefficients of A(x)^3 are found in A085359.
a(n) = 0 iff some binary digit of n is 1 while the corresponding binary digit of 3*n is 0. - Robert Israel, Jul 12 2016
The Run Length Transform of [0,1,0,0,0,...], A063524, the characteristic function of 1. (See A227349 for the definition). - Antti Karttunen, Oct 15 2016

Crossrefs

Cf. A001764 (ternary trees), A085358 (runs of zeros), A076662 (runs of ones), A003849 (infinite Fibonacci word), A085359 (A(x)^3).
Absolute values of A132971.

Programs

  • Magma
    [Binomial(3*n,n) mod 2: n in [0..100]]; // Vincenzo Librandi, Jul 09 2016
    
  • Maple
    f:= proc(n) local L,Lp;
      L:= convert(n,base,2);
      Lp:= convert(3*n,base,2);
      if has(L-Lp[1..nops(L)],1) then 0 else 1 fi
    end proc:
    map(f, [$0..100]); # Robert Israel, Jul 12 2016
  • Mathematica
    Table[Mod[Binomial[3 n, n], 2], {n, 0, 120}] (* Michael De Vlieger, Jul 08 2016 *)
  • PARI
    A085357(n) = !bitand(n,n<<1); \\ Antti Karttunen, Aug 22 2019
    
  • Python
    def A085357(n): return int(not n&(n<<1)) # Chai Wah Wu, Jun 25 2025

Formula

G.f.: 1 + x*A(x)^3 = A(x) (Mod 2); a(n) = A001764(n) (Mod 2).
a(n) = binomial(3n, n) (mod 2). Characteristic function of Fibbinary numbers (i.e. a(n)=1 iff n is in A003714). - Benoit Cloitre, Nov 15 2003
Recurrence: a(0) = 1, a(2n) = a(4n+1) = a(n), a(4n+3) = 0.
a(n-2) = A000256(n)(mod 2), for n>2. - John M. Campbell, Jul 08 2016
a(n) = A000621(n+1)(mod 2). - John M. Campbell, Jul 15 2016
a(n) = A000625(n)(mod 2). - John M. Campbell, Jul 15 2016
a(n) = A008966(A005940(1+n)). [Follows from the Run Length Transform interpretation, see also A277010.] - Antti Karttunen, Oct 15 2016
a(n) = abs(A132971(n)) = abs(A008683(A005940(1+n))). - Antti Karttunen, May 30 2017

A182028 Take first n bits of the infinite Fibonacci word A003849, regard them as a binary number, then convert it to base 10.

Original entry on oeis.org

0, 1, 2, 4, 9, 18, 37, 74, 148, 297, 594, 1188, 2377, 4754, 9509, 19018, 38036, 76073, 152146, 304293, 608586, 1217172, 2434345, 4868690, 9737380, 19474761, 38949522, 77899045, 155798090, 311596180, 623192361, 1246384722, 2492769444, 4985538889, 9971077778
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 07 2012

Keywords

Comments

a(n) mod 2 = A003849(n);
a(n) = A000225(n+1) - A044432(n).

Examples

			0 ->                            0 -> a(0) = 0,
0,1 ->                         01 -> a(1) = 1,
0,1,0 ->                      010 -> a(2) = 2,
0,1,0,0 ->                   0100 -> a(3) = 4,
0,1,0,0,1 ->                01001 -> a(4) = 9,
0,1,0,0,1,0 ->             010010 -> a(5) = 18,
0,1,0,0,1,0,1 ->          0100101 -> a(6) = 37
0,1,0,0,1,0,1,0 ->       01001010 -> a(7) = 74
0,1,0,0,1,0,1,0,0 ->    010010100 -> a(8) = 148,
0,1,0,0,1,0,1,0,0,1 -> 0100101001 -> a(9) = 297.
		

Crossrefs

Programs

  • Haskell
    a182028 n = a182028_list !! n
    a182028_list = scanl1 (\v b -> 2 * v + b) a003849_list
  • Mathematica
    nesting = 7; A003849 = Flatten[Nest[{#, #[[1]]}&, {0, 1}, nesting]]; a[n_] := FromDigits[Take[A003849, n+1], 2]; Table[a[n], {n, 0, Length[A003849] - 1}] (* Jean-François Alcover, Feb 13 2016 *)

Formula

a(n) = 2*a(n-1) + A003849(n) for n > 0, a(0) = 0.

A187200 Parse the Fibonacci word A003849 into distinct phrases 0, 1, 00, 10, 100, 1001, 01, 001, 010, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 5, 4, 5, 5, 6, 6, 5, 5, 6, 6, 7, 7, 7, 8, 7, 6, 8, 9, 6, 6, 10, 7, 8, 8, 7, 8, 7, 11, 7, 9, 8, 9, 8, 10, 9, 8, 9, 8, 9, 9, 9, 12, 10, 10, 9, 10, 9, 11, 10, 13, 12, 10, 10, 11, 11, 11, 10, 11, 11, 14, 11, 12, 12, 11, 13, 10, 12, 12, 11, 12, 13, 12, 13, 14, 13, 11, 13, 14, 15, 14, 13, 16, 15, 12, 12, 17
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Crossrefs

A284749 {001->2}-transform of the infinite Fibonacci word A003849.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 02 2017

Keywords

Comments

From Daniel Rust, Aug 18 2018: (Start)
This word is the fixed point of the morphism 0->2, 1->01, 2->2201 with the finite string 0, 1, 2, 0, 1 appended to the beginning. This morphism comes from taking the 'proper' version of the Fibonacci morphism 0->01, 1->1, given by 0->001, 1->01 (A189661 but with the rightmost 0 moved to the left of each image word), then replacing 001 with 2 and noting that the new symbol 2 should map to 00100101 = 2201 in order to be consistent.
The finite string appended to the beginning comes from the process of finding a proper version of the Fibonacci morphism using a return word encoding and taking conjugates which causes a shift of the respective fixed points.
(End)
This sequence is the unique fixed point of the morphism 0->01, 1->2, 2->0122. See the paragraph following Lemma 23 in the paper by Allouche and me. - Michel Dekking, Oct 05 2018

Examples

			As a word, A003849 = 01001010010010100..., and replacing each 001 by 2 gives 01201220120...
		

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 13]  (* A003849 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"001" -> "2"}]
    st = ToCharacterCode[w1] - 48 (* A284749 *)
    Flatten[Position[st, 0]]  (* A214971 *)
    Flatten[Position[st, 1]]  (* A284624 *)
    Flatten[Position[st, 2]]  (* A284625 *)
  • Python
    from math import isqrt
    def A284624(n): return (n<<1)+(n-1+isqrt(5*(n-1)**2)>>1)
    def A284625(n): return (n+isqrt(5*n**2)&-2)-n+2
    def A284749(n):
        def bsearch(f, n):
            kmin, kmax = 0, 1
            while f(kmax) <= n:
                kmax <<= 1
            kmin = kmax>>1
            while True:
                kmid = kmax+kmin>>1
                if f(kmid) > n:
                    kmax = kmid
                else:
                    kmin = kmid
                if kmax-kmin <= 1:
                    break
            return kmin
        for i, f in enumerate((A284624, A284625),1):
            if f(bsearch(f,n))==n: return i
        return 0 # Chai Wah Wu, May 22 2025

A383423 Indices k such that A003849(k) = 0 and A383422(k) = 0.

Original entry on oeis.org

0, 3, 7, 10, 11, 15, 18, 21, 28, 29, 32, 36, 39, 44, 47, 50, 54, 57, 58, 62, 65, 68, 75, 76, 79, 83, 86, 87, 91, 94, 97, 104, 105, 109, 112, 115, 120, 123, 126, 130, 133, 134, 138, 141, 144, 151, 152, 155, 159, 162, 167, 170, 173, 180, 181, 185, 188, 191
Offset: 1

Views

Author

Clark Kimberling, Apr 27 2025

Keywords

Comments

The positive integers are partitioned by this sequence together with A383424, A383425, and A383426.
Conjecture: {a(n) - a(n-1), n>=2} = {1, 3, 4, 5, 7}.

Crossrefs

Programs

  • Mathematica
    wF = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 15];  (* A003849 *)
    s[0] = "0"; s[1] = "011"; s[n_] := StringJoin[s[n - 1], s[n - 2]]; (* A383422 *)
    wL = Join[{0}, IntegerDigits[FromDigits[s[15]]]];
    -1+Select[Range[400], wF[[#]] == wL[[#]] == 0 &]
  • Python
    from itertools import count, islice
    from math import isqrt
    def A383423_gen(): # generator of terms
        for n in count(1):
            if ((k:=(n+isqrt(5*n**2)&-2)-n)+1+isqrt(m:=5*(k+1)**2)>>1)-(k+isqrt(m-10*k-5)>>1)==2: yield k-1
    A383423_list = list(islice(A383423_gen(),58)) # Chai Wah Wu, May 22 2025

A383426 Indices k such that A003849(k) = 1 and A383422(k) = 0.

Original entry on oeis.org

4, 14, 22, 25, 33, 40, 43, 51, 61, 69, 72, 80, 90, 98, 101, 108, 116, 119, 127, 137, 145, 148, 156, 163, 166, 174, 177, 184, 192, 195, 203, 213, 221, 224, 232, 239, 242, 250, 260, 268, 271, 279, 286, 289, 297
Offset: 1

Views

Author

Clark Kimberling, Apr 27 2025

Keywords

Comments

The positive integers are partitioned by this sequence together with A383423, A383424, and A383425.
Conjecture: {a(n) - a(n-1), n>=2} = {3, 7, 8, 10}.

Crossrefs

Programs

  • Mathematica
    wF = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 15];  (* A003849 *)
    s[0] = "0"; s[1] = "011"; s[n_] := StringJoin[s[n - 1], s[n - 2]]; (* A383422 *)
    wL = Join[{0}, IntegerDigits[FromDigits[s[15]]]];
    -1+Select[Range[400], wF[[#]] == 1 && wL[[#]] == 0 &]
  • Python
    from math import isqrt
    from itertools import count, islice
    def A383426_gen(): # generator of terms
        for n in count(1):
            if ((k:=(n+isqrt(5*n**2)&-2)-n)+1+isqrt(m:=5*(k+1)**2)>>1)-(k+isqrt(m-10*k-5)>>1)==1: yield k-1
    A383426_list = list(islice(A383426_gen(),45)) # Chai Wah Wu, May 22 2025

A284620 {00->2}-transform of the infinite Fibonacci word A003849.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 02 2017

Keywords

Comments

From Michel Dekking, Mar 17 2020: (Start)
This sequence is a morphic sequence, i.e., the letter-to-letter image of the fixed point of a morphism mu. In fact, one can take the alphabet {A,B,C,D} with the morphism
mu: A->AB, B->CD, C->ABCD, D->CD,
and the letter-to-letter map lambda defined by
lambda: A->0, B->1, C->2, D->1.
Then (a(n)) = lambda(x), where x = ABCDABCDCD... is the unique fixed point of the morphism mu.
How does one see this? The infinite Fibonacci word
x_F = A003849 = 0100101001001....
can be written as a concatenation of the two words 01 and 001.
In fact, if beta is the Fibonacci morphism 0->01, 1->0, then beta(01)=010, beta(001)=01010, from which this can be read off.
This can also be found in Lemma 23 in Allouche and Dekking, which gives, moreover, that if we define the morphism g on the alphabet {a,b} by
g(a) = ab, g(b) =abb
then a(n) = delta(x_G(n)), where
x_G = ababbababb...
is the unique fixed point of g, and delta is the map
delta(a) = 01, delta(b) = 21.
In my paper "Morphic words,..." such a map delta is called a decoration.
It is well-known that decorated fixed points are morphic sequences, and the 'natural' algorithm to achieve this splits a in AB, and b in CD. This gives the morphism mu on the alphabet {A,B,C,D}, and the letter-to-letter map lambda.
We next prove the first conjecture by Kimberling. We easily see from the form of mu that the letters B and D occur, and only occur, at even positions in the fixed point x of mu. Since lambda(B)=lambda(D)=1, and A and C are not mapped to 1, it follows immediately that the positions of 1 in (a(n)) are given by A005843 = (2n).
For a proof of Kimberling's second conjecture, note that a(n)=2 iff x(n)=C, where x is the fixed point of mu. The return words of C in x are CD and CDAB. Coding these two return words by their lengths, mu induces a descendant morphism tau given by
tau(2) = 24, tau(4) = 244.
We see that tau is just an alphabet change of the morphism g. Let t = 2424424244... be the unique fixed point of tau. It is well-known (see, e.g., Lemma 12 in "Morphic words,..."), that t = 2 x_F, where x_F = x_F(4,2) now is the Fibonacci word on the alphabet {4,2}. The partial sums of x_F(4,2) are equal to the generalized Beatty sequence V given by
V(n) = 2*floor(n*phi) + 1,
according to Lemma 8 in the Allouche and Dekking paper.
This proves Kimberling's conjecture, provided we give the sequence A130568 offset 1, as we should.
(End)

Examples

			As a word, A003849 = 01001010010010100..., and replacing each 00 by 2 gives 012101212101210...
		

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 13]  (* A003849 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"00" -> "2"}]
    st = ToCharacterCode[w1] - 48 (* A284620 *)
    Flatten[Position[st, 0]]  (* A284621 *)
    Flatten[Position[st, 1]]  (* A005843 - conjectured *)
    Flatten[Position[st, 2]]  (* A130568 - conjectured *)
  • Python
    from math import isqrt
    def A130568(n): return (n+isqrt(5*n**2)&-2)|1
    def A284620(n):
        def bsearch(f, n):
            kmin, kmax = 0, 1
            while f(kmax) <= n:
                kmax <<= 1
            kmin = kmax>>1
            while True:
                kmid = kmax+kmin>>1
                if f(kmid) > n:
                    kmax = kmid
                else:
                    kmin = kmid
                if kmax-kmin <= 1:
                    break
            return kmin
        return (2 if n>1 and A130568(bsearch(A130568,n))==n else 0) if n&1 else 1 # Chai Wah Wu, May 22 2025
Showing 1-10 of 221 results. Next