In a recent [article](http://arxiv.org/pdf/1602.02705.pdf), Emmanuel Lecouturier proves a generalization of the following surprising result: for a Mersenne prime $N = 2^p - 1 \ge 31$, the element 
$$ S = \prod\_{k=1}^{\frac{N-1}2} k^k $$ 
is a $p$-th power modulo $N$, and observed that he did not know an elementary proof. Neither do I.


Numerical experiments suggest that $s\_p$ is actually a $6p$-th power
modulo $N$. I can't even see why it is a quadratic residue, i.e., why
the following result (not proved in the article cited) should hold:
$$ T = \prod\_{k=1}^{\frac{N+1}4} (2k-1) $$ 
is a square mod N.


For arbitrary primes $N \equiv 3 \bmod 4$, the following seems to hold: 
$$ \Big(\frac{T}{N} \Big) = \begin{cases}
 - (-1)^{(h-1)/2} & \text{ if } N \equiv 3 \bmod 16, \\
 - 1 & \text{ if } N \equiv 7 \bmod 16, \\
 (-1)^{(h-1)/2} & \text{ if } N \equiv 11 \bmod 16, \\
 + 1 & \text{ if } N \equiv 15 \bmod 16, 
\end{cases} $$
where $h$ is the class number of the complex quadratic number field with discriminant $-N$. This suggests a possible proof using L-functions (i.e. using methods in (Congruences for L-functions, Urbanowicz, K.S. Williams) and explains the difficulty of finding an elementary proof. 


My questions:


1. Is this congruence for $(T/N)$ known?
2. How would I start attacking this result using known results on L-functions?



Elementary congruences and L-functions
**1.** First we show that
$$\left(\frac{T}{N}\right) = \begin{cases}
 - (-1)^{(h-1)/2} & \text{ if } N \equiv 3 \bmod 16, \\
 (-1)^{(h-1)/2} & \text{ if } N \equiv 11 \bmod 16. \\
\end{cases}$$
Consider the sets
$$A\_0:=\{1,2,\dots,\tfrac{N-1}{2}\},\quad A\_1:=\{1,3,\dots,\tfrac{N-1}{2}\},\quad A\_2:=\{2,4,\dots,\tfrac{N-3}{2}\},$$
$$ A\_3:=\{1,2,\dots,\tfrac{N-3}{4}\},\quad A\_4:=\{\tfrac{N+1}{4},\tfrac{N+5}{4},\dots,\tfrac{N-1}{2}\}.$$
Consider also the corresponding character sums
$$S\_i:=\sum\_{a\in A\_i}\left(\frac{a}{N}\right),\qquad i=0,1,2,3,4.$$
Modulo $N$, we have $2A\_3=A\_2$ and $-2A\_4=A\_1$. Therefore, $S\_3=-S\_2$ and $S\_4=S\_1$, and hence $S\_1-S\_2=S\_3+S\_4=S\_0$. But also $S\_1+S\_2=S\_0$, hence $S\_1=S\_0$ and $S\_2=0$. On the other hand, it is known that $S\_0=3h$, see e.g. Theorem 70 in Fröhlich-Taylor: Algebraic number theory. This means that $S\_1=3h$, i.e. the number of quadratic nonresidues in $A\_1$ equals
$$ n=\frac{N+1}{8}-\frac{3h}{2}=\frac{N+5}{8}-2h+\frac{h-1}{2}.$$
We conclude
$$ \left(\frac{T}{N}\right)=(-1)^n=(-1)^{(N+5)/8}(-1)^{(h-1)/2}. $$
This is the claimed formula (with Jeremy Rouse's correction).


**2.** Now we show that
$$\left(\frac{T}{N}\right) = \begin{cases}
 - 1 & \text{ if } N \equiv 7 \bmod 16, \\
 + 1 & \text{ if } N \equiv 15 \bmod 16.
\end{cases}$$
We proceed as before, but this time we get $S\_3=S\_2$ and $S\_4=-S\_1$, so that $S\_2-S\_1=S\_3+S\_4=S\_0$. Together with $S\_2+S\_1=S\_0$, this yields $S\_1=0$ and $S\_2=S\_0$. Hence the formula for $n$ simplifies to $n=(N+1)/8$, and we conclude
$$\left(\frac{T}{N}\right)=(-1)^n=(-1)^{(N+1)/8}.$$


