Question

Difficulty: MediumDivisibility Rules and Remainder Theorem

A decentralized network consists of 1313 primary verification nodes. A smart contract generates a total of 3710537^{105} encrypted tokens that must be distributed equally among these 1313 nodes. The leftover tokens that cannot be distributed equally are sent to a burn address. How many tokens will be sent to the burn address?

Answer: 8 tokens

Answer

8
The correct remainder when 3710537^{105} is divided by 1313 is 88. This is found by reducing the base 3737 to −2-2 modulo 1313, applying Fermat's Little Theorem to reduce the exponent 105105 to 99 modulo 1212, and computing (−2)9(mod13)=−18≡8(mod13)(-2)^9 \pmod{13} = -18 \equiv 8 \pmod{13}.

Step-by-Step Solution

1
Formulate the problem using modular arithmetic.
Evaluate 37105(mod13)37^{105} \pmod{13}.
Since tokens are distributed equally among 13 nodes, the tokens sent to the burn address represent the remainder when the total is divided by 13.
2
Simplify the base of the exponent.
37=13×2+1137 = 13 \times 2 + 11. Using a negative remainder, 11≡−2(mod13)11 \equiv -2 \pmod{13}.
Working with a smaller absolute base value like -2 makes successive exponentiation much easier than working with 11 or 37.
3
Apply Fermat's Little Theorem.
Since 13 is prime, (−2)12≡1(mod13)(-2)^{12} \equiv 1 \pmod{13}.
This theorem allows us to significantly reduce large exponents by finding their remainder when divided by p−1p-1.
4
Reduce the exponent using the theorem.
105=12×8+9105 = 12 \times 8 + 9. Thus, (−2)105=((−2)12)8×(−2)9≡18×(−2)9≡(−2)9(mod13)(-2)^{105} = ((-2)^{12})^8 \times (-2)^9 \equiv 1^8 \times (-2)^9 \equiv (-2)^9 \pmod{13}.
The multiples of 12 in the exponent evaluate to 1 modulo 13, leaving only the remainder of the exponent.
5
Calculate the final reduced power.
(−2)4=16≡3(mod13)(-2)^4 = 16 \equiv 3 \pmod{13}. Therefore, (−2)8=32=9(mod13)(-2)^8 = 3^2 = 9 \pmod{13}. Finally, (−2)9=9×(−2)=−18(mod13)(-2)^9 = 9 \times (-2) = -18 \pmod{13}.
Breaking the calculation into smaller powers prevents the need to calculate very large numbers directly.
6
Convert the negative result to a positive remainder.
−18=13×(−2)+8-18 = 13 \times (-2) + 8. The positive remainder is 88.
Physical quantities, such as the number of leftover tokens, must be represented by a positive remainder.

Key Concept

Modular arithmetic, Fermat's Little Theorem, and negative remainders
Rate this question