Let $n$ be a positive integer.
The $n$ by $n$ Fourier matrix may be defined as follows:


$$
F^{\*} = (1/\sqrt{n}) (w^{(i-1)(j-1)})
$$


where 


$$
w = e^{2 i \pi /n}
$$


is the complex $n$-th root of unity with smaller positive argument
and $\*$ means transpose -conjugate.


It is well known that $F$ is diagonalizable with eigenvalues $1,-1,i,-i$


where $i^2 =-1.$


It is also known that $F$ has real eigenvectors:


COMMENT: 
(I was unable to got this paper)


McClellan, James H.; Parks, Thomas W.
Eigenvalue and eigenvector decomposition of the discrete Fourier transform.
IEEE Trans. Audio Electroacoust. AU-20 (1972), no. 1, 66--74.
 END of COMMENT


QUESTION:


There is some simple manner to get just one of these
real eigenvectors.


For example how to get a real vector with an odd number 
$n=2k+1$ of coordinates and such that


$$
F(x) =x.
$$



Eigenvectors of the Fourier matrix
This has a little number-theoretic content, having to do with real-valued *characters* modulo $n=2k+1$. For example, for $n=p$ an odd prime number, there are exactly two such functions (up to scalar multiples), the function that is $1$ for non-zero-mod-$p$ inputs, and the quadratic character $\chi$ mod $p$, which is $\chi(0)=0$, $\chi(j)=+1$ for $j$ a square modulo $p$, and $\chi(j)=-1$ for $j$ a non-square mod $p$.


For odd $n=p\_1...p\_k$ a product of distinct primes, products of the trivial characters and/or the quadratic characters modulo the various $p\_i$ are the $2^k$ real-valued eigenvectors for the Fourier matrix. 


Modulo higher powers $n=p^m$ of a prime, the non-trivial character $\chi(j)$ still just depends on $j$ mod $p$ and whether it's a square or not, or is $0$, and these can be combined multiplicatively as in the previous example.


