I'm in the process of trying to teach myself number theory and got stuck on trying to understand what is probably a basic, fundamental theorem in number theory. The theorem that for every nonzero integer, there is a prime factorization
$$ n = -1^{\epsilon(n)} * \prod_{p} p^{a(p)}, $$
with the exponents uniquely determined by $n$.
Can someone please walk through how this function works? I am particularly confused with how $a(p)$ is found and how to determine $\epsilon(n)$.
With regard to $\epsilon(n)$, its only purpose is to determine the sign of $n$. Explicitly $$ \epsilon(n)= \begin{cases} 0&\text{if}\;n>0\\[4pt] 1&\text{if}\;n<0\\[4pt] \end{cases} $$ With regard to $a(p)$ . . .
For each prime $p$, the exponent, $a(p)$, is the largest nonnegative integer such that $p^{a(p)}{\,\mid\,}n$.
For example, if $n=-490$, then $$n = ((-1)^1)\Bigl((2^1)(3^0)(5^1)(7^2)(11^0)(13^0)\cdots\Bigr)$$ Thus, for this example, we have \begin{align*} \epsilon(n)&=1\\[4pt] a(2)&=1\\[4pt] a(5)&=1\\[4pt] a(7)&=2\\[4pt] \end{align*} and $a(p)=0$ for all other primes $p$.