A321797 Delete the decimal digits of n that appear exactly once; write 0 if all digits disappear.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 11, 111, 11, 11, 11, 11, 11, 11, 11, 11, 0, 11, 22, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 33, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 44, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 55, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 66, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 77, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 88, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 99
Offset: 0
Examples
12321 becomes 1221, 1123 becomes 11, 11231 becomes 111, and 100223 becomes 22 (as we don't accept leading zeros). Note that 12345 disappears immediately and we get 0.
Links
- Chai Wah Wu, Table of n, a(n) for n = 0..10000
Programs
-
Python
def A321797(n): return int('0'+''.join(d if str(n).count(d) != 1 else '' for d in str(n)))
Comments