A246105 Least m > 0 for which (s(m),...,s(n+m-1)) = (s(n),...,s(0)), the reverse of the first n+1 terms of the infinite Fibonacci word A003849.
2, 1, 3, 2, 1, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13
Offset: 0
Examples
reverse(s(0),...,s(6)) = reverse(0,1,0,0,1,0,1) = (1,0,1,0,0,1,0) first repeats in A003849 at (s(4),...,s(10)), so that a(6) = 4.
Programs
-
Mathematica
s = Flatten[Nest[{#, #[[1]]} &, {0, 1}, 12]]; b[m_, n_] := b[m, n] = Take[s, {m, n}]; t = -1 + Flatten[Table[Select[Range[2, 1600], b[#, n + # - 1] == Reverse[b[1, n]] &, 1], {n, 1, 120}]]
Formula
Concatenation of blocks (F(k), F(k - 1), ..., F(3), F(2)) beginning with k = 3, where F = A000045 (Fibonacci numbers).