<s>[INST] writing $pq$ as a sum of squares for primes $p,q$ Let $p$ and $q$  be distinct primes congruent to $1$ mod $4$. How many ways are there to write $pq$ as a sum of squares?
I know that any prime $p\equiv 1\pmod 4$ can be written uniquely as a sum of squares and $pq\equiv 1\pmod 4$ but $pq$ is not a prime so I'm stuck.
 [/INST] Since $n$ can be written as a sum of two squares in a number of ways that depends on how many ways there are to split $n$ as:
$$ n = z\bar{z} = (a-bi)(a+bi) $$
over $\mathbb{Z}[i]$, and the latter is an Euclidean domain hence a UFD, it follows that for any $n\in\mathbb{N}$:
$$\#\{(a,b)\in\mathbb{Z}^2:a^2+b^2= n\} = 4(\chi_4*1)(n) = 4\left(d_1(n)-d_3(n)\right)$$
where $d_1(n)$ is the number of divisors of $n$ of the form $4k+1$ and $d_1(n)$ is the number of divisors of $n$ of the form $4k+3$. If $p$ and $q$ are primes of the form $4k+1$, it follows that:
$$\#\{(a,b)\in\mathbb{N}^2:a^2+b^2=pq\} = \color{red}{4}.$$
These representations can be recovered from Lagrange's identity:
$$ (a^2+b^2)(c^2+d^2) = (ac-bd)^2+(ac+bd)^2.$$
For instance, let we assume $p=13$ and $q=41$. Then:
$$ p = 2^2 + 3^2,\qquad q=4^2+5^2$$
and $pq=13\cdot 41=533$ can be written as a sum of two squares in the following ways:
$$ pq = 2^2 + 23^2 = 7^2 + 22^2$$ 
since $2\cdot 4+3\cdot 5=23$ and $2\cdot 5+3\cdot 4=22$.
</s>