Problem

Source: 2015 Turkey Junior National Olympiad P3

Tags: number theory, Diophantine equation, prime numbers



Find all pairs $(p,n)$ so that $p$ is a prime number, $n$ is a positive integer and \[p^3-2p^2+p+1=3^n \]holds.