This is an alternating subtraction series with repetition. There are two different patterns here. In the first, a number repeats itself; then 3 is added to that number to arrive at the next number, which also repeats. This gives the series 17, 17, 20, 20, 23, and so on. Every third number follows a second pattern, in which 3 is subtracted from each number to arrive at the next: 34, 31, 28.
Two patterns alternate here, with every third number following the alternate pattern. In the main series, beginning with 4, 3 is added to each number to arrive at the next. In the alternating series, beginning with 26, 6 is subtracted from each number to arrive at the next.