(Note: Here numbers mean positive integers, all variables used are positive integers)
This query is regarding a particular question where I need to prove that a particular form of numbers ("particular form of numbers", for example squares, cubes, $4n+1$ etc.) can attain every remainder modulo $n$ for some positive integer $n$.
So my question is, what is the general process to approach this type of problem?
For example suppose we need to find the type of numbers $k$ for which the sequence $1^2, 2^2, 3^2 , \cdots $ contains all the remainders modulo $k$. (That is , the equation $r^2 = x \pmod k$ has a solution $r$ for all $x=1,2, \cdots k$).
So far, I have not been able to make any rigourous proof. So please give some general method to approach these type of question.