OFFSET
1,2
EXAMPLE
The sequence of terms together with their binary indices begins:
2 {2}
4 {3}
8 {4}
16 {5}
32 {6}
64 {7}
128 {8}
130 {2,8}
256 {9}
257 {1,9}
512 {10}
1024 {11}
2048 {12}
2084 {3,6,12}
2316 {3,4,9,12}
4096 {13}
8192 {14}
16384 {15}
32768 {16}
32776 {4,16}
MATHEMATICA
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n, 2]], 1];
Select[Range[1000], IntegerQ[Mean[bpe[#]]]&&IntegerQ[GeometricMean[bpe[#]]]&]
PROG
(PARI) ok(n)={my(s=0, p=1, k=0); for(i=0, logint(n, 2), if(bittest(n, i), s+=i+1; p*=i+1; k++)); s%k==0 && ispower(p, k)}
{ for(n=1, 10^7, if(ok(n), print1(n, ", "))) } \\ Andrew Howroyd, Sep 29 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 27 2019
EXTENSIONS
a(33)-a(40) from Andrew Howroyd, Sep 29 2019
STATUS
approved