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.

A116667 Greatest digit not used in n (or 10 if n is pandigital).

Original entry on oeis.org

9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 9, 9, 9, 9, 9
Offset: 0

Views

Author

Rick L. Shepherd, Feb 22 2006

Keywords

Comments

a(A050278(1)) = a(1023456789) = 10, the first term with that value, as 1023456789 is the first base 10 pandigital number.

Examples

			a(89) = 7 because decimal digits 8 and 9 are both used in 89.
		

Crossrefs

Cf. A067898 (least digit not used in n), A050278 (pandigital numbers).

Programs

  • Python
    def A116667(n):
        s = set(str(n))
        for i in range(9,-1,-1):
            if str(i) not in s:
                return i
        return 10 # Chai Wah Wu, Apr 13 2024