Find The Last Three Digits

Number Theory Level 5

A sequence of positive integers is defined as follows: $a_1=2013, a_{n+1}=3^{a_n}-2^{a_n}\text{ for } n \geq 1.$ What are the last three digits of $$a_{2014}?$$

×