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.

A381577 Unique sequence of 0's, 1's, and 2's such that for any terms x and y with x < y, the subsequence of x's and y's becomes the Thue-Morse sequence after substitution x -> 0, y -> 1.

This page as a plain text file.
%I A381577 #9 Feb 28 2025 13:49:23
%S A381577 0,1,2,2,1,0,2,1,0,0,1,2,2,1,0,0,1,2,0,1,2,2,1,0,2,1,0,0,1,2,0,1,2,2,
%T A381577 1,0,0,1,2,2,1,0,2,1,0,0,1,2,2,1,0,0,1,2,0,1,2,2,1,0,0,1,2,2,1,0,2,1,
%U A381577 0,0,1,2,0,1,2,2,1,0,2,1,0,0,1,2,2,1,0
%N A381577 Unique sequence of 0's, 1's, and 2's such that for any terms x and y with x < y, the subsequence of x's and y's becomes the Thue-Morse sequence after substitution x -> 0, y -> 1.
%F A381577 In the Thue-Morse sequence, substitute 0 -> 012, 1 -> 210 once.
%o A381577 (Python)
%o A381577 def A381577(n): return ((2,1,0) if (n//3).bit_count()&1 else (0,1,2))[n%3] # _Chai Wah Wu_, Feb 28 2025
%Y A381577 Cf. the Thue-Morse sequence A010060 and its other ternary generalizations: A053838, A287150.
%K A381577 nonn,easy
%O A381577 0,3
%A A381577 _Andrey Zabolotskiy_, Feb 28 2025