Table[Table[3 w (n - 1), {w, 0, Floor[(n - 2)/2]}], {n, 2, 20}]