This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A037406 Every base 8 digit of n is a base 10 digit of n. 3

%I

%S 1,2,3,4,5,6,7,45,105,127,235,274,365,436,487,614,713,731,1017,1024,

%T 1025,1026,1032,1042,1124,1162,1206,1233,1234,1235,1243,1273,1426,

%U 1462,1603,1630,1653,1723,1737,1739,1743,1753,2048

%N Every base 8 digit of n is a base 10 digit of n.

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

%t b8dQ[n_]:=Module[{idn=Union[IntegerDigits[n]],idn8=Union[IntegerDigits[n,8]]},And@@Table[MemberQ[idn,idn8[[i]]],{i,Length[idn8]}]]

%t Select[Range[2100],b8dQ] (* _Harvey P. Dale_, Feb 27 2011 *)

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

%o a037406 n = a037406_list !! (n-1)

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

%o f x = null \$ nub (ds 8 x) \\ nub (ds 10 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. A037405.

%K nonn,base

%O 1,2

%A _Clark Kimberling_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 15 16:09 EDT 2019. Contains 325049 sequences. (Running on oeis4.)