Consider the following problem, called the 'Eventown problem':
In a town, residents can form different clubs. The town council establishes the following rules:
1) Every club must have an even number of members.
2) Two clubs must not have exactly the same members.
3) Every two clubs must share an even number of members.
If the town has $n$ inhabitants, then what is the maximum number of clubs that can be formed according to the rules?
In principle, you can "marry" the inhabitants and ensure only couples join clubs (singles are not allowed). Since the $\lfloor \frac{n}{2}\rfloor$ couples have two choices each, we can form $2^{\lfloor \frac{n}{2}\rfloor}$ clubs. The surprising fact is that this the best possible! This can be solved using some tricks from linear algebra over the binary field. I really enjoyed the wonderful proof of this problem.
Naturally, I wanted to know to what extent this trick can be used. But I could not find any results on the generalization of this problem to other primes.
In particular, I wanted to know if we can solve the '$p$-town problem' where we replace the word 'even' in the Eventown problem with the words 'divisible by $p$' for a prime $p$. Clearly grouping people into teams of size $p$ and asking them to join the clubs, in teams only, will give us a lower bound of $2^{\lfloor \frac{n}{p}\rfloor}$ on the maximum number of clubs.
Is this the best possible? Can we find any investigation on this problem? I am very curious about the linear algebra trick! Does a linear algebra approach to this problem generalize to other primes? Or was it a curious case of a 'one-shot' trick?
Thanks!