Write the exponent as a sum of powers of 2
2024=1024+512+256+128+64+32+8 Repeated squaring produces exactly these powers of 7.
Square to reach the exponent 2
72≡72=49≡49(mod1000) Reducing modulo 1000 after every squaring keeps the arithmetic small.
Square to reach the exponent 4
74≡492=2401≡401(mod1000) Reducing modulo 1000 after every squaring keeps the arithmetic small.
Square to reach the exponent 8
78≡4012=160801≡801(mod1000) Reducing modulo 1000 after every squaring keeps the arithmetic small.
Square to reach the exponent 16
716≡8012=641601≡601(mod1000) Reducing modulo 1000 after every squaring keeps the arithmetic small.
Square to reach the exponent 32
732≡6012=361201≡201(mod1000) Reducing modulo 1000 after every squaring keeps the arithmetic small.
Square to reach the exponent 64
764≡2012=40401≡401(mod1000) Reducing modulo 1000 after every squaring keeps the arithmetic small.
Square to reach the exponent 128
7128≡4012=160801≡801(mod1000) Reducing modulo 1000 after every squaring keeps the arithmetic small.
Square to reach the exponent 256
7256≡8012=641601≡601(mod1000) Reducing modulo 1000 after every squaring keeps the arithmetic small.
Square to reach the exponent 512
7512≡6012=361201≡201(mod1000) Reducing modulo 1000 after every squaring keeps the arithmetic small.
Square to reach the exponent 1024
71024≡2012=40401≡401(mod1000) Reducing modulo 1000 after every squaring keeps the arithmetic small.
Multiply in the factor 732
801×201=161001≡1(mod1000) The exponent 2024 is the sum 8+32, so these are exactly the powers that must be multiplied together.
Multiply in the factor 764
1×401=401≡401(mod1000) The exponent 2024 is the sum 8+32+64, so these are exactly the powers that must be multiplied together.
Multiply in the factor 7128
401×801=321201≡201(mod1000) The exponent 2024 is the sum 8+32+64+128, so these are exactly the powers that must be multiplied together.
Multiply in the factor 7256
201×601=120801≡801(mod1000) The exponent 2024 is the sum 8+32+64+128+256, so these are exactly the powers that must be multiplied together.
Multiply in the factor 7512
801×201=161001≡1(mod1000) The exponent 2024 is the sum 8+32+64+128+256+512, so these are exactly the powers that must be multiplied together.
Select the least residue
72024≡401(mod1000) This is the remainder when the power is divided by 1000.