login
A327368
The positions of ones in the reversed binary expansion of n have integer mean and integer geometric mean.
1
1, 2, 4, 8, 16, 32, 64, 128, 130, 256, 257, 512, 1024, 2048, 2084, 2316, 4096, 8192, 16384, 32768, 32776, 32777, 65536, 131072, 131074, 131200, 131457, 131462, 133390, 165920, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 8388640, 8388897, 8390688, 8519840
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
A superset of A327777.
Numbers whose binary indices have integer mean: A326669
Numbers whose binary indices have integer geometric mean: A326673
Sequence in context: A036147 A036146 A036144 * A286660 A009641 A089889
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 27 2019
EXTENSIONS
a(33)-a(40) from Andrew Howroyd, Sep 29 2019
STATUS
approved