login
A031944
Numbers in which digits 0,1,2 all occur in base 3.
6
11, 15, 19, 21, 29, 32, 33, 34, 35, 38, 42, 45, 46, 47, 48, 51, 55, 57, 58, 59, 61, 63, 64, 65, 66, 69, 73, 75, 83, 86, 87, 88, 89, 92, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 110, 113, 114, 115, 116, 119, 123, 126, 127, 128, 129, 132, 135
OFFSET
1,1
COMMENTS
A043530(a(n)) = 3; complement of A154314. - Reinhard Zumkeller, Jan 07 2009
A212193(a(n)) = 3. - Reinhard Zumkeller, May 04 2012
LINKS
Eric Weisstein's World of Mathematics, Ternary
Eric Weisstein's World of Mathematics, Pandigital Number
MATHEMATICA
Select[Range[200], Min[DigitCount[#, 3]]>0&] (* Harvey P. Dale, Nov 21 2015 *)
PROG
(Haskell)
import Data.List (elemIndices)
a031944 n = a031944_list !! (n-1)
a031944_list = elemIndices 3 a212193_list
-- Reinhard Zumkeller, May 04 2012
(Python)
from sympy.ntheory import count_digits
def ok(n): c = count_digits(n, 3); return all(c[d] > 0 for d in [0, 1, 2])
print([k for k in range(136) if ok(k)]) # Michael S. Branicky, Nov 15 2021
CROSSREFS
KEYWORD
nonn,base
STATUS
approved