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 A248336 #9 Oct 13 2014 16:23:45 %S A248336 0,10,12,1000,1022,100000,100222,10000000,10002222,1000000000, %T A248336 1000022222,100000000000,100000222222,10000000000000,10000002222222, %U A248336 1000000000000000,1000000022222222,100000000000000000,100000000222222222,10000000000000000000 %N A248336 Smallest number m such that the Levenshtein distance of m and its reversal equals n. %C A248336 A248327(a(n)) = n and A248327(m) != n for m < a(n). %F A248336 a(2*k) = 10^(2*k-1) + 2*(10^k-1)/9; a(2*k+1) = 10^(2*k+1). %F A248336 Conjecture: a(n) = 111*a(n-2)-1110*a(n-4)+1000*a(n-6) for n>6. - _Colin Barker_, Oct 07 2014 %F A248336 Empirical g.f.: -2*x*(50*x^5+50*x^4-155*x^3-55*x^2+6*x+5) / ((x-1)*(x+1)*(10*x-1)*(10*x+1)*(10*x^2-1)). - _Colin Barker_, Oct 07 2014 %o A248336 (Haskell) %o A248336 import Data.List (elemIndex); import Data.Maybe (fromJust) %o A248336 a248336 = fromJust . (`elemIndex` map a248327 [0..]) %o A248336 (PARI) %o A248336 s=[0, 10]; for(k=1, 12, s=concat(s, [10^(2*k-1)+2*(10^k-1)/9, 10^(2*k+1)])); s \\ _Colin Barker_, Oct 07 2014 %Y A248336 Cf. A004086, A248327. %K A248336 nonn,base %O A248336 0,2 %A A248336 _Reinhard Zumkeller_, Oct 05 2014 %E A248336 Formula corrected by, and more terms from _Colin Barker_, Oct 07 2014