A sequence with near constant auto-correlation? Suppose
$$
x[n]=
\begin{cases}
x_n &, n \in P\\
0  &, n \notin P
\end{cases}
$$
where $P \subset \{0,1, \cdots,N-1 \}$ and $|P|=K$ and $x_n \geq 0$.
for this sequence these equations hold:
$$
\sum_{m=0}^{N-1} x[n]x[((n+m))_N] = A >0 , \qquad n= 1,\cdots,N-1
$$
i.e. it's circular auto-correlation is a positive constant
I think it is useful to note that this is resulted from these equalities :
$$
|X[1]|=||X[2]|=\cdots=|X[N-1]|
$$
where 
$$ 
X[k] = DFT\{x[n]\} 
$$
I want to find all possible $x_n$'s for a given set $P$.
If we assume $$
x[n]=
\begin{cases}
1 &, n \in P\\
0  &, n \notin P
\end{cases}
$$
Then it holds only when P is a cyclic difference set. 
But how about the general case? Is there any other conditions that this is possible?
 A: Mahdi, like one of your previous questions, here also, I have this observation, but probably you've already made it, that if $$x[n]\xrightarrow{DFT} X[k]$$ then, you have $$|X[k]|=\sqrt{A}\ \forall k\in \{1,\cdots\ N-1\}$$ and $$X[k]=\sum_{n\in P}x_n w^{kn}$$ where $w=\exp(-i2\pi/N)$
Another observation.
Let the DFT matrix be $$D=\begin{bmatrix}
1 & 1 & 1 & \cdots & 1\\
1 & w & w^2& \cdots & w^{N-1}\\
1 & w^2 & w^4& \cdots & w^{2(N-1)}\\
\vdots & \vdots & \vdots & \ddots & \vdots\\
1 & w^{N-1} & w^{2(N-1)} & \cdots & w^{(N-1)(N-1)}
\end{bmatrix}=\begin{bmatrix}\mathbf{v_0} & \mathbf{v_1} & \mathbf{v_2} & \cdots & \mathbf{v_{N-1}}\\ \end{bmatrix}$$ where
 $$\mathbf{v_n}=
[1 \quad w^n \quad  w^{2n} \quad  \cdots \quad  w^{(N-1)n}]^T$$ Let $\mathbf{x}$ be the vector with $x_n=0\ \forall n\notin P$. Then the constraints on the magnitudes of $X[k]$ can be rewritten as $$\mathbf{x}^T \mathbf{v_i}\mathbf{v_i}^{\dagger}\mathbf{x}=A$$ for $ i=\{0,1,2,\cdots,\ N-1\}$ (For the time being I'm assuming $\sum_{n\in P}x_n=\sqrt{A}$).
So, basically, we want the solution of this set of simultaneous non-linear equations. 
I think, this will be helpful in solving these equations.
