cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A382056 Remove every copy of the largest digit of n; if any digits remain, return the number formed by arranging the remaining digits in nondecreasing order. If no digits remain, return 0.

Original entry on oeis.org

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, 0
Offset: 1

Views

Author

Ali Sada, Mar 13 2025

Keywords

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."

Examples

			For n = 132, we remove the largest digit and we get a(132) = 12. For n = 66, we remove the largest digit and we get a(66) = 0.
		

Crossrefs

Cf. A054055 (largest digit of n), A125289 (numbers with only one (distinct) digit > 0), A382401.

Programs

  • Maple
    a:= n-> (l-> (m-> (h-> add(h[j]*10^(j-1), j=1..nops(h))
         )(subs(m=NULL, l)))(max(l)))(convert(n, base, 10)):
    seq(a(n), n=1..102);  # Alois P. Heinz, Mar 14 2025
  • Mathematica
    A382056[n_] := FromDigits[DeleteCases[#, Max[#]]] & [IntegerDigits[n]];
    Array[A382056, 100] (* Paolo Xausa, Mar 23 2025 *)
  • PARI
    apply( {A382056(n, m=vecmax(digits(n)))=fromdigits([d | d<-digits(n), dM. F. Hasler, Mar 14 2025
  • Python
    def a(n):
        s = str(n)
        m = max(s)
        r = s.replace(m, "")
        return int(r) if r != "" else 0
    print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Mar 13 2025
    

Formula

a(n) = 0 for n in A125289. - M. F. Hasler, Mar 14 2025

Extensions

Definition clarified by N. J. A. Sloane, Mar 23 2025
Showing 1-1 of 1 results.