login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A120005
Smallest number containing exactly n distinct numbers in its decimal representation.
2
0, 11, 10, 100, 102, 120, 1012, 1023, 1120, 1230, 10123, 10234, 11203, 11230, 12340, 101234, 102345, 111230, 112130, 112340, 123450, 1012345, 1023456, 1112130, 1112340, 1121340, 1123450, 1234560
OFFSET
1,2
COMMENTS
A000030(a(n)) = 1 for n > 1;
A120004(a(n)) = n and A120004(m) < n for m < a(n).
EXAMPLE
Illustration of initial values:
. n | a(n) ... and n-1 proper substrings
. ----+----------------------------------------------------
. 1 | 0
. 2 | 11 1
. 3 | 10 1 0
. 4 | 100 10 1 0
. 5 | 102 10 2 1 0
. 6 | 120 20 12 2 1 0
. 7 | 1012 101 12 10 2 1 0
. 8 | 1023 102 23 10 3 2 1 0
. 9 | 1120 120 112 20 12 11 2 1 0
. 10 | 1230 230 123 30 23 12 3 2 1 0
. 11 | 10123 1012 123 101 23 12 10 3 2 1 0
. 12 | 10234 1023 234 102 34 23 10 4 3 2 1 0
. 13 | 11203 1203 1120 203 120 112 20 12 11 3 2 1 0
. 14 | 11230 1230 1123 230 123 112 30 23 12 11 3 2 1 0
. 15 | 12340 2340 1234 340 234 123 40 34 23 12 4 3 2 1 0 .
PROG
(Haskell)
import Data.List (isInfixOf, elemIndex)
import Data.Maybe (fromJust)
a120005 = fromJust . (`elemIndex` a120004_list)
-- Reinhard Zumkeller, Jul 16 2012
CROSSREFS
Sequence in context: A323296 A373693 A275782 * A362335 A105026 A350671
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jun 15 2006
EXTENSIONS
a(1) changed from 1 to 0 by Zak Seidov, May 30 2010.
STATUS
approved