[go: up one dir, main page]

login
A037403
Numbers k such that every base-7 digit of k is a base-9 digit of k.
4
1, 2, 3, 4, 5, 6, 31, 99, 106, 107, 195, 198, 248, 257, 284, 297, 321, 498, 514, 749, 750, 751, 758, 767, 785, 936, 939, 940, 943, 950, 968, 996, 1028, 1086, 1088, 1110, 1163, 1200, 1218, 1254, 1453, 1471, 1498, 1500, 1502, 1507
OFFSET
1,2
LINKS
PROG
(Haskell)
import Data.List ((\\), nub)
a037403 n = a037403_list !! (n-1)
a037403_list = filter f [1..] where
f x = null $ nub (ds 7 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
STATUS
approved