login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037395 Numbers k such that every base-5 digit of k is a base-8 digit of k. 6

%I #17 Aug 05 2021 07:00:19

%S 1,2,3,4,83,91,93,99,124,136,161,200,206,272,314,467,524,532,540,545,

%T 546,549,609,643,656,672,680,705,706,708,770,771,774,775,776,781,784,

%U 786,787,789,793,794,796,798,799,843,871,906

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

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

%t Select[Range[1000],SubsetQ[IntegerDigits[#,8],IntegerDigits[#,5]]&] (* _Harvey P. Dale_, Oct 13 2015 *)

%o (Haskell)

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

%o a037395 n = a037395_list !! (n-1)

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

%o f x = null $ nub (ds 5 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. A007091, A007094.

%Y Cf. A037393, A037394, A037396, A037397.

%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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 13:06 EDT 2024. Contains 375543 sequences. (Running on oeis4.)