login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

We ignore leading zeros (hence a(0) = 0).

This sequence is a self-inverse permutation of the nonnegative integers.

LINKS

Rémy Sigrist, Table of n, a(n) for n = 0..9999

Rémy Sigrist, PARI program for A342115

Index entries for sequences that are permutations of the natural numbers

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

See A342102 for similar sequences.

Cf. A055641, A268643, A316863, A316864, A316865, A316866, A316867, A316868, A316869, A102683.

Sequence in context: A298372 A089186 A055120 * A090671 A132673 A107927

Adjacent sequences:  A342112 A342113 A342114 * A342116 A342117 A342118

KEYWORD

nonn,base

AUTHOR

Rémy Sigrist, Feb 28 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 22 12:35 EDT 2021. Contains 348168 sequences. (Running on oeis4.)