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.
%I A089215 #28 Jun 25 2022 22:53:56 %S A089215 1,2,3,2,4,3,2,3,5,4,3,4,2,3,4,3,6,5,4,5,3,4,5,4,2,3,4,3,5,4,3,4,7,6, %T A089215 5,6,4,5,6,5,3,4,5,4,6,5,4,5,2,3,4,3,5,4,3,4,6,5,4,5,3,4,5,4,8,7,6,7, %U A089215 5,6,7,6,4,5,6,5,7,6,5,6,3,4,5,4,6,5,4,5,7,6,5,6,4,5,6,5,2,3,4,3,5,4,3,4,6 %N A089215 Thue-Morse sequence on the integers. %C A089215 Sequence is S(infinity) where S(1)={1,2} and S(n+1)=S(n)S'(n) where S'(n) is obtained from S(n) by substituting an element x of S(n) with M(n)-x where M(n)=2+Max{S(n)}. %C A089215 For comparison, the Thue-Morse sequence on alphabet {1,2} is constructed as follows: S(1)={1,2} and S(n+1)=S(n)S'(n) where S'(n) is obtained from S(n) by substituting an element x of S(n) with 3-x. %F A089215 Sum_{k=1..n} a(k) is asymptotic to C*n*log(n) with C=0.8.... %F A089215 a(n) = A209281(n) + 1. - _Kevin Ryde_, Jun 25 2022 %e A089215 S(1)={1,2} then M(1)=4 and S'(1)={4-1,4-2}={3,2}. So S(2)={1,2,3,2}. M(2)=5 so S(3)={1,2,3,2}{5-1,5-2,5-3,5-2} and sequence begins 1,2,3,2,4,3,2,3,... %o A089215 (PARI) a(n) = n--; my(s=1,h); while((h = n>>s), n=bitxor(n,h); s<<=1); hammingweight(n) + 1; \\ _Kevin Ryde_, Jun 25 2022 %Y A089215 Cf. A001285, A209281. %K A089215 nonn,easy %O A089215 1,2 %A A089215 _Benoit Cloitre_, Dec 10 2003