How can one prove that the sequence of $n$ 1's followed by $n$ 0's is aperiodic Disclaimer: This is not a homework task. The question arises from genuine curiosity.
I'm trying to prove that the sequence of $n$ 1's followed by $n$ 0's is aperiodic.
Apparently, the corresponding OEIS entry is A118175.
The first few terms are as follows:
$1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, ...$
From the OEIS page, I've chosen what seems to be the simplest expression (not claiming that it's indeed the simplest one, with respect to this particuar proof) for the sequence, namely:
$a(n) = 1 - ceiling(sqrt(n+1)) + round(sqrt(n+1))$
My approach is proof by contradiction.
Assume that the sequence is periodic and, hence, a period $k$ for $k &gt; 0$ exists.
This implies that:
$a(n) = a(n + k)$
The $1$s cancel out, and what remains is:
$round(sqrt(n+1)) - ceiling(sqrt(n+1)) = round(sqrt(n+k+1)) - ceiling(sqrt(n+k+1))$
For $k &lt; 5$ this causes problems, however, because the results of each pair of LHS-RHS terms may be equal.
This is as far as I've been able to get.
Update: Perhaps the fact that all $0 &lt; k &lt; 5$ cases could be exhaustively proven by induction, as irrelevant, be utilized.
For example, as per the periodicity assumption, we have $a(0) = a(k) = 1$ and $a(1) = a(k + 1) = 0$. If $k = 1$, however, a contradiction emerges, because it implies that $a(0) = a(k) = a(1) = 1$.
Then, for $k \ge 5$, it'll follow as per the properties of the $ceiling$, $round$ and $sqrt$ functions.
It is a mistake to use the ceiling, round, and sqrt functions here -- they just complicate a simple situation. All you need is two facts:

for any $k$, the sequence contains $k$ consecutive $1$'s;
the sequence contains an infinite number of $0$'s.

These two facts taken together ensure that the sequence is not periodic with period $k$.
Notice that the sequence of $n$ ones starts at the position
$$2(1+2+\cdots + (n-1))+1 = (n-1)n+1$$
and the sequence of $n$ zeroes starts $n$ positions further, i.e. $(n-1)n+1+n$.
Let $n \in \Bbb{N}$ be arbitrary. If $a$ were periodic with period $n$ we would have $a(k+n) = a(k)$ for all $k \in \Bbb{N}$. However, the above remark implies that for $k = n(n-1)+1$ holds
$$a(n(n-1)+1) = 1, \quad a(n(n-1)+1+n) = 0$$
so $a$ is not periodic with period $n$.