OFFSET
0,2
COMMENTS
We ignore leading zeros (hence a(0) = 0).
This sequence is a self-inverse permutation of the nonnegative integers.
LINKS
FORMULA
a(d * (10^k-1)/9) = (10-d) * (10^k-1)/9 for any k >= 0 and d = 1..9.
a(n) < 10^k for any n < 10^k.
EXAMPLE
Consider the set of numbers T with two distinct digits, say u and v, such that u appears once and v appears twice:
- the least elements of T are: 100, 101, 110, 112,
- the greatest elements of T are: 995, 996, 997, 998,
- so a(100) = 998, a(101) = 997, a(110) = 996, a(112) = 995.
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Feb 28 2021
STATUS
approved