Calculate shell sort gaps and iterate over them in reverse.