cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A248057 Positions of 1,1 in the Thue-Morse sequence (A010060).

This page as a plain text file.
%I A248057 #23 Jun 16 2025 08:45:56
%S A248057 2,8,14,22,26,32,38,42,50,56,62,70,74,82,88,94,98,104,110,118,122,128,
%T A248057 134,138,146,152,158,162,168,174,182,186,194,200,206,214,218,224,230,
%U A248057 234,242,248,254,262,266,274,280,286,290,296,302,310,314,322,328
%N A248057 Positions of 1,1 in the Thue-Morse sequence (A010060).
%C A248057 Every positive integer lies in exactly one of these four sequences: A248056, A091855, A091855, A248057.
%H A248057 Clark Kimberling, <a href="/A248057/b248057.txt">Table of n, a(n) for n = 1..1000</a>
%F A248057 a(n) = 2*A091855(n) for n >= 1.
%F A248057 a(n) = A157971(n) + 1. - _Amiram Eldar_, Jun 16 2025
%e A248057 Thue-Morse sequence:  0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,..., so that a(1) = 2 and a(2) = 8.
%t A248057 z = 400; u = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 9] (* A010060 *)
%t A248057 v = Rest[u]
%t A248057 t1 = Table[If[u[[n]] == 0 && v[[n]] == 0, 1, 0], {n, 1, z}];
%t A248057 t2 = Table[If[u[[n]] == 0 && v[[n]] == 1, 1, 0], {n, 1, z}];
%t A248057 t3 = Table[If[u[[n]] == 1 && v[[n]] == 0, 1, 0], {n, 1, z}];
%t A248057 t4 = Table[If[u[[n]] == 1 && v[[n]] == 1, 1, 0], {n, 1, z}];
%t A248057 Flatten[Position[t1, 1]]  (* A248056 *)
%t A248057 Flatten[Position[t2, 1]]  (* A091855 *)
%t A248057 Flatten[Position[t3, 1]]  (* A091785 *)
%t A248057 Flatten[Position[t4, 1]]  (* A248057 *)
%t A248057 SequencePosition[ThueMorse[Range[400]],{1,1}][[All,2]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 16 2017 *)
%o A248057 (PARI) t(n)=hammingweight(n)%2;
%o A248057 for(n=1,500,if(t(n)==1&&t(n-1)==1,print1(n,", "))); \\ _Joerg Arndt_, Mar 12 2022
%Y A248057 Cf. A010060, A091855, A091785, A157971, A248056.
%K A248057 nonn,easy
%O A248057 1,1
%A A248057 _Clark Kimberling_, Sep 30 2014