OFFSET
0,1
COMMENTS
a(A050278(1)) = a(1023456789) = 10, the first term with that value, as 1023456789 is the first base 10 pandigital number.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
EXAMPLE
a(89) = 7 because decimal digits 8 and 9 are both used in 89.
PROG
(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
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Rick L. Shepherd, Feb 22 2006
STATUS
approved