General formula for nth element of the sequence 0, 1, 0, 1, ... The sequence is $f = 0, 1, 0, 1, \ldots$
I want to find a general formula for the $n$th element. The sequence starts at $n = 0$ (the $0$ here is not the first element $0$ but rather denotes the $0$th position).
One easy and obvious solution is: $n$th $f = n \bmod 2$. This works because even positions have $0$ and odd positions have $1$.
However, this question is part of a homework and modulus has not been discussed (or part of the syllabus or even a prerequisite). And so I am hesitant to use it.
Is there another way to solve this problem using only basic arithmetic operations (one that a beginning high schooler knows of)?

Is the sequence just an eternal alternation of 0 and 1? Then all you need to do is put in a couple dozen alternations in the OEIS, find https://oeis.org/A000035, then just sit back and read until you find a formula you like.

Least significant bit of $n$, lsb(n).

This works even if $n$ is negative, but it gets a little bit into computer science.

Also decimal expansion of $\frac{1}{99}$.

Yeah... if you ignore the integer 0 in 0.01010101010101010101010101010101...

Also the binary expansion of $\frac{1}{3}$.

Though I'm not sure this applies under the IEEE 754 floating point format specification.
There's a whole bunch more to look at. I personally like the recurrence relation $a(n) = 1 - a(n - 1)$, which is of course initialized with $a(0) = 0$.
