  We show that integer partitions, the fundamental building blocks in additive
number theory, detect prime numbers in an unexpected way. Answering a question
of Schneider, we show that the primes are the solutions to special equations in
partition functions. For example, an integer $n\geq 2$ is prime if and only if
  $$
  (3n^3 - 13n^2 + 18n - 8)M_1(n) + (12n^2 - 120n + 212)M_2(n) -960M_3(n) = 0,
  $$
  where the $M_a(n)$ are MacMahon's well-studied partition functions. More
generally, for "MacMahonesque" partition functions $M_{\vec{a}}(n),$ we prove
that there are infinitely many such prime detecting equations with constant
coefficients, such as
  $$
  80M_{(1,1,1)}(n)-12M_{(2,0,1)}(n)+12M_{(2,1,0)}(n)+\dots-12M_{(1,3)}(n)-39M_{(3,1)}(n)=0.
  $$
