TITLE: Find a composite number $n$ satisfies $(2+3I)^n≡2-3I\pmod{n}$
QUESTION [13 upvotes]: As we know if $p$ is an odd prime number then $$(a+bI)^p\equiv a+(-1)^\frac{p-1}2bI\pmod{p},$$
where $I=\sqrt{-1}$. However, is there any composite number $n$ that satisfies $$(2+3I)^n≡2-3I\pmod{n}\quad ?$$
I know $n$ is a solution to the equation $13^{n-1}\equiv 1\pmod{n}$, but cannot go on.
Many thanks in advance.

REPLY [3 votes]: I have managed to come up with anything conclusive, but here are some notes that hopefully can be inspiring.
1. I doubt this is well known as true, since if true it gives a fast definitive primality check for numbers of the form $4k+3$. Then for example the probable prime records wouldn't have to include any such numbers in the list for which "nobody knows how to prove or disprove ... primality." (I have already checked two of them.)
2. If $p\equiv 1 \pmod{4}$ then $(2+3i)^{p-1}\equiv 1 \pmod {p}$. If there is any $k<p-1$ such that $(2+3i)^k\equiv2-3i\pmod{p}$ then 
$$
(2+3i)^{k+1}\equiv 13\pmod{p}
$$
and by considering the norms
$$
13^k\equiv 13 \pmod{p} \\
(2+3i)^{(k+1)(k-1)}\equiv 1 \pmod{p}
$$
I'd like to generally rule this case out, but I cannot, since it holds for $k=19,p=61$.
If there's no such $k$, then $p$ cannot divide $n$, so it seems prudent to concentrate on numbers only divisible by primes that are 3 modulo 4.
3. If $p\equiv 3\pmod{4}$ then $(2+3i)^{p^2-1}\equiv 1 \pmod{p}$ and we might find a solution if $n\equiv p \pmod{p^2-1}$. In particular there will be a solution with $n=p^3$ if $13^{p-1}\equiv 1 \pmod{p^3}$. I wasn't able to find any such prime, but suspect it can't easily be ruled out e.g. with Hensel's lemma, since there are solutions to $13^{p-1}\equiv 1 \pmod{p^2}$ (e.g. $p=863$).
4. Generalizing from 3, it would be sufficient to find $n$ a product of primes that are 3 mod 4 such that for each prime $p$ dividing $n$
$$
\frac{n}{p} \equiv 1 \pmod{p^2-1}
$$
If $n$ is a product of distinct primes then they all must satisfy $p^3<n$ and hence there must be at least 4.