Here is the general form of 3 pairwise independent events.
Consider 3 events with respective probabilities $p(i)$ for $i = 1, 2, 3$. Write $p(1, 1, 1)$ for the probability that all 3 events occur. Using pairwise independence, one can determine the probabilities of the 7 other combinations of these 3 events and their complements from the given $p(i)$ and $p(1, 1, 1)$. (For example, $p(1,1,1) + p(1,1,0) = p(1)p(2)$, where $p(1,1,0)$ denotes the probability that only the first two events occur.) Excluding the case where any $p(i) = 0$, the solutions can be written as $$\left(0<p(1)\leq \frac{1}{3}\land \left(\left(0<p(2)\leq \frac{1}{2} (1-p(1))\land
p(3)=-p(1)-p(2)+1\land 0\leq p(1,1,1)\leq p(1) p(2)\right)\lor \left(\frac{1}{2}
(1-p(1))<p(2)<1-p(1)\land p(3)=-p(1)-p(2)+1\land 0\leq p(1,1,1)\leq p(1)
p(3)\right)\right)\right)\\
\lor \left(\frac{1}{3}<p(1)\leq \frac{1}{2}\land ((0<p(2)\leq
1-2 p(1)\land p(3)=-p(1)-p(2)+1\land 0\leq p(1,1,1)\leq p(1) p(2))\lor (1-2
p(1)<p(2)<p(1)\land p(3)=-p(1)-p(2)+1\land 0\leq p(1,1,1)\leq p(2) p(3))\lor (p(1)\leq
p(2)<1-p(1)\land p(3)=-p(1)-p(2)+1\land 0\leq p(1,1,1)\leq p(1) p(3)))\right)\\
\lor
\left(\frac{1}{2}<p(1)<1\land 0<p(2)<1-p(1)\land p(3)=-p(1)-p(2)+1\land 0\leq
p(1,1,1)\leq p(2) p(3)\right)$$ according to Mathematica
's Reduce
function.
More generally (and I think what Greg said), let $A_1, \ldots, A_n$ be $(n-1)$-wise independent events. For $I \subseteq [n]$,
write
$$A_I := \bigcap_{i \in I} A_i^c \cap \bigcap_{i \notin I} A_i.$$
Also, write
$$z_I := P(A_I) - \prod_{i \in I} P(A_i^c) \cdot \prod_{i \notin I} P(A_i).$$
In particular,
$$z := z_\emptyset = P\Bigl(\bigcap_{i=1}^{n} A_i\Bigr) - \prod_{i=1}^{n} P(A_i).$$
Writing the probability of an intersection of events and their complements as an expectation of a product of indicators and expanding the product, we get that
$$z_I = (-1)^{|I|} z$$
for all $I$. Thus, the choices of $z$ that give a probability distribution are those for which
$$\prod_{i \in I} P(A_i^c) \cdot \prod_{i \notin I} P(A_i) + (-1)^{|I} z \in [0, 1]$$
for all $I$.