login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A321797
Delete the decimal digits of n that appear exactly once; write 0 if all digits disappear.
4
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,12
COMMENTS
A companion sequence to A320486.
Digits that appear exactly once in n are erased. Leading zeros are erased unless the result is 0. If all digits are erased, we write 0 for the result (A321800 is another version, which uses -1 for the empty string).
More than the usual number of terms are shown in order to reach some interesting examples.
EXAMPLE
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.
PROG
(Python)
def A321797(n):
return int('0'+''.join(d if str(n).count(d) != 1 else '' for d in str(n)))
CROSSREFS
Sequence in context: A279540 A321538 A321803 * A113043 A110408 A377778
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Nov 19 2018
STATUS
approved