OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
b3b8Q[n_]:=Module[{b3=Union[IntegerDigits[n, 3]], b8=Union[ IntegerDigits[n, 8]]}, And@@Table[ MemberQ[b8, b3[[i]]], {i, Length[b3]}]]; Select[Range[700], b3b8Q] (* Harvey P. Dale, Apr 17 2013 *)
PROG
(Haskell)
import Data.List ((\\), nub)
a037384 n = a037384_list !! (n-1)
a037384_list = filter f [1..] where
f x = null $ nub (ds 3 x) \\ nub (ds 8 x)
ds b x = if x > 0 then d : ds b x' else [] where (x', d) = divMod x b
-- Reinhard Zumkeller, May 30 2013
(PARI) is(n)=#setminus(Set(digits(n, 3)), Set(digits(n, 8)))==0 \\ Charles R Greathouse IV, Feb 11 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved