**Disclaimer:** The original version of this question focused on $2^n$ in lieu of $n^2$. It is in the hope that the question is easier with $n^2$ that I changed it.

I have an always-nonnegative (on the nonnegative integers) trigonometric polynomial¹ $P$: $$P(n) = \mathcal{R}\left(\sum_{j=1}^k a_j e^{i \theta_j n}\right),$$ with $\lim \limits_{n \to \infty} P(n^2) = 0$.

I want to show that $P(n^2) = 0$.

Here are a few basic facts on trigonometric polynomials that may help. A
trigonometric polynomial is an *almost-periodic function*. This implies in
particular that:

For $\epsilon > 0$, there is a number $L=L(\epsilon)$ such that any interval of length $L$ on the real line has an $\epsilon$-translation integer, that is, an integer $t$ such that $|P(n) - P(n +t)| < \epsilon$ for any $n$.

From any sequence $\{P(n + m_k)\}$, one can extract a subsequence which converges uniformly with respect to $n$. Moreover the function to which it converges is almost-periodic itself. ($\{m_k\}$ is an arbitrary sequence of numbers).

In particular, for any sequence $\{m_k\}$, for any $\epsilon$, there exist $i \neq j$ such that $m_i - m_j$ is an $\epsilon$-translation number.

An even simpler case is to consider that $\lim \limits_{n \to \infty} P(n) = 0$. A proof that it implies that $P(n) = 0$ for any $n$ is the following. Suppose there is an $m$ such that $P(m) > 0$, and set $\epsilon = P(m)/2$. Now for any $N$, there exists an $\epsilon$-translation number $t$ of $P$ with $t > N$ an integer. Then $|P(m) - P(m+t)| < \epsilon$, thus $P(m+t) > \epsilon$. Thus $\lim \limits_{n \to \infty} P(n)$ is not null.

¹: Trigonometric polynomial is taken in the sense of, say, Corduneanu (in Almost Periodic Functions). Wikipedia seems to have a different definition.