login
A037387
Numbers k such that every base-4 digit of k is a base-5 digit of k.
6
1, 2, 3, 5, 10, 15, 21, 28, 37, 38, 42, 58, 63, 76, 80, 86, 132, 136, 137, 138, 142, 152, 160, 167, 178, 183, 190, 191, 202, 204, 205, 210, 213, 214, 215, 217, 220, 221, 222, 223, 238, 240, 256, 257, 258, 261, 266, 276, 277, 278
OFFSET
1,2
LINKS
MATHEMATICA
Select[Range[300], SubsetQ[IntegerDigits[#, 5], IntegerDigits[#, 4]]&] (* Harvey P. Dale, Mar 27 2019 *)
PROG
(Haskell)
import Data.List ((\\), nub)
a037387 n = a037387_list !! (n-1)
a037387_list = filter f [1..] where
f x = null $ nub (ds 4 x) \\ nub (ds 5 x)
ds b x = if x > 0 then d : ds b x' else [] where (x', d) = divMod x b
-- Reinhard Zumkeller, May 30 2013
CROSSREFS
KEYWORD
nonn,base
STATUS
approved