Definition of knot $p$-colorability On page 4 of this online document, p-Colorings of Weaving Knots by Layla Oesper the following definition is given:
Given an odd prime number p we say that the projection of a knot $K$ is $p$-colorable if every strand in the projection can be labeled using the number $0$ to $p - 1$, with at least $2$ of the labels distinct, so that at each crossing we have
$2x - y - z = 0 \mod p$,
where $x$ is the value assigned to the overstrand and $y$ and $z$ are the values assign to the understrands of the crossing.
I see that the idea is to assign a colorability number to a knot to classify it, but what is the role the ''$2$" in the equation above?
 A: The concept of $p$-colorability was popularized by Ralph Fox as a way to explain dihedral representations of fundamental groups of knot complements to high schoolers.  Expanding this out just a little, the group $\pi_1(S^3-K)$ has a presentation known as the Wirtinger presentation, where generators correspond to meridians and relations correspond to crossings.  If the basepoint is above the diagram, a meridian generator is a straight-line path from the basepoint to an arc, then around the knot in a short meridian loop, then back, like so:

A dihedral representation is a homomorphism $\pi_1(S^3-K)\to D_p$ with $D_p$ the dihedral group (symmetries of a regular $p$-gon) where each meridian is sent to a flip of the polygon.  Such a representation is called nontrivial if there are two meridians that are sent to different flips.  Since flips are involutions, we don't need to worry about orientations of meridian generators.  Every dihedral representation factors through the quotient group
$$\pi_1(S^3-K)/\langle \mu^2=1\text{ for }\mu\text{ a meridian generator}\rangle,$$
so we will work with this group instead of $\pi_1(S^3-K)$ itself.  An important consequence is that we do not need to worry about orientations in the Wirtinger relations.
The relations for the Wirtinger presentation come from loops just under crossings:

Here, $ab=ca$, or $c=aba^{-1}$.  That is, "passing a generator under a crossing conjugates it by the overstrand's generator."
Recall that the dihedral group has a presentation
$$D_p=\langle \sigma,\tau\mid \sigma^n=1,\tau^2=1,\tau\sigma=\sigma^{-1}\tau\rangle,$$
where $\sigma$ is rotation of the polygon by $2\pi/p$ and $\tau$ is a flip.
Every flip of $D_p$ can be represented as $\sigma^k\tau$ for $k\in \{0,1,\dots,p-1\}$, and we have the following conjugation rule from the relations:
$$(\sigma^x\tau)(\sigma^y\tau)(\sigma^x\tau)^{-1} = \sigma^x\tau\sigma^{y-x} = \sigma^x\sigma^{x-y}\tau=\sigma^{2x-y}\tau.$$
Thus, at a crossing with $a=\sigma^x\tau$, $b=\sigma^y\tau$, and $c=\sigma^z\tau$, there must be the relation that $\sigma^z=\sigma^{2x-y}$.  That is, that
$$z\equiv 2x-y\pmod{p}.$$
There is a version of $p$-colorability for knotted graphs, too, where like the Wirtinger presentation the relations come from loops underneath vertices in a diagram for the knotted graph.  For example, in a degree-$4$ vertex

the (unoriented) relation is $abcd=1$.  With $a=\sigma^x\tau$, $b=\sigma^y\tau$, $c=\sigma^z\tau$, and $d=\sigma^w\tau$, this relation becomes $\sigma^{x-y+z-w}=1$, or
$$x-y+z-w\equiv 0\pmod{p}.$$
There is a way to turn a degree-$4$ vertex into a crossing by identifying a pair of opposite edges to be the overstrand.  For example, if we want $a$ and $c$ to form the overstrand, we add in $\sigma^x\tau=\sigma^z\tau$, which is $x\equiv z\pmod {p}$.  Substituting this into the above equation, we obtain
$$2x-y-w\equiv 0\pmod{p}.$$
Perhaps this shows where the $2$ comes from: the overstrand identifies the two meridians, but the "real" $p$-coloring relation is an alternating sum around the crossing.
