TITLE: Sum of $n$ vectors in $(\mathbb Z/n)^k$
QUESTION [16 upvotes]: Let $n,k$ be positive integers. What is the smallest value of $N$ such that for any $N$ vectors (may be repeated) in $(\mathbb Z/(n))^k$, one can pick $n$ vectors whose sum is $0$? 
My guess is $N=2^k(n-1)+1$. It is certainly sharp: one can pick our set to be $n-1$ copies of the set $(a_1,...,a_k)$, with each $a_i=0$ or $1$. The case $k=1$ is some math competition question (I think, but can't remember the exact reference). Does anyone know of some references? Thanks. 

Thank you all! I wish I could accept all the answers, they are very helpful!

REPLY [6 votes]: There was some discussion of the case n=3 in sci.math around 1994. There is a card game called Set with an 81 card deck so that each card is naturally a point in $(\mathbb Z/3)^4$. Several cards are dealt out, and your task is to identify triples of cards called Sets which form a line, or equivalently, which add up to the 0 vector. A natural question is how many points you can deal out without the existence of a line. It's not too hard to construct 9 distinct points in affine 3-space, or 20 distinct points in affine 4-space over $\mathbb Z/3$ so that there is no line contained in the points, and these are the maximums. These correspond to $N=19$ for $(n,k) = (3,3)$ and $N=41$ for $(n,k) = (3,4)$, as in the reference Ricky Liu linked, by repeating each point twice.
The maximal configurations are highly symmetric. The 9 points in dimension 3 correspond to a nondegenerate conic, which is unique up to symmetry. The 20 points in dimension 4 actually correspond to a nondegenerate conic containing 10 points in projective 3-space viewed as lines passing through the origin in affine 4-space.
For example, there are 9 points in dimension 3 satisfying $z=x^2 + y^2:$
$\{(0,0,0),(\pm1,0,1),(0,\pm1,1),(\pm1,\pm1,-1)\}$
and this set contains no lines.