Problem

Source: baltic way, 2006

Tags: modular arithmetic, number theory proposed, number theory



Determine all positive integers $n$ such that $3^{n}+1$ is divisible by $n^{2}$.