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.
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, 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, 1, 2, 3, 5, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 6, 1, 5, 1, 5, 6
Offset: 0
Examples
Triangle begins: [0] 0; [1] 1; [2] 1; [3] 1, 2; [4] 1; [5] 1, 3; [6] 1, 2; [7] 1, 2, 3; [8] 1; ... Row n = 50 is 1, 2, 5: binary expansion of 50: 1 1 0 0 1 0 positions of ones: 1 2 - - 5 -
Links
- Paolo Xausa, Table of n, a(n) for n = 0..11944 (rows 0..2200 of the triangle, flattened).
- Michael De Vlieger, Plot (x,y) = (n,T(n,k)), n = 1..1024, where T(n,k) represents the k-th term in the n-th row of the irregular triangle, 32X vertical exaggeration.
Programs
-
Mathematica
Join[{{0}}, Array[Flatten[Position[IntegerDigits[#, 2], 1]] &, 50]]