Calculates the distance between hexagons numbered in a spiral