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 A065031 #13 Mar 31 2017 22:06:16 %S A065031 2,1,2,1,2,1,2,1,2,1,12,11,12,11,12,11,12,11,12,11,22,21,22,21,22,21, %T A065031 22,21,22,21,12,11,12,11,12,11,12,11,12,11,22,21,22,21,22,21,22,21,22, %U A065031 21,12,11,12,11,12,11,12,11,12,11,22,21,22,21,22,21,22,21,22,21 %N A065031 In the decimal expansion of n, replace each odd digit with 1 and each even digit with 2. %C A065031 A196563(a(n)) = A196563(n); A196564(a(n)) = A196564(n). %H A065031 Reinhard Zumkeller, <a href="/A065031/b065031.txt">Table of n, a(n) for n = 0..10000</a> %e A065031 a(123)=121 because 1 and 3 are odd and 2 is even. %t A065031 Table[FromDigits[If[OddQ[#],1,2]&/@IntegerDigits[n]],{n,0,120}] (* _Harvey P. Dale_, Jun 08 2014 *) %o A065031 (Haskell) %o A065031 a065031 n = f n where %o A065031 f x | x < 10 = 2 - x `mod` 2 %o A065031 | otherwise = 10 * (f x') + 2 - m `mod` 2 %o A065031 where (x',m) = divMod x 10 %o A065031 -- _Reinhard Zumkeller_, Feb 22 2012 %K A065031 base,nonn %O A065031 0,1 %A A065031 _Santi Spadaro_, Nov 03 2001