Representing Integers as the Sum of Two Squares in the Ring $\Z_n$
  A classical theorem in number theory due to Euler states that a positive integer $z$ can be written as the sum of two squares if and only if all prime factors $q$ of $z$, with $q\equiv 3 \pmod{4}$, have even exponent in the prime factorization of $z$. One can consider a minor variation of this theorem by not allowing the use of zero as a summand in the representation of $z$ as the sum of two squares. Viewing each of these questions in $\Z_n$, the ring of integers modulo $n$, we give a characterization of all integers $n\ge 2$ such that every $z\in \Z_n$ can be written as the sum of two squares in $\Z_n$. 
Joshua Harrington, Lenny Jones and Alicia Lamarche
math.NT