The following identity between generalized Dirichlet series, both absolutely convergent in the whole complex plane, occurs when investigating functions of the Selberg class of degree $d=0$: \begin{equation} \sum_{n=1}^\infty a(n)\left(\frac{Q^2}{n}\right)^s=\omega Q\sum_{n=1}^\infty\overline{a(n)}n^{s-1}. \end{equation} To prove that \begin{equation} F(s)=\sum_{n=1}^\infty \frac{a(n)}{n^s} \end{equation} is actually a Dirichlet polynomial, using an uniqueness theorem for generalized Dirichlet series one derives from the above identity that $Q^2/n$ is an integer for all n with $a(n)\neq 0$. But how?
If we set $b(n):=\omega Q \overline{a(n)}$, $\lambda_n=\log(n/Q^2)$ and $\nu_n=\log(n)$ we got \begin{equation} f(s):=\sum_{n=1}^\infty a(n)e^{-\lambda_n s}=\sum_{n=1}^\infty b(n)e^{-\nu_n(1-s)}=:g(1-s) \end{equation}
From the uniqueness theorem I know we would get, that if $f(s)=g(s)$ in some half-plane, then $\lambda_n=\nu_n$ and $a(n)=b(n)$ for all $n$, which is exactly what I need. But in fact, we just got $f(1/2)=g(1/2)$.
We use the
With that uniqueness theorem, we consider
$$\sum_{n = 1}^{\infty} a(n)\biggl(\frac{Q^2}{n}\biggr)^s - \sum_{n = 1}^{\infty} \frac{\omega Q \overline{a(n)}}{n} n^s \equiv 0,\tag{$\ast$}$$
and write the left hand side in the form of the theorem, letting $(\lambda_k)$ be an enumeration of
$$\{\log n : n \in \mathbb{N}\} \cup \{2\log Q - \log n : n \in \mathbb{N}\}$$
and setting
$$\alpha_k = \begin{cases}a(m) - \dfrac{\omega Q\overline{a(n)}}{n} &, \lambda_k = \log n = 2\log Q - \log m \\ \quad -\dfrac{\omega Q \overline{a(n)}}{n} &, \lambda_k = \log n \\ \qquad a(m) &, \lambda_k = 2\log Q - \log m\end{cases}$$
where we choose the first matching condition. The hypotheses of the theorem are satisfied, since the two series in $(\ast)$ converge absolutely on the entire plane by assumption, and since $Q^2/n \to 0$ and $n\to +\infty$, the sequence $(\lambda_k)$ has no accumulation point. Hence we have $\alpha_k = 0$ for all $k$, and by the definition of $\alpha_k$ this yields $a(m) \neq 0 \implies Q^2/m \in \mathbb{N}$.
Proof (of the theorem): For $\lambda \in \mathbb{R}$, consider the integral
$$I(\lambda) := \frac{1}{2\pi i}\int_{c - i\infty}^{c + i\infty} \frac{e^{\lambda s}}{s^2}\,ds.$$
The integrand is an entire meromorphic function with only one pole at $0$, and the residue there is $\lambda$. By the residue theorem, we have
$$I(\lambda) = \begin{cases} \lambda &, \lambda \geqslant 0 \\ 0 &, \lambda < 0 \end{cases}\quad \text{for } c > 0,\text{ and}\quad I(\lambda) = \begin{cases}\; 0 &, \lambda \geqslant 0 \\ -\lambda &, \lambda < 0\end{cases}\quad\text{for } c < 0.$$
Since the series in $(1)$ converges absolutely we can interchange summation and integration, and since $f(s)$ vanishes identically on the integration contour we obtain
\begin{align} 0 &= \frac{1}{2\pi i} \int_{c-i\infty}^{c+i\infty} \frac{f(s)e^{-\lambda s}}{s^2}\,ds \\ &= \sum_{k = 1}^{\infty} \frac{\alpha_k}{2\pi i}\int_{c - i\infty}^{c + i\infty} \frac{e^{(\lambda_k - \lambda)s}}{s^2}\,ds \\ &= \sum_{c(\lambda_k - \lambda) > 0} \alpha_k \lvert \lambda_k - \lambda\rvert \end{align}
for every $\lambda \in \mathbb{R}$. Varying $\lambda$ between two adjacent (in order, not with respect to index) $\lambda_k$ shows that
$$\sum_{\lambda_k > \lambda}\alpha_k = 0\qquad\text{resp.}\qquad \sum_{\lambda_k < \lambda}\alpha_k = 0\tag{2}$$
for every $\lambda\in \mathbb{R}$. Choose $m\in \mathbb{N}$ and consider $(2)$ for a $\lambda$ slightly smaller than $\lambda_m$ and a $\lambda$ slightly greater. It follows that $\alpha_m = 0$. Since $m$ was arbitrary, the theorem is proved.