Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have infinite binary sequences of type $$\langle g_n \rangle_{j=4}=\{0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,...\} \,;\, n\to\infty$$ where $j$ indicates the length of a period that starts/ends with a $1$; otherwise zero.

We know that for $j=4$ we could use following complex expression to express the sequence: $$(1/4)(1^n+i^n+(-1)^n+(-i)^n)$$ However, does anybody may help how we could parametrize and find such an expression for all integers $j>2$

Many thanks

share|cite|improve this question
The Answer is iderntical to "[Fourier expression for infinite recurring binary sequence][1]" [1]:… – al-Hwarizmi Jun 3 '13 at 8:15
up vote 1 down vote accepted

The formula $\frac{1}{4}(1^n+i^n+(-1)^n+(-i)^n)$ is derived from the following general Fourier series equations:

$g[n]_{j} = \sum \limits_{k=<j>}^{} a_{k} \cdot \exp\{ ik\frac{2\pi}{j}n\}$

$a_k = \frac{1}{j}\sum \limits_{n=<j>}^{} g[n] \cdot \exp\{-ik\frac{2\pi}{j}n\}$

NOTE: As an electrical engineer, I don't see why $j$ should be used as the period of the signal. We use $j$ instead of $i$ to denote the imaginary number.

Though it may not seem so, there is an intuitive pattern hidden within the expression $\frac{1}{4}(1^n+i^n+(-1)^n+(-i)^n)$. There is $\frac{1}{j}$ in the front of the sequence and $j$ expressions which represents $j$ evenly spaced segments of the unit circle. This might make more sense with an example:

For $j = 3$,

$g[n]_{3} = \frac{1}{3}(1^n+(-\frac{1}{2}+\frac{\sqrt{3}}{2}i)^n +(-\frac{1}{2}-\frac{\sqrt{3}}{2}i)^n)$ (corresponds to $0, 2\pi/3,$ and $4\pi/3$ on the unit circle)

Hope this is helpful.

share|cite|improve this answer
excellent. thanks. that helps. Do you have any idea where we can find this? Do you know a field in electrical engineering where such class of periodic sequences being used as well? – al-Hwarizmi Apr 16 '13 at 12:34
if anybody else interested: – al-Hwarizmi Apr 16 '13 at 15:26

If $\zeta\in\mathbb C$ is a primitive $j$th root of unity, then $$\frac1j\sum_{k=0}^{j-1}\zeta^{nk}=\begin{cases}1&\text{if } j|n,\\0&\text{otherwise}.\end{cases}$$ This works for all $j\ge1$ and includes your formula as a special case (with $\zeta=i$ or $\zeta=-i$, as you like).

share|cite|improve this answer
Thanks. Indeed when we apply this Sum for $n=j$ we get a full sequence of $1$s and otherwise a full sequence of $0$s. But still a question to us how we get a period of $1$ and $0$? Probably we did not understand well. May you help? – al-Hwarizmi Apr 15 '13 at 18:38
De facto this formula does not produce the above type of sequences! – al-Hwarizmi Apr 15 '13 at 19:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.