This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A342115 #12 Mar 01 2021 02:12:17 %S A342115 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, %T A342115 83,82,81,80,79,78,76,77,75,74,73,72,71,70,69,68,67,65,66,64,63,62,61, %U A342115 60,59,58,57,56,54,55,53,52,51,50,49,48,47,46,45,43,44,42 %N 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. %C A342115 We ignore leading zeros (hence a(0) = 0). %C A342115 This sequence is a self-inverse permutation of the nonnegative integers. %H A342115 Rémy Sigrist, <a href="/A342115/b342115.txt">Table of n, a(n) for n = 0..9999</a> %H A342115 Rémy Sigrist, <a href="/A342115/a342115.gp.txt">PARI program for A342115</a> %H A342115 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A342115 a(d * (10^k-1)/9) = (10-d) * (10^k-1)/9 for any k >= 0 and d = 1..9. %F A342115 a(n) < 10^k for any n < 10^k. %e A342115 Consider the set of numbers T with two distinct digits, say u and v, such that u appears once and v appears twice: %e A342115 - the least elements of T are: 100, 101, 110, 112, %e A342115 - the greatest elements of T are: 995, 996, 997, 998, %e A342115 - so a(100) = 998, a(101) = 997, a(110) = 996, a(112) = 995. %o A342115 (PARI) See Links section. %Y A342115 See A342102 for similar sequences. %Y A342115 Cf. A055641, A268643, A316863, A316864, A316865, A316866, A316867, A316868, A316869, A102683. %K A342115 nonn,base %O A342115 0,2 %A A342115 _Rémy Sigrist_, Feb 28 2021