login
A037375
Positive numbers k such that every base-2 digit of k is a base-6 digit of k.
8
1, 6, 7, 31, 36, 37, 38, 39, 40, 41, 42, 48, 54, 60, 63, 66, 73, 78, 109, 114, 127, 145, 150, 181, 186, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241
OFFSET
1,2
LINKS
PROG
(Haskell)
import Data.List ((\\), nub)
a037375 n = a037375_list !! (n-1)
a037375_list = filter f [1..] where
f x = null $ nub (ds 2 x) \\ nub (ds 6 x)
ds b x = if x > 0 then d : ds b x' else [] where (x', d) = divMod x b
-- Reinhard Zumkeller, May 30 2013
KEYWORD
nonn,base
STATUS
approved