Tag Info

New answers tagged

3

A revision of my earlier, hurried function: fn[_, 0] := {} fn[s_:1, n_] := Join[ Rest @ Array[Thread @ {#, # + {n, 1}, # + n + 1} &, n, s, Join], fn[s + n + 1, n - 1] ] Test: fn[4] {{1, 2, 6}, {2, 6, 7}, {2, 3, 7}, {3, 7, 8}, {3, 4, 8}, {4, 8, 9}, {4, 5, 9}, {6, 7, 10}, {7, 10, 11}, {7, 8, 11}, {8, 11, 12}, {8, 9, 12}, {10, 11, 13}, ...



Top 50 recent answers are included