A014675 The infinite Fibonacci word (start with 1, apply 1->2, 2->21, take limit).
2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2
Offset: 0
References
- D. Gault and M. Clint, "Curiouser and curiouser" said Alice. Further reflections on an interesting recursive function, Internat. J. Computer Math., 26 (1988), 35-43. See Table 2.
- D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7, p. 36.
- G. Melançon, Factorizing infinite words using Maple, MapleTech journal, vol. 4, no. 1, 1997, pp. 34-42, esp. p. 36.
Links
- T. D. Noe, Table of n, a(n) for n = 0..10945 (20 iterations)
- M. Bunder and K. Tognetti, On the self matching properties of [j tau], Discrete Math., 241 (2001), 139-151.
- D. Gault and M. Clint, "Curiouser and curiouser said Alice. Further reflections on an interesting recursive function, Intern. J. Computer. Math., 26 (1988), 35-43. (Annotated scanned copy)
- J. Grytczuk, Infinite semi-similar words, Discrete Math. 161 (1996), 133-141.
- G. Melançon, Lyndon factorization of sturmian words, Discr. Math., 210 (2000), 137-149.
- N. J. A. Sloane, Families of Essentially Identical Sequences, Mar 24 2021 (Includes this sequence)
- Index entries for sequences that are fixed points of mappings
Crossrefs
This is the {2,1} version. The standard form is A003849 (alphabet {0,1}). See also A005614 (alphabet {1,0}), A003842 (alphabet {1,2} instead of {2,1}).
Equals A001468 except for initial term.
Differs from A025143 in many entries starting at entry 8.
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
-
Maple
Digits := 50: t := evalf( (1+sqrt(5))/2); A014675 := n->floor((n+2)*t)-floor((n+1)*t);
-
Mathematica
Nest[ Flatten[ # /. {1 -> 2, 2 -> {2, 1}}] &, {1}, 11] (* Robert G. Wilson v *) SubstitutionSystem[{1->{2},2->{2,1}},{1},{11}][[1]] (* Harvey P. Dale, Jan 01 2023 *)
-
PARI
first(n)=my(v=[1],u); while(#v
Charles R Greathouse IV, Jun 21 2017 -
PARI
apply( {A014675(n,r=quadgen(5)-1)=(n+2)\r-(n+1)\r}, [0..99]) \\ M. F. Hasler, Apr 07 2021, improved on suggestion from Kevin Ryde, Apr 23 2021
-
Python
from math import isqrt def A014675(n): return (n+2+isqrt(m:=5*(n+2)**2)>>1)-(n+1+isqrt(m-10*n-15)>>1) # Chai Wah Wu, Aug 10 2022
Formula
Extensions
Corrected by N. J. A. Sloane, Nov 07 2001
Comments