Extremal set theory on Sperner like systems. Consider the family of subsets $F$ of an $n$-element base set H, having the following property:
For each $S\in F$ the size $|S|$ is a prime number and if $S_1,S_2\in F$ and $S_1 \neq S_2$, the $|S_1 \cap S_2|$ is even.
Find the maximal size of the family $F$.
sketch: I tried doing it by taking the cases $p=2$ and $2 \nmid p$, where ($p$ is a prime) separately and then applying Sperner Theorem.  Is this the right way? Any hint will be appreciated.
 A: Here's a way to show that the largest family has size either $n-1$ or $n$. For the lower bound, consider the family which has elements $\{1,2\},\{1,2,3\},\{1,2,4\},\dots,\{1,2,n\}$. Every set has prime size, they all intersect in $\{1,2\}$, which is even, and there are $n-1$ of them. We can do better if $n=p+1$ where $p$ is an odd prime. In particular, take all subsets of $[p+1]$ of size $p$. Each of these intersect in $p-1$ elements, which is even. Thus, if $n=p+1$, we can have a family of size $n$.
For the upper bound, we need to recall the odd-town theorem: If $\mathcal{F}$ is a family of subsets of $[n]$ where $|F|$ is odd for every $F\in\mathcal{F}$ and $|F_1\cap F_2|$ is even for every $F_1\neq F_2\in\mathcal{F}$, then $|\mathcal{F}|\leq n$. If you have not seen I proof of this, I highly recommend looking at it, as it's very pretty.
Now, let $\mathcal{F}$ satisfy your conditions and suppose that $F_1,\dots,F_k$ are the sets of size $2$ in $\mathcal{F}$. Since every pair of sets intersects in an even size, we know that $F_1,\dots,F_k$ must be disjoint. Beyond this, if $F\in\mathcal{F}$ is not of size $2$, then for each $i\in[k]$, either $F\cap F_i=\varnothing$ or $F_i\subseteq F$. Now, remove the elements of $F_1,\dots,F_k$ from the ground-set. This leaves us with $n-2k$ elements, and the modified family still has the property that every set has odd size and every pair intersect in an even size. Thus, by the odd-town theorem, we have at most $n-2k$ sets that were not of size $2$, so $|\mathcal{F}|\leq k+(n-2k)=n-k\leq n$. 
