First of all, I'm guessing you intended to write a function from the integers to the integers.
Second, if a constant, then from the given functional relation it
follows that , and this quadratic has two real non-integer solutions, contradiction.
(a) in the func. relation we get ;
(b) inputting we get , and;
(c) inputting we get
Now you can find as a function of and substitute then in (a) to get and etc. (Do you know/remember how to search for rational/integer roots of integral polynomials? This can come handy in this case)
Hmmm... the problem is that the only two possible values for yield non-integer values for ... .Check this.
I miscalculated: there's only one possible value for which then gives one integer value for and then one unique integer value for ...fine!