By Gauss's Lemma, I mean: https://en.wikipedia.org/wiki/Gauss%27s_lemma_(number_theory)
If I allow $p$ to be any odd positive number rather than just a prime number, and still require that $a$ and $p$ be coprime, then does the Lemma still hold? We would use the Jacobi symbol rather than the Legendre symbol so we could handle composite numbers.