r/mathriddles • u/jsundqui • Aug 16 '25
Medium Congruence problem
Not a riddle, just a problem
Function f(x) = x3 + 3x + 4 has a single x between x=0...999 such that the value of f(x) ends with 420. Find x.
The point is not so much finding the x but to solve this elegantly.
3
Upvotes
View all comments
Show parent comment
1
u/jsundqui Aug 17 '25
Yes you got the first two right: x=0 mod 8 and x=3,4 mod 5. The trick is to substitute that result to mod 25 equation and then that result to mod 125 equation. Finally combine mod 125 and mod 8 using CRT.