Problem

Source: Bulgaria MO Regional round 2024, 10.3

Tags: number theory



Find all positive integers $1 \leq k \leq 6$ such that for any prime $p$, satisfying $p^2=a^2+kb^2$ for some positive integers $a, b$, there exist positive integers $x, y$, satisfying $p=x^2+ky^2$.

HIDE: Remark on 10.4 It also appears as ARO 2010 10.4 with the grid changed to $10 \times 10$ and $17$ changed to $5$, so it will not be posted.