OFFSET
1,2
COMMENTS
These are numbers whose exponents in their representation as a sum of distinct powers of 2 have integer average.
EXAMPLE
42 is in the sequence because 42 = 2^1 + 2^3 + 2^5 and the average of {1,3,5} is 3, an integer.
MATHEMATICA
Select[Range[100], IntegerQ[Mean[Join@@Position[IntegerDigits[#, 2], 1]]]&]
PROG
(PARI) isok(m) = my(b=binary(m)); denominator(vecsum(Vec(select(x->(x==1), b, 1)))/hammingweight(m)) == 1; \\ Michel Marcus, Jul 02 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gus Wiseman, Jul 17 2019
STATUS
approved