|
|
A111708
|
|
a(n) = n concatenated with 9's complement of n.
|
|
2
|
|
|
9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 1089, 1188, 1287, 1386, 1485, 1584, 1683, 1782, 1881, 1980, 2079, 2178, 2277, 2376, 2475, 2574, 2673, 2772, 2871, 2970, 3069, 3168, 3267, 3366, 3465, 3564, 3663, 3762, 3861, 3960, 4059, 4158, 4257, 4356, 4455, 4554
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
If n has k digits a(n) is a multiple of 10^k -1.
The sequence contains 10^(k) multiples of 10^k -1.
a(n)/{10^k -1} gives all natural numbers.
|
|
LINKS
|
|
|
EXAMPLE
|
a(90) = 9009.
|
|
PROG
|
(Haskell)
a111708 0 = 9
a111708 n = f [] n where
f ys 0 = foldl (\v d -> 10 * v + d) 0 $ ys ++ map (9 -) ys
f ys x = f (d : ys) x' where (x', d) = divMod x 10
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|