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!)
A037405 Numbers k such that every base-8 digit of k is a base-9 digit of k. 3

%I #19 Aug 05 2021 07:02:19

%S 1,2,3,4,5,6,7,9,18,27,36,45,54,63,73,124,137,146,177,210,219,283,284,

%T 292,356,365,429,438,502,511,568,576,586,763,768,769,772,897,906,942,

%U 945,946,950,970,1100,1152,1163,1172,1199,1474

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

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

%t bQ[n_]:=Module[{idn8=Union[IntegerDigits[n,8]],idn9=Union[ IntegerDigits[ n,9]]},And@@ (MemberQ[ idn9,#]&/@idn8)]; Select[Range[1500],bQ] (* _Harvey P. Dale_, Jul 17 2011 *)

%o (Haskell)

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

%o a037405 n = a037405_list !! (n-1)

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

%o f x = null $ nub (ds 8 x) \\ nub (ds 9 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. A007094, A007095.

%Y Cf. A037406.

%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 April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)