OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
bQ[n_]:=Module[{idn8=Union[IntegerDigits[n, 8]], idn9=Union[ IntegerDigits[ n, 9]]}, And@@ (MemberQ[ idn9, #]&/@idn8)]; Select[Range[1500], bQ] (* Harvey P. Dale, Jul 17 2011 *)
PROG
(Haskell)
import Data.List ((\\), nub)
a037405 n = a037405_list !! (n-1)
a037405_list = filter f [1..] where
f x = null $ nub (ds 8 x) \\ nub (ds 9 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
AUTHOR
STATUS
approved