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.

A326820 Irregular triangle read by rows; for n >= 0, the n-th row corresponds to the elements of the set {(n-k) OR k, k = 0..n}, in ascending order (where OR denotes the bitwise OR operator).

This page as a plain text file.
%I A326820 #12 Oct 20 2019 15:09:57
%S A326820 0,1,1,2,3,2,3,4,3,5,3,5,6,7,4,6,7,8,5,7,9,5,6,7,9,10,7,11,6,7,10,11,
%T A326820 12,7,11,13,7,11,13,14,15,8,12,14,15,16,9,13,15,17,9,10,13,14,15,17,
%U A326820 18,11,15,19,10,11,12,14,15,18,19,20,11,13,15,19,21
%N A326820 Irregular triangle read by rows; for n >= 0, the n-th row corresponds to the elements of the set {(n-k) OR k, k = 0..n}, in ascending order (where OR denotes the bitwise OR operator).
%C A326820 For any n >= 0, the n-th row:
%C A326820 - has sum A328566(n),
%C A326820 - has apparently length A002487(n+1),
%C A326820 - has last element n.
%H A326820 Rémy Sigrist, <a href="/A326820/b326820.txt">Table of n, a(n) for n = 0..9851</a> (rows n = 0..512)
%e A326820 Table begins:
%e A326820     0;
%e A326820     1;
%e A326820     1, 2;
%e A326820     3;
%e A326820     2, 3, 4;
%e A326820     3, 5;
%e A326820     3, 5, 6;
%e A326820     7;
%e A326820     4, 6, 7, 8;
%e A326820     5, 7, 9;
%e A326820     5, 6, 7, 9, 10;
%e A326820     7, 11;
%e A326820     6, 7, 10, 11, 12;
%e A326820     7, 11, 13;
%e A326820     7, 11, 13, 14;
%e A326820     ...
%p A326820 T:= n-> sort([{seq(Bits[Or](n-k, k), k=0..n)}[]])[]:
%p A326820 seq(T(n), n=0..30);  # _Alois P. Heinz_, Oct 20 2019
%o A326820 (PARI) row(n) = Set(apply(k -> bitor(n-k, k), [0..n]))
%Y A326820 Cf. A326819 (AND variant), A328568 (XOR variant).
%Y A326820 Cf. A002487, A328566.
%K A326820 nonn,tabf,look,base
%O A326820 0,4
%A A326820 _Rémy Sigrist_, Oct 20 2019