Problem

Source: Serbia JBMO TST 2023 P4

Tags: number theory



Find all triples $(k, m, n)$ of positive integers such that $m$ is a prime and: (1) $kn$ is a perfect square; (2) $\frac{k(k-1)}{2}+n$ is a fourth power of a prime; (3) $k-m^2=p$ where $p$ is a prime; (4) $\frac{n+2}{m^2}=p^4$.