login
A382102
Remove all occurrences of a digit from n such that the resulting number, formed by the remaining digits in their original order, is as small as possible. If no digits remain, a(n)=0.
2
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 3, 3, 3, 3, 3, 3, 0, 1, 2, 3, 0, 4, 4, 4, 4, 4, 0, 1, 2, 3, 4, 0, 5, 5, 5, 5, 0, 1, 2, 3, 4, 5, 0, 6, 6, 6, 0, 1, 2, 3, 4, 5, 6, 0, 7, 7, 0, 1, 2, 3, 4, 5, 6, 7
OFFSET
1,23
COMMENTS
This sequence is inspired by a joke from Finnish comedian ISMO: "The hardest part in English for me is silent letters. You write them down but never say. But since you have silent letters in the language, why don't you also have silent numbers? They would be far more useful. Like, I owe you 75 dollars, but the 7 is silent.
Starts to differ from A382056 at n=102. - R. J. Mathar, Mar 23 2025
LINKS
EXAMPLE
For n = 95, we remove (all copies of) the digit 9 and we get a(n) = 5.
For n = 88, we remove all copies of the digit 8 and we get a(88) = 0.
For n = 1917, we remove all copies of the digit 1 and we get a(n) = 97.
MATHEMATICA
A382102[n_] := Min[Table[FromDigits[DeleteCases[#, d]], {d, DeleteDuplicates[#]}] & [IntegerDigits[n]]];
Array[A382102, 100] (* Paolo Xausa, Mar 23 2025 *)
PROG
(Python)
def f(s, r):
return int(s) if (s:=s.replace(r, "")) != "" else 0
def a(n):
s = str(n)
return min(f(s, d) for d in set(s))
print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Mar 16 2025
(PARI) a(n, base = 10) = { my (d = digits(n, base), s = Set(d)); vecmin(apply(r -> fromdigits(select(t -> t!=r, d), base), s)) } \\ Rémy Sigrist, Mar 23 2025
CROSSREFS
Cf. A382056.
Sequence in context: A044925 A376680 A323356 * A382056 A319244 A309286
KEYWORD
nonn,base,look,nice,easy
AUTHOR
Ali Sada, Mar 15 2025
STATUS
approved