If f ( x ) = x ( x + 1 ) ( x + 2 ) ( x + 3 ) ( x + 4 ) ( x + 5 ) ( x + 6 ) and g ( x ) = x ( x − 1 ) ( x − 2 ) ( x − 3 ) ( x − 4 ) ( x − 5 ) ( x − 6 )
Then find the last 4 digits of f ( 2 0 1 5 ) + g ( 2 0 2 1 )
This problem belongs to the set Number theory best problems .
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.
Problem Loading...
Note Loading...
Set Loading...
Consider f ( 2 0 1 5 ) , which we will write as 2 0 1 5 2 0 1 6 a . To find the last four digits of this value, we need to find residues x and y such that x ≡ 2 0 1 5 2 0 1 6 a ( m o d 1 6 ) and y ≡ 2 0 1 5 2 0 1 6 a ( m o d 6 2 5 ) . By the Chinese remainder theorem, these two residues will tell us the value of 2 0 1 5 2 0 1 6 a modulo 1 6 ⋅ 6 2 5 = 1 0 0 0 0 . Both residues are easy to find. Notice that 2 0 1 5 2 ≡ 1 ( m o d 1 6 ) . Since 2 0 1 6 a is clearly even, we have 2 0 1 5 2 0 1 6 a ≡ 2 0 1 5 2 k ≡ ( 2 0 1 5 2 ) k ≡ 1 k ≡ 1 ( m o d 1 6 ) . Also, notice that 5 is a factor of 2 0 1 5 . Since 2 0 1 6 a is very large, 5 4 = 6 2 5 is a factor of 2 0 1 5 2 0 1 6 a and thus 2 0 1 5 2 0 1 6 a ≡ 0 ( m o d 6 2 5 ) . By the Chinese remainder theorem, the previous two congruences imply 2 0 1 5 2 0 1 6 a ≡ 6 2 5 ( m o d 1 0 0 0 0 ) , so the last four digits of 2 0 1 5 2 0 1 6 a are 0 6 2 5 .
Now consider g ( 2 0 2 1 ) , which we will write as 2 0 2 1 2 0 2 0 b . Notice that 2021 and 10000 are relatively prime and ϕ ( 1 0 0 0 0 ) = 4 0 0 0 . If 2 0 2 0 b ≡ r ( m o d 4 0 0 0 ) , then Euler's theorem implies 2 0 2 1 2 0 2 0 b ≡ 2 0 2 1 r ( m o d 1 0 0 0 0 ) . The prime factorization of 4000 is 2 5 ⋅ 5 3 , and 2 and 5 are both factors of 2020. Since b is very large, 2 5 and 5 3 are both factors of 2 0 2 0 b and thus 2 0 2 0 b ≡ 0 ( m o d 4 0 0 0 ) . By Euler, 2 0 2 1 2 0 2 0 b ≡ 2 0 2 1 0 ≡ 1 ( m o d 1 0 0 0 0 ) , so the last four digits of 2 0 2 1 2 0 2 0 b are 0 0 0 1 .
Therefore, the desired value is 6 2 5 + 1 = 6 2 6 .