OFFSET
0,3
FORMULA
In the Thue-Morse sequence, substitute 0 -> 012, 1 -> 210 once.
PROG
(Python)
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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Andrey Zabolotskiy, Feb 28 2025
STATUS
approved
