Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

Prove or refute: $a[n]=\lfloor(n+1)\pi\rfloor-\lfloor n\pi\rfloor$ is periodic.

This sequence looks periodic, starting with ${3, 3, 3, 3, 3, 3, 4, \,3, 3, 3, 3, 3, 3, 4,\, 3, 3, 3, 3, 3, 3, 4,\dots}$. After a while, there is a sequence of seven threes: $\dots, 3, 3, 3, 3, 3, 3, 3, 4,\dots$ which disproves the period being $7$.

However, I believe it's not periodic, not even for larger periods. How could I prove it?

share|cite|improve this question
You could try to prove that $[(n+1)x]-[nx]$ is periodic if and only if $x$ is rational. – Gerry Myerson Nov 4 '12 at 23:00
up vote 4 down vote accepted

Suppose that $a[n]$ is periodic with period $q$. Observe that the $\sum_{m=0}^{n-1} a[m] = \lfloor n\pi \rfloor$, as the sum telescopes. Let $p=\lfloor q\pi \rfloor=\sum_{m=0}^{q-1} a[m]$, so $p$ is an integer. Then for all positive integers $k$,

$\lfloor kq\pi \rfloor=\sum_{m=0}^{kq-1} a[m]=\sum_{i=0}^{k-1} \sum_{j=0}^{q-1} a[qi+j]=\sum_{i=0}^{k-1} \sum_{j=0}^{q-1} a[j]=k \sum_{j=0}^{q-1} a[j]=kp$.

(The third term is obtained by dividing each $m$ in the second term by $q$ with quotient $i$ and remainder $j$). By the definition of $\lfloor x \rfloor$, we have that for all positive integers $k$,

$kp\le kq\pi<kp+1$,


$\frac{p}{q}\le \pi<\frac{p}{q}+\frac{1}{kq}$.

Now for any real number $\varepsilon>0$, if we let $M=\lfloor \frac{1}{q\varepsilon} \rfloor+1$, then


so $\frac{1}{Mq}<\varepsilon$. Thus for all real numbers $\varepsilon>0$,


so $\pi=\frac{p}{q}$. Since $\pi$ is irrational, this is a contradiction, so $a[n]$ must not be periodic.

If you're interested, this argument also proves that $a[n]$ is not periodic if $\pi$ is replace with any irrational number, and it is easy to prove that $a[n]$ is periodic if $\pi$ is replaced with a rational number.

share|cite|improve this answer

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.