I was doing some basic things on quadratic congruences. While doing so I encountered this.
Let $p$ be a prime and $r$ an integer such that $0\leq r<p$. Then I want a condition on $p$ (like $p\equiv a\mod b$, $a$ and $b$ are some positive integers) such that $$24 r +(k+1)=(6m+1)^2+k(6n+1)^2$$ has no solution for $m$ and $n$. Here, $k>1$ and $m$, $n$ are any integers.
Basically, I want $24r+(k+1)$ is a quadratic non residue modulo $p$ by putting some condition on $p$ from the above, for at least $k=2$ and $4$. Please help.
The conditions that support the above equality are
For $k=2$, $$24r+(k+1)\equiv 1 ~or~3 \mod 8,$$ and for $k=4$, $$24r+(k+1)\equiv 1 \mod 4.$$