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.

A361644 Irregular triangle T(n, k), n >= 0, k = 1..max(1, 2^(A005811(n)-1)), read by rows; the n-th row lists the integers with the same binary length as n and whose partial sums of run lengths are included in those of n.

This page as a plain text file.
%I A361644 #17 Mar 21 2023 15:03:56
%S A361644 0,1,2,3,3,4,7,4,5,6,7,6,7,7,8,15,8,9,14,15,8,9,10,11,12,13,14,15,8,
%T A361644 11,12,15,12,15,12,13,14,15,14,15,15,16,31,16,17,30,31,16,17,18,19,28,
%U A361644 29,30,31,16,19,28,31,16,19,20,23,24,27,28,31
%N A361644 Irregular triangle T(n, k), n >= 0, k = 1..max(1, 2^(A005811(n)-1)), read by rows; the n-th row lists the integers with the same binary length as n and whose partial sums of run lengths are included in those of n.
%C A361644 In other words, the n-th row contains the numbers k with the same binary length as n and for any i >= 0, if the i-th bit and the (i+1)-th bit in k are different then they are also different in n (i = 0 corresponding to the least significant bit).
%C A361644 The value m appears 2^A092339(m) times in the triangle (see A361674).
%H A361644 Rémy Sigrist, <a href="/A361644/b361644.txt">Table of n, a(n) for n = 0..9841</a> (rows for n = 0..511 flattened)
%H A361644 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A361644 T(n, 1) = A342126(n).
%F A361644 T(n, max(1, 2^(A005811(n)-1))) = A003817(n).
%e A361644 Triangle begins (in decimal and in binary):
%e A361644   n   n-th row      bin(n)  n-th row in binary
%e A361644   --  ------------  ------  ------------------
%e A361644    0  0                  0  0
%e A361644    1  1                  1  1
%e A361644    2  2, 3              10  10, 11
%e A361644    3  3                 11  11
%e A361644    4  4, 7             100  100, 111
%e A361644    5  4, 5, 6, 7       101  100, 101, 110, 111
%e A361644    6  6, 7             110  110, 111
%e A361644    7  7                111  111
%e A361644    8  8, 15           1000  1000, 1111
%e A361644    9  8, 9, 14, 15    1001  1000, 1001, 1110, 1111
%e A361644 .
%e A361644 For n = 9:
%e A361644 - the binary expansion of 9 is "1001",
%e A361644 - the corresponding run lengths are 1, 2, 1,
%e A361644 - so the 9th row contains the values with the following run lengths:
%e A361644       1, 2, 1  ->   9 ("1001" in binary)
%e A361644       1,  2+1  ->   8 ("1000" in binary)
%e A361644       1+2,  1  ->  14 ("1110" in binary)
%e A361644        1+2+1   ->  15 ("1111" in binary)
%o A361644 (PARI) row(n) = { my (r = []); while (n, my (v = valuation(n+n%2, 2)); n \= 2^v; r = concat(v, r)); my (s = [if (#r, 2^r[1]-1, 0)]); for (k = 2, #r, s = concat(s * 2^r[k], [(h+1)*2^r[k]-1|h<-s]);); vecsort(s); }
%Y A361644 Cf. A003817, A005811, A092339, A101211, A225081, A342126, A361645, A361646, A361674, A361676.
%K A361644 nonn,base,tabf
%O A361644 0,3
%A A361644 _Rémy Sigrist_, Mar 19 2023