Problem

Source: Benelux MO 2013 Q4

Tags: modular arithmetic, quadratics, number theory, Diophantine equation, number theory unsolved



a) Find all positive integers $g$ with the following property: for each odd prime number $p$ there exists a positive integer $n$ such that $p$ divides the two integers \[g^n - n\quad\text{ and }\quad g^{n+1} - (n + 1).\] b) Find all positive integers $g$ with the following property: for each odd prime number $p$ there exists a positive integer $n$ such that $p$ divides the two integers \[g^n - n^2\quad\text{ and }g^{n+1} - (n + 1)^2.\]