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!)
A037384 Numbers k such that every base-3 digit of k is a base-8 digit of k. 7
1, 2, 13, 17, 26, 66, 80, 112, 120, 121, 122, 129, 136, 161, 168, 202, 242, 328, 394, 401, 458, 514, 522, 528, 529, 530, 531, 532, 533, 534, 535, 538, 546, 554, 562, 570, 578, 592, 610, 634, 640, 641, 642, 643, 644, 645, 646, 647 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MATHEMATICA
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 *)
PROG
(Haskell)
import Data.List ((\\), nub)
a037384 n = a037384_list !! (n-1)
a037384_list = filter f [1..] where
f x = null $ nub (ds 3 x) \\ nub (ds 8 x)
ds b x = if x > 0 then d : ds b x' else [] where (x', d) = divMod x b
-- Reinhard Zumkeller, May 30 2013
(PARI) is(n)=#setminus(Set(digits(n, 3)), Set(digits(n, 8)))==0 \\ Charles R Greathouse IV, Feb 11 2017
CROSSREFS
Sequence in context: A020480 A352572 A018459 * A177964 A174050 A122487
KEYWORD
nonn,base
AUTHOR
STATUS
approved

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 July 13 14:24 EDT 2024. Contains 374284 sequences. (Running on oeis4.)