login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A037395
Numbers k such that every base-5 digit of k is a base-8 digit of k.
6
1, 2, 3, 4, 83, 91, 93, 99, 124, 136, 161, 200, 206, 272, 314, 467, 524, 532, 540, 545, 546, 549, 609, 643, 656, 672, 680, 705, 706, 708, 770, 771, 774, 775, 776, 781, 784, 786, 787, 789, 793, 794, 796, 798, 799, 843, 871, 906
OFFSET
1,2
LINKS
MATHEMATICA
Select[Range[1000], SubsetQ[IntegerDigits[#, 8], IntegerDigits[#, 5]]&] (* Harvey P. Dale, Oct 13 2015 *)
PROG
(Haskell)
import Data.List ((\\), nub)
a037395 n = a037395_list !! (n-1)
a037395_list = filter f [1..] where
f x = null $ nub (ds 5 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
STATUS
approved