A336956 For any number n whose set of nonzero decimal digits is { d_0, ..., d_k } (with d_0 < ... < d_k), a(n) is obtained by replacing in the decimal representation of n each nonzero digit d_m by d_{k-m} for m = 0..k.
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 = 10251: - the set of nonzero digits is { 1, 2, 5}, - so we replace each digit 1, 2, 5 respectively by 5, 2, 1, - and a(10251) = 50215.
Links
Programs
-
PARI
a(n, base=10) = { my (d=digits(n, base), s=Set(select(sign, d))); fromdigits(apply (t -> if (t, s[#s+1-setsearch (s,t)], 0), d), base) }
Formula
a(n) = n iff n = 0 or n belongs to A125289.
Comments