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 A120005 #9 Aug 17 2025 17:36:38 %S A120005 0,11,10,100,102,120,1012,1023,1120,1230,10123,10234,11203,11230, %T A120005 12340,101234,102345,111230,112130,112340,123450,1012345,1023456, %U A120005 1112130,1112340,1121340,1123450,1234560 %N A120005 Smallest number containing exactly n distinct numbers in its decimal representation. %C A120005 A000030(a(n)) = 1 for n > 1; %C A120005 A120004(a(n)) = n and A120004(m) < n for m < a(n). %e A120005 Illustration of initial values: %e A120005 . n | a(n) ... and n-1 proper substrings %e A120005 . ----+---------------------------------------------------- %e A120005 . 1 | 0 %e A120005 . 2 | 11 1 %e A120005 . 3 | 10 1 0 %e A120005 . 4 | 100 10 1 0 %e A120005 . 5 | 102 10 2 1 0 %e A120005 . 6 | 120 20 12 2 1 0 %e A120005 . 7 | 1012 101 12 10 2 1 0 %e A120005 . 8 | 1023 102 23 10 3 2 1 0 %e A120005 . 9 | 1120 120 112 20 12 11 2 1 0 %e A120005 . 10 | 1230 230 123 30 23 12 3 2 1 0 %e A120005 . 11 | 10123 1012 123 101 23 12 10 3 2 1 0 %e A120005 . 12 | 10234 1023 234 102 34 23 10 4 3 2 1 0 %e A120005 . 13 | 11203 1203 1120 203 120 112 20 12 11 3 2 1 0 %e A120005 . 14 | 11230 1230 1123 230 123 112 30 23 12 11 3 2 1 0 %e A120005 . 15 | 12340 2340 1234 340 234 123 40 34 23 12 4 3 2 1 0 . %o A120005 (Haskell) %o A120005 import Data.List (isInfixOf, elemIndex) %o A120005 import Data.Maybe (fromJust) %o A120005 a120005 = fromJust . (`elemIndex` a120004_list) %o A120005 -- _Reinhard Zumkeller_, Jul 16 2012 %K A120005 nonn,base %O A120005 1,2 %A A120005 _Reinhard Zumkeller_, Jun 15 2006 %E A120005 a(1) changed from 1 to 0 by _Zak Seidov_, May 30 2010