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

%I #17 Aug 05 2021 07:01:58

%S 1,2,3,4,5,6,8,16,24,32,40,48,57,85,94,106,114,133,142,163,171,196,

%T 204,212,220,224,225,226,227,228,229,230,236,244,277,285,305,334,342,

%U 385,392,401,540,546,547,550,597,620,629,646,688

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

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

%t b7b8Q[n_]:=Module[{idn7=Union[IntegerDigits[n,7]]},Intersection[ idn7, Union[ IntegerDigits[n,8]]]==idn7]; Select[Range[700],b7b8Q] (* _Harvey P. Dale_, Dec 15 2013 *)

%o (Haskell)

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

%o a037402 n = a037402_list !! (n-1)

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

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

%Y Cf. A037403, A037404.

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