This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A037384 #17 Aug 04 2021 02:21:22 %S A037384 1,2,13,17,26,66,80,112,120,121,122,129,136,161,168,202,242,328,394, %T A037384 401,458,514,522,528,529,530,531,532,533,534,535,538,546,554,562,570, %U A037384 578,592,610,634,640,641,642,643,644,645,646,647 %N A037384 Numbers k such that every base-3 digit of k is a base-8 digit of k. %H A037384 Harvey P. Dale, <a href="/A037384/b037384.txt">Table of n, a(n) for n = 1..1000</a> %t A037384 b3b8Q[n_]:=Module[{b3=Union[IntegerDigits[n,3]],b8=Union[ IntegerDigits[n,8]]}, And@@Table[ MemberQ[b8,b3[[i]]],{i,Length[b3]}]]; Select[Range[700],b3b8Q] (* _Harvey P. Dale_, Apr 17 2013 *) %o A037384 (Haskell) %o A037384 import Data.List ((\\), nub) %o A037384 a037384 n = a037384_list !! (n-1) %o A037384 a037384_list = filter f [1..] where %o A037384 f x = null $ nub (ds 3 x) \\ nub (ds 8 x) %o A037384 ds b x = if x > 0 then d : ds b x' else [] where (x', d) = divMod x b %o A037384 -- _Reinhard Zumkeller_, May 30 2013 %o A037384 (PARI) is(n)=#setminus(Set(digits(n,3)), Set(digits(n,8)))==0 \\ _Charles R Greathouse IV_, Feb 11 2017 %Y A037384 Cf. A007089, A007094. %Y A037384 Cf. A037380, A037381, A037382, A037383, A037385, A037386. %K A037384 nonn,base %O A037384 1,2 %A A037384 _Clark Kimberling_