login
Numbers k such that every base-4 digit of k is a base-8 digit of k.
6

%I #15 Aug 04 2021 02:21:47

%S 1,2,3,10,42,64,65,66,67,68,69,80,85,86,90,93,95,106,128,129,130,131,

%T 136,153,160,168,169,170,171,187,192,193,194,195,234,240,250,255,257,

%U 321,514,522,528,529,530,531,532,533,534,538

%N Numbers k such that every base-4 digit of k is a base-8 digit of k.

%H Reinhard Zumkeller, <a href="/A037390/b037390.txt">Table of n, a(n) for n = 1..10000</a>

%o (Haskell)

%o import Data.List ((\\), nub)

%o a037390 n = a037390_list !! (n-1)

%o a037390_list = filter f [1..] where

%o f x = null $ nub (ds 4 x) \\ nub (ds 8 x)

%o ds b x = if x > 0 then d : ds b x' else [] where (x', d) = divMod x b

%o -- _Reinhard Zumkeller_, May 30 2013

%Y Cf. A007090, A007094.

%Y Cf. A037387, A037388, A037389, A037391, A037392.

%K nonn,base

%O 1,2

%A _Clark Kimberling_