If the town has 20,000 now, then, it will have 1.05(20,000) at the end of year 1
1.05{ (1.05(20,000) } at the end of year 2 etc
So, the formula would be 20,000(1.05)n where n = the number of years.
So, at the end of the 4th year, this would be (20,000)(1.05)4 = 1.2155(20,000) = 24,310