login
A373072
Row sums of A346914.
2
0, 1, 0, 3, 2, 1, 0, 6, 5, 4, 3, 3, 2, 4, 1, 0, 10, 9, 8, 7, 6, 7, 6, 5, 8, 5, 4, 7, 3, 4, 3, 6, 2, 4, 1, 0, 15, 14, 13, 12, 11, 10, 12, 11, 10, 9, 13, 10, 9, 8, 12, 8, 7, 11, 6, 9, 8, 7, 11, 7, 6, 10, 5, 9, 8, 6, 5, 9, 4, 12, 11, 7, 3, 5, 4, 8, 3, 10, 6, 2, 9, 4, 1, 0
OFFSET
2,4
COMMENTS
See A346914 for more information.
MATHEMATICA
(* Uses Algorithm O from Knuth's TAOCP section 7.2.1.6 *)
olist[m_] := Block[{p = Range[m] - 1, j, d, k},
Reap[
While[True,
Sow[p];
If[p[[m]] > 0,
p[[m]] = p[[p[[m]]]],
k = m; While[k > 0 && p[[--k]] == 0];
If[k == 0, Break[]];
j = p[[k]]; d = k-- -j;
While[++k <= m, p[[k]] = If[p[[k-d]] == p[[j]], p[[j]], p[[k-d]] + d]]
]]][[2, 1]]];
Flatten[Total[Array[olist, 6], {3}]]
CROSSREFS
Cf. A346914.
Sequence in context: A194741 A194753 A359400 * A323908 A098825 A111460
KEYWORD
nonn
AUTHOR
Paolo Xausa, May 22 2024
STATUS
approved