A333659 a(n) is the greatest number m not yet in the sequence such that the decimal expansions of n and of m have the same digits (up to order but with multiplicity).
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 31, 41, 51, 61, 71, 81, 91, 20, 12, 22, 32, 42, 52, 62, 72, 82, 92, 30, 13, 23, 33, 43, 53, 63, 73, 83, 93, 40, 14, 24, 34, 44, 54, 64, 74, 84, 94, 50, 15, 25, 35, 45, 55, 65, 75, 85, 95, 60, 16, 26, 36, 46, 56, 66, 76
Offset: 0
Examples
For n = 255: - there are three numbers with the same multiset of digits: 255, 525 and 552, - so a(255) = 552, a(525) = 525, a(552) = 255.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10000
- Rémy Sigrist, PARI program for A333659
- Rémy Sigrist, Scatterplot of the first 1000000 terms
- Index entries for sequences that are permutations of the natural numbers
Crossrefs
Programs
-
PARI
See Links section.
Formula
a(10^n) = 10^n for any n >= 0.
Comments