cp's OEIS Frontend

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.

A120005 Smallest number containing exactly n distinct numbers in its decimal representation.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jun 15 2006

Keywords

Comments

A000030(a(n)) = 1 for n > 1;
A120004(a(n)) = n and A120004(m) < n for m < a(n).

Examples

			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 .
		

Programs

  • Haskell
    import Data.List (isInfixOf, elemIndex)
    import Data.Maybe (fromJust)
    a120005 = fromJust . (`elemIndex` a120004_list)
    -- Reinhard Zumkeller, Jul 16 2012

Extensions

a(1) changed from 1 to 0 by Zak Seidov, May 30 2010