You're right - and the pattern holds true. A positive integer can either be exactly divisible by three, have a remainder of 1, or a remainder of 2. Your idea is probably one of the simplest.
In reply to Re^2: breaking an array into nearly equal parts
by spiritway
in thread breaking an array into nearly equal parts
by santonegro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |