John counts up from 1 to 13, and then immediately counts down again to 1, and then back up to 13, and so on, alternately counting up and down: What is the 5000th integer in his list?
Variation 1:
\([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,][13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] \ldots\)
\(\text{position $= n \pmod{26} \qquad$ position $0 =$ position $26$} \\ \text{$5000th \pmod {26} =$ position $8$}\)
Variation 2:
\([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,][ 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2 ] \ldots\)
\(\text{position $= n \pmod{24} \qquad$ position $0 =$ position $24$} \\ \text{$5000th \pmod {24} =$ position $8$}\)
