Let $T_n$ be the product of numbers less than $[\frac{n}{2}]$ and co-prime to $n$. Find $n \geq 3$ odd such that :
$$T_n^2 \equiv (-1)^{\frac {\varphi (n)}{2}} \pmod n$$
Here is all i did:
It is easy to see that when $\gcd(a,n) = 1$, then $\gcd(n-a,n) =1$
So we only have to find $n$ such that :
$$a_1a_2a_3\cdots a_{\varphi(n)} \equiv 1 \pmod n $$
it is easy to see that $n$ cannot be prime according to Wilson's theorem: $(p-1)! \equiv -1 \pmod p$
But at this point I have no idea at all, I hope to get help from everyone. Thank you very much everyone!