OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
b68Q[n_]:=Module[{b6=Union[IntegerDigits[n, 6]], b8=Union[IntegerDigits[ n, 8]]}, And@@Table[ MemberQ[b8, b6[[i]]], {i, Length[b6]}]]; Select[Range[ 1200], b68Q] (* Harvey P. Dale, Mar 24 2012 *)
PROG
(Haskell)
import Data.List ((\\), nub)
a037399 n = a037399_list !! (n-1)
a037399_list = filter f [1..] where
f x = null $ nub (ds 6 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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved