Find the sum of the last four digits of
Basing on the first problem I've ever posted on Brilliant back in 2014.
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.
Let N = 2 0 1 7 2 0 1 7 2 0 1 7 . We need to find N m o d 1 0 0 0 0 . Since 2017 is prime, we can use Euler's theorem and the respective Carmichael lambda values are λ ( 1 0 0 0 0 ) = 5 0 0 and λ ( 5 0 0 ) = 1 0 0 . Then, we have:
N ≡ 2 0 1 7 2 0 1 7 2 0 1 7 m o d 1 0 0 m o d 5 0 0 (mod 10000) ≡ 2 0 1 7 2 0 1 7 1 7 m o d 5 0 0 (mod 10000) ≡ 2 0 1 7 1 7 1 7 m o d 5 0 0 (mod 10000) ≡ 2 0 1 7 ( 1 0 + 7 ) 1 5 ( 1 7 2 ) m o d 5 0 0 (mod 10000) ≡ 2 0 1 7 ( 1 5 0 + 7 1 5 ) ( 2 8 9 ) m o d 5 0 0 (mod 10000) ≡ 2 0 1 7 ( 1 5 0 + ( 5 0 − 1 ) 7 ( 7 ) ) ( 2 8 9 ) m o d 5 0 0 (mod 10000) ≡ 2 0 1 7 ( 1 5 0 + ( 3 4 9 ) ( 7 ) ) ( 2 8 9 ) m o d 5 0 0 (mod 10000) ≡ 2 0 1 7 ( 9 3 ) ( 2 8 9 ) m o d 5 0 0 (mod 10000) ≡ 2 0 1 7 3 7 7 (mod 10000) ≡ ( 2 0 0 0 + 1 7 ) 3 7 5 ( 2 0 0 0 + 1 7 ) 2 (mod 10000) ≡ 1 7 3 7 5 ( 4 0 0 0 + 2 8 9 ) (mod 10000) ≡ ( 2 0 − 3 ) 3 7 5 ( 4 2 8 9 ) (mod 10000) ≡ ( 7 5 0 0 − 3 3 7 5 ) ( 4 2 8 9 ) (mod 10000) ≡ 7 5 0 0 − 3 3 0 7 ( 4 2 8 9 ) (mod 10000) ≡ 3 7 7 7 (mod 10000) By modular inverse (see note)
Therefore, the sum of the last four digits is 3 + 7 + 7 + 7 = 2 4 .
Note:
3 3 8 0 ⟹ 3 5 × 3 3 7 5 2 4 3 × 3 3 7 5 2 4 3 × 7 2 4 3 × 3 0 7 2 4 3 × 3 3 0 7 ⟹ 3 3 7 5 ≡ ( 1 0 − 1 ) 1 9 0 (mod 10000) ≡ 2 1 9 0 × 1 8 9 × 1 0 2 − 1 9 0 × 1 0 + 1 (mod 10000) ≡ 3 6 0 1 (mod 10000) ≡ 3 6 0 1 (mod 10000) ≡ 3 6 0 1 (mod 10000) ≡ 1 7 0 1 (mod 10000) ≡ 4 6 0 1 (mod 10000) ≡ 1 6 0 1 (mod 10000) ≡ 3 3 0 7 (mod 10000)