OFFSET
0,5
COMMENTS
Row n is a permutation of {0, 1, ..., A000225(n)}.
LINKS
Alois P. Heinz, Rows n = 0..15, flattened
EXAMPLE
Triangle T(n,k) begins:
0;
0, 1;
0, 3, 1, 2;
0, 7, 5, 2, 6, 1, 3, 4;
0, 15, 13, 10, 6, 1, 11, 4, 12, 3, 9, 14, 2, 5, 7, 8;
...
MAPLE
T:= n-> (p-> seq(modp(-k*(k+1)/2, p), k=0..p-1))(2^n):
seq(T(n), n=0..6);
# second Maple program:
T:= proc(n, k) option remember;
`if`(k=0, 0, T(n, k-1)-k mod 2^n)
end:
seq(seq(T(n, k), k=0..2^n-1), n=0..6);
MATHEMATICA
T[n_, k_] := T[n, k] = If[k == 0, 0, Mod[T[n, k - 1] - k, 2^n]];
Table[Table[T[n, k], {k, 0, 2^n - 1}], {n, 0, 6}] // Flatten (* Jean-François Alcover, Mar 28 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
AUTHOR
Alois P. Heinz, Jan 09 2020
STATUS
approved