+0  
 
0
224
3
avatar

How many positive integers smaller than 1,000,000 are powers of 2, but are not powers of 4? You may find it useful to consider that 2^10 = 1024.

 Aug 5, 2022
 #1
avatar+128089 
+2

Any 

 

2^(2n - 1)   will not be an integer power of 4

 

When n =  1,     2^(2n-1) =   2^1  =   2

 

When n = 10,  2^(2*10  - 1) =  2^19  = 524,888

 

So

 

10  are integer powers of 2 but not powers of 4

 

 

cool cool cool

 Aug 5, 2022
edited by CPhill  Aug 6, 2022
 #2
avatar+2666 
0

The number must have an odd power. 

 

So, the exponents can be 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, which makes for \(\color{brown}\boxed{10}\) numbers. 

 Aug 6, 2022
 #3
avatar+113 
+1

Python 3.9 says: 2, 8, 32, 128, 512, 2048, 8192, 32768, 131072, 524288

But NOT 1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144

Python also says \(2^{19} = 524,288\)

tuffla2022  Aug 6, 2022
edited by tuffla2022  Aug 6, 2022
edited by tuffla2022  Aug 6, 2022

1 Online Users

avatar