A284620 {00->2}-transform of the infinite Fibonacci word A003849.
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
Examples
As a word, A003849 = 01001010010010100..., and replacing each 00 by 2 gives 012101212101210...
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
- J.-P. Allouche and F. M. Dekking, Generalized Beatty sequences and complementary triples, Moscow Journal of Combinatorics and Number Theory 8, 325-341 (2019).
- M. Dekking, Morphic words, Beatty sequences and integer images of the Fibonacci language, Theoretical Computer Science 809, 407-417 (2020).
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
Comments