Problem

Source: Nigeria Olympiad senior mathematics round 2 problem 4 2020

Tags: number theory



Let $N>= 2$ be an integer. Show that $4n(N-n)+1$ is never a perfect square for each natural number $n$ less than $N$ if and only if $N^2+1$ is prime.