Prove by induction that $f(a,b) = \frac{a}{b} + \frac{b}{a} + \frac{1}{ab}$ is a multiple of 3 if it is an integer I'm trying to solve the following problem by induction but I'm getting stuck. 

For positive integers $a$ and $b$, define $$f(a,b) = \frac{a}{b} + \frac{b}{a} + \frac{1}{ab}.$$ If $f(a,b)$ is an integer, prove that it is a multiple of 3.

Proof by induction on a:
Base case: $a=1$
$$f(1,b) = \frac{1}{b} + \frac{b}{1} + \frac{1}{b} = \frac{2}{b} + b$$
Since $f(1,b)$ is an integer than $\frac{2}{b}$ must be an integer and $b\in\{1,2\}$ . Then $f(1,b) = 3$.
Inductive hypothesis: Assume for some integer $k \ge 1,$ $$f(k,b) = \frac{k}{b} + \frac{b}{k} + \frac{1}{kb}$$ is an integer and is a multiple of 3. 
I want to show that $f(k+1,b)$ is also a multiple of 3. Then
$$f(k+1,b) = \frac{k+1}{b} + \frac{b}{k+1} + \frac{1}{(k+1)(b)} = \cdots.$$ 
And this is where I get stuck. I know there are other ways to solve this problem but I wanted to try it by induction. Hope someone can help with this! Thanks.

I don't see how to solve the problem by induction but there's a fairly simple solution without induction.  Note that
$$f(a, b)= \frac{a^2+b^2+1}{ab}.$$
If either $3 \vert a$ or $3 \vert b$, then the numerator is not a multiple of $3$, but the denominator is, so the fraction can't be an integer.
If neither $a$ nor $b$ is a multiple of $3$, then $a^2 \equiv b^2 \equiv 1 \pmod{3}$ so the numerator is a multiple of $3$ and the denominator is not, so if the fraction is an integer it must be a multiple of $3$.
