"Divide by 2" is far from optimal For practical and easy use I'd recommend Tokuda: divide by 2.25 (or multiply - depending where you start) see https://en.wikipedia.org/wiki/Shellsort#Gap_sequences