A342115 Lexicographically latest sequence of distinct nonnegative integers such that the multisets of frequencies of digits in the decimal representations of n and of a(n) are the same.
0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 98, 99, 97, 96, 95, 94, 93, 92, 91, 90, 89, 87, 88, 86, 85, 84, 83, 82, 81, 80, 79, 78, 76, 77, 75, 74, 73, 72, 71, 70, 69, 68, 67, 65, 66, 64, 63, 62, 61, 60, 59, 58, 57, 56, 54, 55, 53, 52, 51, 50, 49, 48, 47, 46, 45, 43, 44, 42
Offset: 0
Examples
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.
Links
Crossrefs
Programs
-
PARI
See Links section.
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.
Comments