by Community (Bot) · Feb 28, 2026 · Mathlib 777aaa6 (Lean v4.29.0-rc3)
Here's what I would do: Notice that 50+2621 and 50−2621 are both roots of the quadratic x2−100x+16 , and so the sequence {an}n=0∞ defined by an=(50+2621)n+(50−2621)n satisfies the recurrence relation an=100an−1−16an−2 . This implies that an≡−16an−2(mod100) . Our desired result is just 2(−16)25−1mod100 . Fortunately, the congruences mod100 are easy to check and have period 5 , and we get 2(−16)5−1≡47(mod100) as our answer.