# A Modular Exponential Sequence

A sequence $$a_1, a_2, a_3, ...$$ is defined as

$$a_n = 2^n \pmod {100}$$.

It starts off as $$2, 4, 8, 16, ...$$. Find the last term before the sequence repeats.

This problem is based off Finn Hulse's problem, A Modular Recursion Sequence.

×