Let a_{n} be the sequence defined by a_{1} = 3, a_{n+1} = 3^{k}, where k = a_{n}. Let b_{n} be the remainder when a_{n} is divided by 100. Which values b_{n} occur for infinitely many n?

**Solution**

Answer: 87.

We find fairly quickly that 3^{20} = 1 mod 100. So a_{3} = 3^{27} = 3^{7} = 87 mod 100. Hence a_{4} = 3^{87} = 3^{7} = 87 mod 100. So b_{n} = 87 for n > 2.

© John Scholes

jscholes@kalva.demon.co.uk

7 Jan 2001