An army of worker ants was carrying sugar cubes back into their colony. In there, the ants put 1 sugar cube into the first room, 2 into the second, 4 into the third, and doubling the amount so on until the room.
Then the queen ant decided to build bigger cubic blocks of sugar cubes from all they had previously collected. How many sugar cubes would remain after all these build-ups?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Relevant wiki: Euler's Theorem
The total amount of sugar cubes = 1 + 2 + 2 2 + 2 3 + . . . + 2 1 0 0 = 2 1 0 1 − 1 .
According to Euler's theorem , 2 ϕ ( 5 3 ) ≡ 1 ( m o d 5 3 ) .
And ϕ ( 5 3 ) = 5 3 − 5 2 = 1 0 0 .
Hence, 2 1 0 0 ≡ 1 ( m o d 5 3 ) .
2 1 0 1 ≡ 2 ( m o d 5 3 ) .
Thus, 2 1 0 1 − 1 ≡ 1 ( m o d 5 3 ) .
As a result, there would be 1 sugar cube left over after all block build-ups.