Two series alternate here, with every third number following a different pattern. In the main series, 3 is added to each number to arrive at the next. In the alternating series, 5 is subtracted from each number to arrive at the next.
This is a simple subtraction with repetition series. It begins with 20, which is repeated, then 3 is subtracted, resulting in 17, which is repeated, and so on.
In this alternating repetition series, the random number 21 is interpolated every other number into an otherwise simple addition series that increases by 2, beginning with the number 9.