Let a1,a2,… be a sequence for which a1=5, a2=2, and an=an−2an−1 for each positive integer n≥3. What is a2024?
51
21
52
25
2