I would like to find a language $\mathcal{L}$ and first order sentence $\phi$ of $\mathcal{L}$ so that its finite spectrum is

1. $\{p^n ~:~ n > 0, \text{ p is prime}\}$
2. $\{ p ~:~ p \text{ is prime}\}$

It seems like a large library of mathematical knowledge is needed to even begin consider such questions, and I have to admit mine are thin.