OFFSET
1,1
COMMENTS
The generalized weight of a binary number is obtained by assigning 1->3, 0->4, and summing up the weights of the digits (no leading zeros), for example 13 is in the sequence because it's 1101 in binary.
MATHEMATICA
Select[Range[2000], IntegerQ[#/Plus@@(IntegerDigits[#, 2]/.{1 -> 3, 0 -> 4})] &] (* Alonso del Arte, Oct 17 2011 *)
PROG
(Haskell)
base_weight b g n | n == 0 = 0 | otherwise = (base_weight b g (n `div` b)) + (g $ n `mod` b)
interesting b g = filter f [1..] where f n = n `mod` (base_weight b g n) == 0
bin_interesting g = interesting 2 g
weights l n | (n >=0) && ((length l) > fromInteger n) = l !! fromInteger n | otherwise = 0
original = weights [4, 3]
let a = bin_interesting original
(PARI) is(n)=my(v=binary(n)); n%(#v<<2-sum(i=1, #v, v[i]))==0 \\ Charles R Greathouse IV, Oct 19 2011
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Victor S. Miller, Oct 17 2011
STATUS
approved