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.

A233932 Irregular table read by rows: T(n,k) is the binary representation of n shifted right k times and incremented if the last bit shifted away was set.

This page as a plain text file.
%I A233932 #33 Jun 19 2021 22:32:18
%S A233932 1,1,1,2,1,2,1,1,3,1,1,3,2,1,4,2,1,4,2,1,1,5,2,1,1,5,3,1,1,6,3,1,1,6,
%T A233932 3,2,1,7,3,2,1,7,4,2,1,8,4,2,1,8,4,2,1,1,9,4,2,1,1,9,5,2,1,1,10,5,2,1,
%U A233932 1,10,5,3,1,1,11,5,3,1,1,11,6,3,1,1,12,6,3,1,1,12,6,3,2,1,13,6,3,2,1,13,7,3,2,1,14,7
%N A233932 Irregular table read by rows: T(n,k) is the binary representation of n shifted right k times and incremented if the last bit shifted away was set.
%C A233932 The last bit shifted away is the (k-1)-th bit from the right.
%C A233932 The length of the n-th row is A070939(n).
%C A233932 Terms in the n-th row add to n.
%C A233932 From _Gary W. Adamson_, Jun 07 2021: (Start)
%C A233932 A production matrix is the irregular triangle (n, A001511(k)) = 1 otherwise 0:
%C A233932   1;
%C A233932   0, 1;
%C A233932   1;
%C A233932   0, 0, 1;
%C A233932   1;
%C A233932   0, 1;
%C A233932   1;
%C A233932   0, 0, 0, 1;
%C A233932   ...
%C A233932 Let the matrix = M, then take partial sums from the top -> down, by columns.
%C A233932 The result is A233932. If the 1's are replaced by any sequence, say 2n-1, the result using the same procedure is an analogous sequence with row sums equal to the partial sums of the replacement sequence. For example, with (1, 3, 5, 7, ...) the result is an array with row sums = the squares, (1, 4, 9, 16, 25, ...), as follows:
%C A233932    1;
%C A233932    1,  3;
%C A233932    6,  3;
%C A233932    6,  3,  7;
%C A233932   15,  3,  7;
%C A233932   15, 14,  7;
%C A233932   28, 14,  7;
%C A233932   28, 14,  7, 15;
%C A233932   45, 14,  7, 15;
%C A233932   45, 37,  7, 15;
%C A233932   ...  (End)
%H A233932 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A233932 T(n,k) = round(n/2^k), 1 <= k <= floor(log_2(n)) + 1, where round(1/2)=1. - _Ridouane Oudra_, Sep 02 2019
%e A233932 22 in binary is 10110, so the row length is 5. T(22, 1) = 11, T(22, 2) = 5 + 1 = 6, T(22, 3) = 2 + 1 = 3, T(22, 4) = 1, T(22, 5) = 0 + 1. So the 22nd row reads 11, 6, 3, 1, 1.
%e A233932 Table starts:
%e A233932   1;
%e A233932   1, 1;
%e A233932   2, 1;
%e A233932   2, 1, 1;
%e A233932   3, 1, 1;
%e A233932   3, 2, 1;
%e A233932   4, 2, 1;
%e A233932   4, 2, 1, 1;
%e A233932   5, 2, 1, 1;
%e A233932   5, 3, 1, 1;
%e A233932   ...
%o A233932 (PARI) T(n,k)=b=binary(n);n\2^k+b[#b-k+1]
%o A233932 (PARI) row(n) = my(b=binary(n)); vector(#b, k, n\2^k+b[#b-k+1]); \\ _Michel Marcus_, Sep 03 2019
%Y A233932 Cf. A120385.
%Y A233932 Cf. A079559.
%K A233932 nonn,tabf
%O A233932 1,4
%A A233932 _Ralf Stephan_, Dec 18 2013