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.

A067898 Least digit not used in n (or 10 if n is pandigital).

This page as a plain text file.
%I A067898 #18 Apr 13 2024 22:52:35
%S A067898 1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,
%T A067898 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
%U A067898 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,2,3,2,2
%N A067898 Least digit not used in n (or 10 if n is pandigital).
%C A067898 a(A050278(1)) = a(1023456789) = 10, the first term with that value, as 1023456789 is the first base 10 pandigital number.
%C A067898 a(A052382(n)) = 0; a(A011540(n)) > 0. [_Reinhard Zumkeller_, May 04 2012]
%H A067898 Reinhard Zumkeller, <a href="/A067898/b067898.txt">Table of n, a(n) for n = 0..10000</a>
%e A067898 a(10)=2 because decimal digits 0 and 1 are both used in 10, a(102)=3 because decimal digits 0, 1 and 2 are used in 102.
%o A067898 (Haskell)
%o A067898 import Data.List (delete)
%o A067898 a067898 n = f n [0..10] where
%o A067898    f x ys | x <= 9    = head $ delete x ys
%o A067898           | otherwise = f x' $ delete d ys where (x',d) = divMod x 10
%o A067898 -- _Reinhard Zumkeller_, May 04 2012
%o A067898 (Python)
%o A067898 def A067898(n):
%o A067898     s = set(str(n))
%o A067898     for i in range(10):
%o A067898         if str(i) not in s:
%o A067898             return i
%o A067898     return 10 # _Chai Wah Wu_, Apr 13 2024
%Y A067898 Cf. A050278 (pandigital numbers).
%Y A067898 Cf. A212193 (ternary).
%K A067898 base,easy,nonn
%O A067898 0,11
%A A067898 _Rick L. Shepherd_, May 13 2003