TITLE: Family of sets with $|F_i| \equiv 2\pmod 3$ and $|F_i \cap F_j| \equiv 0 \pmod 3$
QUESTION [14 upvotes]: Let $p$ be a prime. By considering the incidence vectors of subsets $F_1,\ldots,F_m$ of $\{1,2,\ldots,n\}$, such that $|F_i| = a \not\equiv 0 \pmod p$ and $|F_i \cap F_j| \equiv 0 \pmod p$ for all $1\leq i<j \leq m$, we can show $m\leq n$ (the vectors are linearly independent).
For $p=2$ this bound is achievable by the singletons $\{\{1\},\{2\},\ldots,\{n\}\}$, same for $p=3$ with $a=1$. But what about $p=3$ with $a=2$? Is there an example of size $n$ (or perhaps $n - c$ for some "small" constant $c$)?. Observing such examples could help towards ideas of how to improve the bound $m\leq n$ where possible.

REPLY [8 votes]: From the other direction the following simple argument shows that $m=n$ is impossible, when $n$ is an odd integer.
Assume that we have a construction with $m=n$. Let $A$ be the $n\times n$ matrix with the incidence vector of $F_i$ as its $i$th row. The dictated properties then imply that
$$
AA^T=2 I_n
$$
in the ring of $n\times n$ matrices over $\Bbb{F}_3$. Here
$$2^n=\det(AA^T)=\det(A)^2.$$
But $2^n$ is a square in $\Bbb{F}_3$ if and only if $n$ is even.