OFFSET
1,1
COMMENTS
Or: union of the numbers of the form 4*A079523(n)+k, k=0, 1, 2, or 3.
Locates patterns of the form 1xxx1 or 0xxx0 in the Thue-Morse sequence.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
J.-P. Allouche, Thue, Combinatorics on words, and conjectures inspired by the Thue-Morse sequence, arXiv preprint arXiv:1401.3727 [math.NT], 2014.
J.-P. Allouche, Thue, Combinatorics on words, and conjectures inspired by the Thue-Morse sequence, J. de Théorie des Nombres de Bordeaux, 27, no. 2 (2015), 375-388.
V. Shevelev, Equations of the form t(x+a)=t(x) and t(x+a)=1-t(x) for Thue-Morse sequence arXiv:0907.0880 [math.NT], 2009-2012. [From Vladimir Shevelev, Jul 31 2009]
MATHEMATICA
tm[0] = 0; tm[n_?EvenQ] := tm[n] = tm[n/2]; tm[n_] := tm[n] = 1 - tm[(n-1)/2]; Reap[For[n = 0, n <= 200, n++, If[tm[n] == tm[n+4], Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2013 *)
SequencePosition[ThueMorse[Range[200]], {x_, _, _, _, x_}][[All, 1]] (* Requires Mathematica version 11 or later *) (* Harvey P. Dale, Apr 16 2017 *)
PROG
(PARI) is(n)=hammingweight(n)%2==hammingweight(n+4)%2 \\ Charles R Greathouse IV, Aug 20 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Jun 15 2009
EXTENSIONS
Extended by R. J. Mathar, Aug 28 2009
STATUS
approved