Let $P\subseteq \mathbb{N}$ be the set of primes, and suppose $Q\subseteq P$ is some subset. Prove that $PA$ has a model $M$ with an element $m$, such that $M\models q\mid m$ for ever $q\in Q$ and $M\models \neg p\mid m$ for every $p\in Q-P$
PA is Peano Axioms.
So I believe I want $\Gamma:= PA\cup \{q\mid m: q\in Q\}$
Then taking any sub theory of $\Gamma$ I have some finite set of $\{q_1\mid m, q_2\mid m,...,q_k\mid m\}$
Which I understand can be taken to be prime factors of some $m$, but there isn't an $m$ which is the product of infinitely many primes. Which makes it seem like there can't be a single $m$ which satisfies any finite subset.
Add a constant symbol $c$ the language and consider the theory consisting of PA plus $$ \{\mathbf q\mid c:q\in Q\}\cup\{\mathbf p\not\mid c:p\in P-Q\}$$ where the boldface denotes the numeral (so to be clear about what language we’re in and that we aren’t mixing syntax and semantics).
This theory is finitely satisfiable: use use the usual interpretation in the naturals and interpret $c$ as the product of all the $q\in Q$ such that $\mathbf q\mid c$ appears in the finite subtheory under consideration.
Thus by the compactness theorem, the theory has a model. Then let $m$ be the interpretation of $c$ in that model.