Let $n\geq 3$ be an integer and consider the group $\mathbb{Z}_n\times\mathbb{Z}_n$ under addition.
Question: Does there always exist a choice of $n$ elements $$ (a_1,b_1),\dots,(a_n,b_n)\in\mathbb{Z}_n\times\mathbb{Z}_n $$ in the group such that the set of differences $$ S = \bigl\{(a_i,b_i) - (a_j,b_j)\, \big|\, i,j\in\{1,\dots,n\} \text{ and }i\neq j\bigr\} $$ contains $n(n-1)$ distinct elements?
I've been able to find solutions for $n$ up to 7, but not enough of a pattern emerges for me to be able to figure out how to generalize it to all $n\geq3$.
In the case when $n=3$, we may choose the elements $(0,0),(1,0),(0,1)\in\mathbb{Z}_3\times\mathbb{Z}_3$. To see that this choice has the desired property, construct a table containing $(a_i,b_i) - (a_j,b_j)$ in the $ij$ entry for each pair of indices $i,j\in\{1,\dots,n\}$ with $i\neq j$: \begin{array}{rr|ccc} &&(a_i,b_i)\\ & +& (0,0) & (1,0) & (0,1)\\ \hline -(a_j,b_j)&(0,0) & \cdot & (1,0) & (0,1)\\ &(2,0) & (2,0) & \cdot & (2,1)\\ &(0,2) & (0,2) & (1,2) & \cdot \end{array} It is clear that the off-diagonal entries of this table are all different, and thus $\lvert S\rvert = 6 = 3(3-1)$.
In the case when $n=4$, we may choose the elements $(0,0),(1,0),(0,1),(3,3)\in\mathbb{Z}_4\times\mathbb{Z}_4$. A similar table may be constructed to show that this choice also has the desired property: \begin{array}{rr|cccc} &&(a_i,b_i)\\ & +& (0,0) & (1,0) & (0,1) & (3,3)\\ \hline -(a_j,b_j)&(0,0) & \cdot & (1,0) & (0,1) & (3,3)\\ &(3,0) & (3,0) & \cdot & (3,1) & (2,3)\\ &(0,3) & (0,3) & (1,3) & \cdot & (3,2)\\ &(1,1) & (1,1) & (2,1) & (1,2) & \cdot \end{array} The off-diagonal entries are all unique.
For $n=5$, we can choose $(0,0), (2,1), (1,2), (0,2), (2,0)\in\mathbb{Z}_5\times\mathbb{Z}_5$.
For $n=6$, we can choose $(0,0), (2,1), (1,2), (0,2), (2,0), (5,5)\in\mathbb{Z}_6\times\mathbb{Z}_6$.
For $n=7$, we can choose $(0,0), (2,1), (1,2), (0,5), (5,0), (1,5),(5,1)\in\mathbb{Z}_7\times\mathbb{Z}_7$.
We shall call a natural number $n$ good provided a group $\Bbb Z_n\times\Bbb Z_n$ has a Sidon set of size $n$. In this joriki proved that each odd prime is good.
We claim that each odd square-free number is good. To show this it suffices to show that a product of any two coprime good numbers $n$ and $m$ is good. It is easy to see that an element $(1,1)$ of a product $\Bbb Z_m\times Z_n$ has order $mn$, so $\Bbb Z_m\times Z_n$ is isomorphic to a cyclic group of order $mn$, that is to $\Bbb Z_{mn}$. It remains to remark that if $A_m$ is a Sidon set in $\Bbb Z_m\times \Bbb Z_m$ and $A_n$ is a Sidon set in $\Bbb Z_n\times\Bbb Z_n$ then $A_m\times A_n$ is a Sidon set in $(\Bbb Z_m\times \Bbb Z_m)\times (\Bbb Z_n\times \Bbb Z_n)\simeq \Bbb Z_{mn}\times\Bbb Z_{mn}$.
Now we claim that the group $G=\Bbb Z_8\times \Bbb Z_8$ has no Sidon set $A$ of size eight. Indeed, suppose to the contrary that such a set $A$ exists. Let $H$ be a subgroup of $G$ consisting of elements with both coordinates even. We claim that there exist elements $a$ and $b$ of $A$ such that $a-b\in H+(1,1)$. Indeed, otherwise $A$ is contained in two cosets of $G/H$, and then $A-A$ is contained in three cosets of $G/H$, which follows that $57=|A-A|\le 48$, a contradiction. Put $A’=A-a$. Then $A$ contains an element $b-a=(c_1,c_2)$ with both coordinates odd. There exists natural odd numbers $d_1$ and $d_2$ such that both $d_1c_1$ and $d_2c_2$ equal $1$ modulo $8$. Then a map of $\Bbb Z_8\times \Bbb Z_8$, $(x_1,x_2)\mapsto (d_1x_1,d_2x_2)$ is an isomorphism of $G$, which maps the set $A’$ into a Sidon set $A’’$ containing $(0,0)$ and $(1,1)$. Let $G_2$ be a subgroup of $G$ consisting of elements of order two, that is $G_2=\{(0,0), (0,4), (4,0), (4,4)\}$. Then $x=-x$ for each $x\in G_2$. There are no distinct elements $a,b\in A’’$ such that $a-b\in G_2$, because otherwise $b-a=-(a-b)=a-b$, which contradicts that $A’’$ is a Sidon set. Therefore each of sixteen cosets of $G/G_2$ contains at most one element of $A’’$, and the elements of cosets $(0,0)+G_2$ and $(1,1)+G_2$ are already fixed. So it remains to check all choices of six among fourteen remaining cosests containing elements of $A’’$ and for each chosen coset four possibilities to choose an element for $A’’$. More subtle arguments can decrease a number of cases to check even more, but already these cases were checked by a short Pascal program below at my old computer in less than a half a minute. It found a Sidon set $\{(1,1), (2,0), (2,1),(0,5),(5,0),(4,2),(4,7)\}$ of size seven but no Sidon set of size eight.