Euler Problem 123 asks: Let p(n) be the nth prime: 2, 3, 5, 7, 11, ..., and let r be the remainder when (p(n)-1)n + (p(n)+1)n is divided by p(n)2.
For example, when n = 3, p(3) = 5, and 43 + 63 = 280. 280 mod 25 = 5.
The least value of n for which [...] Read More...