Problem

Source: VIII International Festival of Young Mathematicians Sozopol 2017, Theme for 10-12 grade

Tags: number theory



Find all pairs of natural numbers $(a,n)$, $a\geq n \geq 2,$ for which $a^n+a-2$ is a power of $2$.