A270788 Unique fixed point of the 3-symbol Fibonacci morphism phi-hat_2.
1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3
Offset: 1
Links
- Joerg Arndt, Table of n, a(n) for n = 1..1000
- F. Michel Dekking, Morphisms, Symbolic Sequences, and Their Standard Forms, Journal of Integer Sequences, Vol. 19 (2016), Article 16.1.1.
- Shuo Li, Zeckendorf expansion, Dirichlet series and infinite series involving the infinite Fibonacci word, arXiv:2106.05672 [math.NT], 2021.
Programs
-
Maple
with(ListTools); psi:=proc(S) Flatten(subs( {1=[1,2], 2=[3], 3=[1,2]}, S)); end; S:=[1]; for n from 1 to 10 do S:=psi(S): od: S;
-
Mathematica
m = 121; (* number of terms required *) S[1] = {1}; S[n_] := S[n] = SubstitutionSystem[{1 -> {1, 2}, 2 -> {3}, 3 -> {1, 2}}, S[n-1]]; For[n = 2, True, n++, If[PadRight[S[n], m] == PadRight[S[n-1], m], Print["n = ", n]; Break[]]]; Take[S[n], m] (* Jean-François Alcover, Feb 15 2023 *)
-
Python
from math import isqrt def A270788(n): return (1,3,2)[((m:=(n+2+isqrt(5*(n+2)**2)>>1)-n-2)+isqrt(5*m**2)>>1)-((k:=(n+1+isqrt(5*(n+1)**2)>>1)-n-1)+isqrt(5*k**2)>>1)] # Chai Wah Wu, May 22 2025
Formula
Let A(n)=floor(n*tau), B(n)=n+floor(n*tau), i.e., A and B are the lower and upper Wythoff sequences, A=A000201, B=A001950. Then a(n)=1 if n=A(A(k)) for some k; a(n)=2 if n=B(k) for some k; a(n)=3 if n=A(B(k)) for some k. - Michel Dekking, Dec 27 2016
Extensions
More terms from Joerg Arndt, Apr 10 2016
Offset changed to 1 by Michel Dekking, Dec 27 2016
Comments