|
|
A247143
|
|
Lexicographically earliest permutation of the natural numbers such that in decimal representation d(n) is contained in a(n), where d is the digit sequence of the concatenation of the a-sequence, cf. A247149.
|
|
10
|
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 12, 30, 11, 21, 13, 40, 14, 15, 22, 16, 17, 23, 24, 50, 18, 34, 19, 25, 26, 27, 31, 36, 41, 37, 28, 32, 29, 42, 35, 60, 51, 38, 33, 43, 61, 39, 52, 45, 62, 46, 72, 47, 53, 71, 63, 56, 44, 81, 73, 57, 82, 48, 83, 92, 102
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
By definition: A247149(n) is contained in a(n).
|
|
LINKS
|
|
|
EXAMPLE
|
. n | d(n) | a(n) | n | d(n) | a(n) | n | d(n) | a(n) |
. ----+------+------+ -----+------+------+ ------+------+-------+
. 10 | 1 | 10 | 100 | 7 | 78 | 1000 | 5 | 885 |
. 11 | 0 | 20 | 101 | 1 | 101 | 1001 | 1 | 1040 |
. 12 | 2 | 12 | 102 | 6 | 69 | 1002 | 6 | 868 |
. 13 | 0 | 30 | 103 | 3 | 133 | 1003 | 3 | 1053 |
. 14 | 1 | 11 | 104 | 5 | 105 | 1004 | 3 | 1063 |
. 15 | 2 | 21 | 105 | 6 | 86 | 1005 | 5 | 895 |
. 16 | 3 | 13 | 106 | 4 | 114 | 1006 | 3 | 1073 |
. 17 | 0 | 40 | 107 | 4 | 124 | 1007 | 4 | 945 |
. 18 | 1 | 14 | 108 | 8 | 80 | 1008 | 6 | 869 |
. 19 | 1 | 15 | 109 | 1 | 106 | 1009 | 5 | 905 |
. 20 | 2 | 22 | 110 | 7 | 79 | 1010 | 1 | 1041 |
. 21 | 1 | 16 | 111 | 3 | 134 | 1011 | 7 | 876 |
. 22 | 1 | 17 | 112 | 5 | 115 | 1012 | 3 | 1083 |
. 23 | 3 | 23 | 113 | 7 | 87 | 1013 | 4 | 946 | .
|
|
PROG
|
(Haskell)
import Data.List (delete, find); import Data.Maybe (fromJust)
a247143 n = a247143_list !! n
a247143_list = [0..10] ++ f 11 (map show [11..]) where
f x zss = (read ys :: Int) : f (x + 1) (delete ys zss) where
ys = fromJust $ find (elem $ ds !! x) zss
ds = concatMap show a247143_list
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|