|
|
A037405
|
|
Numbers k such that every base-8 digit of k is a base-9 digit of k.
|
|
3
|
|
|
1, 2, 3, 4, 5, 6, 7, 9, 18, 27, 36, 45, 54, 63, 73, 124, 137, 146, 177, 210, 219, 283, 284, 292, 356, 365, 429, 438, 502, 511, 568, 576, 586, 763, 768, 769, 772, 897, 906, 942, 945, 946, 950, 970, 1100, 1152, 1163, 1172, 1199, 1474
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MATHEMATICA
|
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 *)
|
|
PROG
|
(Haskell)
import Data.List ((\\), nub)
a037405 n = a037405_list !! (n-1)
a037405_list = filter f [1..] where
f x = null $ nub (ds 8 x) \\ nub (ds 9 x)
ds b x = if x > 0 then d : ds b x' else [] where (x', d) = divMod x b
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|