|
|
A328568
|
|
Irregular triangle read by rows; for n >= 0, the n-th row corresponds to the elements of the set {(n-k) XOR k, k = 0..n}, in ascending order (where XOR denotes the bitwise XOR operator).
|
|
4
|
|
|
0, 1, 0, 2, 3, 0, 2, 4, 1, 5, 0, 4, 6, 7, 0, 4, 6, 8, 1, 5, 9, 0, 2, 4, 8, 10, 3, 11, 0, 2, 8, 10, 12, 1, 9, 13, 0, 8, 12, 14, 15, 0, 8, 12, 14, 16, 1, 9, 13, 17, 0, 2, 8, 10, 12, 16, 18, 3, 11, 19, 0, 2, 4, 8, 10, 16, 18, 20, 1, 5, 9, 17, 21, 0, 4, 6, 8, 16, 20, 22
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
For any n >= 0, the n-th row:
- has apparently length A002487(n+1),
- has last element n.
|
|
LINKS
|
|
|
EXAMPLE
|
Table begins:
0;
1;
0, 2;
3;
0, 2, 4;
1, 5;
0, 4, 6;
7;
0, 4, 6, 8;
1, 5, 9;
0, 2, 4, 8, 10;
3, 11;
0, 2, 8, 10, 12;
1, 9, 13;
0, 8, 12, 14;
...
|
|
MAPLE
|
T:= n-> sort([{seq(Bits[Xor](n-k, k), k=0..n)}[]])[]:
|
|
MATHEMATICA
|
Union /@ Table[BitXor[n - k, k], {n, 0, 22}, {k, 0, n}] // Flatten (* George Beck, Jun 09 2023 *)
|
|
PROG
|
(PARI) row(n) = Set(apply(k -> bitxor(n-k, k), [0..n]))
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|