Question: For every positive integer $M \geq 3$, there exists an $M \times M$ magic square all $M^2$ terms of which are prime.
I don't know how to do it. All I feel is that the Green-Tao theorem can help as it shows the existence of infinitely many primes in AP and for every $n \in \mathbb{N}$. Also there's a property of $M \times M$ magic square that a square exists using the numbers $\{1,2, \cdots , M^2\}$
But the thing is that I can't find any relationship between these. All I could think of is that if a magic square can be created with some $\{0, 2d, \cdots, (n-1)d\}$, for all $d\in \mathbb{N}$, then we could have chosen some $a$ for which terms of the sequence $\{id\}_{0 \leq i \leq (n-1)}$ would become $\{a+id\}$ for the same $i$. But it's quite of no progress.
Can someone help me out? I don't know how to prove it. Please provide with rigor.