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.

A371572 Irregular triangle read by rows: row n lists the 1-based positions (starting from the left) of ones in the binary expansion of n, with row 0 = 0.

This page as a plain text file.
%I A371572 #12 Apr 04 2024 15:39:26
%S A371572 0,1,1,1,2,1,1,3,1,2,1,2,3,1,1,4,1,3,1,3,4,1,2,1,2,4,1,2,3,1,2,3,4,1,
%T A371572 1,5,1,4,1,4,5,1,3,1,3,5,1,3,4,1,3,4,5,1,2,1,2,5,1,2,4,1,2,4,5,1,2,3,
%U A371572 1,2,3,5,1,2,3,4,1,2,3,4,5,1,1,6,1,5,1,5,6
%N A371572 Irregular triangle read by rows: row n lists the 1-based positions (starting from the left) of ones in the binary expansion of n, with row 0 = 0.
%H A371572 Paolo Xausa, <a href="/A371572/b371572.txt">Table of n, a(n) for n = 0..11944</a> (rows 0..2200 of the triangle, flattened).
%H A371572 Michael De Vlieger, <a href="/A371572/a371572.png">Plot (x,y) = (n,T(n,k))</a>, n = 1..1024, where T(n,k) represents the k-th term in the n-th row of the irregular triangle, 32X vertical exaggeration.
%e A371572 Triangle begins:
%e A371572   [0] 0;
%e A371572   [1] 1;
%e A371572   [2] 1;
%e A371572   [3] 1, 2;
%e A371572   [4] 1;
%e A371572   [5] 1, 3;
%e A371572   [6] 1, 2;
%e A371572   [7] 1, 2, 3;
%e A371572   [8] 1;
%e A371572   ...
%e A371572 Row n = 50 is 1, 2, 5:
%e A371572   binary expansion of 50: 1 1 0 0 1 0
%e A371572   positions of ones:      1 2 - - 5 -
%t A371572 Join[{{0}}, Array[Flatten[Position[IntegerDigits[#, 2], 1]] &, 50]]
%Y A371572 Cf. A230877 (row sums), A371571 (position of zeros).
%Y A371572 Cf. A048793.
%K A371572 nonn,base,tabf,easy
%O A371572 0,5
%A A371572 _Paolo Xausa_, Mar 28 2024