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.