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.

A090054 Numbers n which divide the number formed when their digits are sorted in descending order excluding trivial cases.

Original entry on oeis.org

1750842, 15922035, 17508420, 19750842
Offset: 1

Views

Author

Chuck Seggelin, Nov 21 2003

Keywords

Comments

Trivial cases are identified as those values of n where the digits are already in descending order, like 3210 or 8222, such that DSort(n)=n. In such cases DSort(n)/n is equivalent to n/n (as in 3210/3210).
a(1) and a(2) are primitive. Clearly if DSort(n) mod n = 0, then dsort(n x 10) mod (n x 10) = 0. Therefore since 1750842 is a member, so will be 17508420, 175084200, 1750842000 and so on. The nonprimitive member 19750842 sets up the implication that 1(9...)750842 is a member. A quick test of 199750842, 1999750842 and 19999750842 seems to confirm this.

Examples

			a(1)=1750842 because the digits of 1750842 in descending order are 8754210 which is divisible by 1750842. a(24)=3105 because the digits of 3105 in ascending order are 135 and 3105 is divisible by 135.
		

Crossrefs

Programs

  • Mathematica
    sdoQ[n_] := Module[{rs = FromDigits[ReverseSort[ IntegerDigits[n]]]},
    rs != n && Divisible[rs, n]]; Select[Range[198*10^5],sdoQ] (* Harvey P. Dale, Sep 15 2021 *)