|
|
A037374
|
|
Positive numbers k such that every base-2 digit of k is a base-5 digit of k.
|
|
8
|
|
|
1, 5, 7, 25, 26, 27, 28, 29, 30, 31, 35, 40, 45, 51, 55, 76, 80, 101, 105, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
PROG
|
(Haskell)
import Data.List ((\\), nub)
a037374 n = a037374_list !! (n-1)
a037374_list = filter f [1..] where
f x = null $ nub (ds 2 x) \\ nub (ds 5 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
|
|
|
|