Something like for(size_t i = 0; i &lt;= n; i += k) { work_with(n - i); }?<p>This sort of loop always comes up in these discussions, and I was never convinced that signed integers were worth it for that alone.