login
A037398
Numbers k such that every base-6 digit of k is a base-7 digit of k.
4
1, 2, 3, 4, 5, 7, 14, 21, 28, 35, 43, 68, 79, 86, 122, 123, 129, 165, 172, 208, 215, 246, 252, 260, 361, 373, 397, 425, 427, 431, 444, 445, 446, 469, 475, 476, 479, 481, 482, 504, 513, 520, 527, 556, 562, 583, 625, 696, 738, 756
OFFSET
1,2
LINKS
PROG
(Haskell)
import Data.List ((\\), nub)
a037398 n = a037398_list !! (n-1)
a037398_list = filter f [1..] where
f x = null $ nub (ds 6 x) \\ nub (ds 7 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