cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A328568 #22 Jan 25 2024 07:55:02
%S A328568 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,
%T A328568 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,
%U A328568 19,0,2,4,8,10,16,18,20,1,5,9,17,21,0,4,6,8,16,20,22
%N 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).
%C A328568 For any n >= 0, the n-th row:
%C A328568 - has sum A328565(n),
%C A328568 - has apparently length A002487(n+1),
%C A328568 - has first element A135481(n),
%C A328568 - has last element n.
%H A328568 Rémy Sigrist, <a href="/A328568/b328568.txt">Table of n, a(n) for n = 0..9851</a>
%e A328568 Table begins:
%e A328568     0;
%e A328568     1;
%e A328568     0, 2;
%e A328568     3;
%e A328568     0, 2, 4;
%e A328568     1, 5;
%e A328568     0, 4, 6;
%e A328568     7;
%e A328568     0, 4, 6, 8;
%e A328568     1, 5, 9;
%e A328568     0, 2, 4, 8, 10;
%e A328568     3, 11;
%e A328568     0, 2, 8, 10, 12;
%e A328568     1, 9, 13;
%e A328568     0, 8, 12, 14;
%e A328568     ...
%p A328568 T:= n-> sort([{seq(Bits[Xor](n-k, k), k=0..n)}[]])[]:
%p A328568 seq(T(n), n=0..30);  # _Alois P. Heinz_, Oct 20 2019
%t A328568 Union /@ Table[BitXor[n - k, k], {n, 0, 22}, {k, 0, n}] // Flatten (* _George Beck_, Jun 09 2023 *)
%o A328568 (PARI) row(n) = Set(apply(k -> bitxor(n-k, k), [0..n]))
%Y A328568 Cf. A326819 (AND variant), A326820 (OR variant).
%Y A328568 Cf. A002487, A135481, A328565.
%K A328568 nonn,tabf,look,base
%O A328568 0,4
%A A328568 _Rémy Sigrist_, Oct 20 2019