OFFSET
1,2
COMMENTS
In other words, the n-th row gives the numerical values of the runs of 1's in the binary expansion of n.
LINKS
EXAMPLE
Table begins:
1: [1]
2: [2]
3: [3]
4: [4]
5: [4, 1]
6: [6]
7: [7]
8: [8]
9: [8, 1]
10: [8, 2]
11: [8, 3]
12: [12]
13: [12, 1]
14: [14]
15: [15]
Table begins in binary:
1: [1]
10: [10]
11: [11]
100: [100]
101: [100, 1]
110: [110]
111: [111]
1000: [1000]
1001: [1000, 1]
1010: [1000, 10]
1011: [1000, 11]
1100: [1100]
1101: [1100, 1]
1110: [1110]
1111: [1111]
PROG
(PARI) row(n) = { my (rr=[]); while (n, my (z=valuation(n, 2), o=valuation(n/2^z+1, 2), r=(2^o-1)*2^z); n-=r; rr = concat(r, rr); ); rr }
CROSSREFS
KEYWORD
nonn,base,tabf,easy
AUTHOR
Rémy Sigrist, May 01 2021
STATUS
approved