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 A090239 #20 Mar 19 2025 07:40:18 %S A090239 2,0,1,0,1,2,1,2,0,0,1,2,1,2,0,2,0,1,1,2,0,2,0,1,0,1,2,0,1,2,1,2,0,2, %T A090239 0,1,1,2,0,2,0,1,0,1,2,2,0,1,0,1,2,1,2,0,1,2,0,2,0,1,0,1,2,2,0,1,0,1, %U A090239 2,1,2,0,0,1,2,1,2,0,2,0,1,0,1,2,1,2,0,2,0,1,1,2,0,2,0,1,0,1,2,2,0,1,0,1,2 %N A090239 a(n) = A053838(n) + 2 modulo 3. %C A090239 Can construct sequence by starting with 2 and mapping 0->012, 1->120, 2->201 (e.g., 2, 201, 201012120, ...) and looking at n-th digit of a term with sufficient digits. %H A090239 Paolo Xausa, <a href="/A090239/b090239.txt">Table of n, a(n) for n = 0..19682</a> %F A090239 a(n) = mod(n+a([n/3]), 3), a(0)=2. - _Michael Somos_, Feb 14 2004 %t A090239 First[SubstitutionSystem[{0 -> {0, 1, 2}, 1 -> {1, 2, 0}, 2 -> {2, 0, 1}}, 2, {5}]] (* _Paolo Xausa_, Mar 17 2025 *) %o A090239 (PARI) a(n)=if(n<0,0,2*(n==0),(n+a(n\3))%3) /* _Michael Somos_, Feb 14 2004 */ %Y A090239 Cf. A053838, A090193. %K A090239 nonn %O A090239 0,1 %A A090239 _Philippe Deléham_, Feb 04 2004