Does every linear integer polynomial give a square at some integer? My question is, if you have some function
$$f(x)=nx+c$$
which accepts only integer inputs of $x$, where $n>0$ and $c$ are fixed integer constants, can you always find an $x$ such that
$$f(x)=k^2$$
where $k$ is an integer, i.e. the result is a perfect square.  
 A: No: all squares are equal to $0$ or $1$ modulo $3$, so $n=3$, $c=2$ is a counterexample. Indeed, you can probably find infinitely many such, since the same is true modulo $4$, and probably for larger moduli.
A: Note that if $y$ is a perfect square then $y\equiv0,1\pmod4$:


*

*$z\equiv0\pmod4 \implies z^2\equiv 0^2\equiv0\pmod4$

*$z\equiv1\pmod4 \implies z^2\equiv 1^2\equiv1\pmod4$

*$z\equiv2\pmod4 \implies z^2\equiv 2^2\equiv0\pmod4$

*$z\equiv3\pmod4 \implies z^2\equiv 3^2\equiv1\pmod4$


Therefore:
If $n\equiv0\pmod4$ and $c\equiv2,3\pmod4$ then $nx+c\equiv2,3\pmod4$ hence not a perfect square.
A: Although the question has already been answered, I would like to put my two cents with certain cases for which the answer is positive.
We are considering $n$ integer and $c$ positive integer. If
$$
f(x)=nx+c=k^2,
$$
then
$$
x=\frac{k^2-c}{n}
$$
Now, assume $c$ is a perfect square. Then,
$$
x=\frac{(k+\sqrt{c})(k-\sqrt{c})}{n},
$$
and the answer is positive, as we can observe by taking $k=n-\sqrt{c}$:
$$
x=\frac{(n-\sqrt{c}+\sqrt{c})(n-\sqrt{c}-\sqrt{c})}{n} = \frac{n(n-2\sqrt{c})}{n}=n-2\sqrt{c}.
$$
For the sake of completeness, you can check this with $n=70$, $c=25$, which yields $k=65$ and $x=60$.
A: All depend of the constants $(c,n)$. You need that $x^2-c\equiv0\space (mod\space n)$ in order to have solution. For example, for $(c,n)=(3,7)$ you have no solution and for $(c,n)=(4,7)$ you have.
