OFFSET
1,3
COMMENTS
The sequence is generated by applying the coding 0->1 1->1 2->2 3->2 4->1 5->1 6->1 7->2 8->1 9->1 to the fixed point of the sequence generated by iterating the morphism 0->01 1->2 2->45 3->91 4->67 5->4 6->28 7->9 8->6 9->31. Alternatively, there is a 10-state automaton to compute the n-th term (where the input is the Zeckendorf representation of n).
LINKS
A.H.M. Smeets, Table of n, a(n) for n = 1..20000
FORMULA
a(2*n) = 1. - A.H.M. Smeets, Mar 31 2024
EXAMPLE
The first 6 terms of A003849 are 0,1,0,0,1,0 so the first 4 terms of the run-length encoding are 1,1,2,1.
MATHEMATICA
Map[Length, Most[Split[Nest[Flatten[ReplaceAll[#, {0 -> {0, 1}, 1 -> 0}]] &, 0, 10]]]] (* Paolo Xausa, Apr 30 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, May 15 2023
STATUS
approved