Up and down.
Left is the current, right (in parentheses) is the "goal"
Pattern:
0 (0)
1 (-1)
0 (-1)
-1 (1)
0 (1)
1 (1)
2 (-2)
1 (-2)
...
If the goal is negative, it switches to positive as soon as the current number reaches the goal. If the goal is positive, it switches to negative (with its absolute value increased by 1) when the current number exceeds the goal. The new goal will be set to the opposite of the current number.
Regular base 10 thread. @b10 macro works even when you have to count down.