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.

A108782 Difference between n and the largest number with the same digit set as n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 18, 27, 36, 45, 54, 63, 72, 0, 0, 0, 9, 18, 27, 36, 45, 54, 63, 0, 0, 0, 0, 9, 18, 27, 36, 45, 54, 0, 0, 0, 0, 0, 9, 18, 27, 36, 45, 0, 0, 0, 0, 0, 0, 9, 18, 27, 36, 0, 0, 0, 0, 0, 0, 0, 9, 18, 27, 0, 0, 0, 0, 0, 0, 0, 0, 9, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0
Offset: 0

Views

Author

Zak Seidov, Jun 29 2005

Keywords

Crossrefs

Programs

  • Mathematica
    FromDigits[Sort[IntegerDigits[n], Greater]] - n (Rob Pratt)
    Table[Max[FromDigits/@ Permutations[IntegerDigits[n]]]-n, {n, 150}]

Formula

a(n) = A004186(n) - n. - Seiichi Manyama, Sep 25 2018

Extensions

a(0)=0 prepended by Seiichi Manyama, Sep 25 2018