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 A071412 #9 May 19 2023 08:03:47 %S A071412 0,1,1,2,1,0,2,0,1,1,0,2,2,2,0,1,1,2,1,1,0,2,2,1,2,1,2,2,0,1,1,2,1,0, %T A071412 2,0,1,2,1,1,0,2,2,1,2,0,1,0,2,0,1,0,2,1,2,2,0,1,1,2,1,0,2,0,1,1,0,2, %U A071412 2,2,0,1,1,0,2,0,1,2,1,1,0,2,2,1,2,0,1,0,2,2,0,1,1,1,0,2,2,2,0,1,1,1,0,2,2 %N A071412 A002487 mod 3. %D A071412 E. Dijkstra, Selected Writings on Computing, Springer, 1982, p. 232 (sequence is called fusc). %H A071412 E. W. Dijkstra, <a href="http://www.cs.utexas.edu/users/EWD/ewd05xx/EWD570.PDF">An exercise for Dr. R. M. Burstall</a> %H A071412 E. W. Dijkstra, <a href="http://www.cs.utexas.edu/users/EWD/ewd05xx/EWD578.PDF">More about the function ``fusc''</a> %o A071412 (Python) %o A071412 from functools import reduce %o A071412 def A071412(n): return sum(reduce(lambda x,y:(x[0],(x[0]+x[1])%3) if int(y) else ((x[0]+x[1])%3,x[1]),bin(n)[-1:2:-1],(1,0)))%3 if n else 0 # _Chai Wah Wu_, May 18 2023 %K A071412 nonn %O A071412 0,4 %A A071412 _N. J. A. Sloane_, Jul 15 2002