Answer:
8
Step-by-step explanation:
In his 5th year, he took 3 times as many exams as the first year. So the number of exams taken in the 5th year must be a multiple of 3.
If a₁ = 1, then a₅ = 3. However, this isn't possible because we need 4 integers between them, and a sum of 31.
If a₁ = 2, then a₅ = 6. Same problem as before.
If a₁ = 3, then a₅ = 9. This is a possible solution.
If a₁ = 4, then a₅ = 12. If we assume a₂ = 5, a₃ = 6, and a₄ = 7, then the sum is 34, so this is not a possible solution.
Therefore, Alex took 3 exams in his first year and 9 exams in his fifth year. So he took 19 exams total in his second, third, and fourth years.
3 < a₂ < a₃ < a₄ < 9
If a₂ = 4, then a₃ = 7 and a₄ = 8.
If a₂ = 5, then a₃ = 6 and a₄ = 8.
If a₂ = 6, then there's no solution.
So Alex must have taken 8 exams in his fourth year.