Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
If we use the heuristics that a number $n$ is prime with probability $1 / \log n$, the expected number of $m \le x$ with $f(m)$ prime is $\sim \log \log x$. I don't think checking for $m \le 1300$ is good enough support.
I'm not an expert in analysis, but I think this kind of argument works: Suppose $f$ is bounded by a polynomial. The Fourier transform $\hat{f} : T^n \to \mathbb{R}$ is then a tempered distribution. From the harmonic condition, we get $\hat{f} \cdot (\sum_k (e^{2 \pi i x_k} + e^{- 2 \pi i x_k}) - 2d) = 0$ and so $\hat{f}$ is supported on the origin. This implies that $\hat{f}$ is a linear combination of $D^\alpha \delta$ and thus $f$ is indeed a polynomial.
The answer seems to be related to the covering density of the set $\{1, \dots, n\}$ in the multiplicative group generated by $1, \dots, n$ (viewed as a lattice).