# Is there an upper bound on the number of distinct integer outputs a trig function can have?

"Usually" when you plug integers into trig functions you don't get integers as output. I'm interested in trig functions that pass through integer lattice points.

Let $f$ be a linear combination of sine and cosine functions. We want to plug integers into $f$ and get integers in return. Here are some examples:

• $5\cos \left(\frac{2\pi x}{3}\right)+\frac{9}{\sqrt{3}}\sin \left(\frac{2\pi x}{3}\right)$ cycles through the outputs 5, 2, and -7.
• $5\cos \left(\frac{\pi x}{2}\right)+2\sin \left(\frac{\pi x}{2}\right)$ cycles through the outputs 5, 2, -5, and -2.
• $5\cos \left(\frac{\pi x}{3}\right)-\frac{1}{\sqrt{3}}\sin \left(\frac{\pi x}{3}\right)$ cycles through the outputs 5, 2, -3, -5, -2, and 3.

These examples demonstrate that we can get three, four, and six distinct integer outputs. I'm wondering if we can achieve more than that, particularly if we can produce arbitrarily many distinct integer outputs. Here the sine and cosine functions have the same period, but that does not have to be the case. These integer outputs also came from consecutive integer inputs, but that also does not have to be so.

Thank you.

By trigonometric interpolation we can prescribe the integers outputs to be taken at prescribed points in $[0,2\pi]$. If we choose input points to be rational then we can replace $x$ by $x/N$ for an appropriate $N$ such that the new function gives the wanted output at integer points.