OFFSET
1,2
COMMENTS
Apparently includes all powers of 2.
All numbers 2^(2k+1)-1 are in this sequence, and if n is in this sequence then so is 2n. - Charlie Neder, May 17 2019
EXAMPLE
The first few terms of A048678 are 1,2,5,4,9,10,21,8. 2 is a multiple of 2, 5 isn't a multiple of 3, 4 is a multiple of 4, 9 isn't a multiple of 5, 10 isn't a multiple of 6, 21 is a multiple of 7, etc.
MATHEMATICA
Select[Range[4000], Divisible[FromDigits[Flatten[IntegerDigits[#, 2] /. {1 -> {0, 1}}], 2], #] &] (* Amiram Eldar, Jul 08 2019 after Robert G. Wilson v at A048678 *)
PROG
(Haskell) bintodec :: [Integer] -> Integerbintodec = sum . zipWith (*) (iterate (*2) 1) . reverse
decomp :: (Integer, [Integer]) -> (Integer, [Integer])decomp (x, ys) = if even x then (x `div` 2, 0:ys) else (x - 1, 1:ys)
zeck :: Integer -> Integerzeck n = bintodec (1 : snd (last . takeWhile (\(x, _) -> x > 0) $ iterate decomp (n, [])))
output :: [Integer]output = filter (\x -> 0 == zeck x `mod` x) [1..100]
main :: IO ()main = print output
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Dan Dart, May 17 2019
STATUS
approved