Given an entire function $f$, I have that $f(ix)$ and $f(1+ix)$ are real for all $x \in \mathbb{R}$. I want to show that $f(z) = f(z+2)$ for all $z \in \mathbb{Z}$.
I've thought about considering the function $g(z) = f(z+2) - f(z)$ and maybe teasing out the identity theorem but to no avail. Schwarz reflection might be another path, but I can't see how to apply that here. Any hints would be appreciated.
Hint: Let $h(z)=f(iz)$ and use the Schwarz reflection principle to get an expression for $\overline{f(i z)}$, then make an appropriate substitution to get an expression for $f(z)$. Then repeat this approach for the second real line.