Let $u,v$ be positive integers with $\gcd(u,v)=1$, let $k\ge 3$ be an odd integer, and fix a prime $p$.
Now what are the implications of $p^2 \mid (u^2+kv^2)$?
I know implications in certain cases, e.g., if $k=3$ then the only prime factors of $u^2+3v^2$ are $3$ or primes of the form $6k+1$; but (e.g.) does this statement (or something like it) hold for $k$ a multiple of $3$? In other words, I'm looking for general implications, based on properties of $k$.
For prime $2,$ when $k \equiv 1 \pmod 4,$ you cannot have $u^2 + k v^2 \equiv 0 \pmod 4$ with coprime $u,v.$ When $k \equiv 3 \pmod 8,$ you cannot have $u^2 + k v^2 \equiv 0 \pmod 8$ with coprime $u,v.$ When $k \equiv 7 \pmod 8,$ there is no restriction. For example, with $w \geq 3,$ we can always solve $$ x^2 + 7 y^2 = 2^w $$ with odd integers $x,y.$ Proof by induction on $w,$ also some care is needed.
For odd primes $q$ with $(-k|q) = -1,$ $\gcd(u,v) = 1$ implies $u^2 + k v^2 \equiv 0 \pmod q$ is impossible.
For odd primes $p$ with $(-k|p) = 1,$ $\gcd(u,v) = 1$ allows $u^2 + k v^2 \equiv 0 \pmod p^w$ for arbitrarily large $w.$
When odd $p | k,$ the implication is $p | u.$ The possibility of any restriction on $v$ depends entirely on how high a power of $p$ divides $k.$ If $u^2 + 3 v^2 \equiv 0 \pmod 9,$ then both $u,v \equiv 0 \pmod 3.$ In comparison, if $u^2 + 9 v^2 \equiv 0 \pmod 9,$ then $u \equiv 0 \pmod 3$ but we do not get more than that.