Ruler Function
The exponent of the largest power of 2 which divides a given number 2n. The values of the ruler function for n=1, 2, ..., are 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, ...
const ruler = // => [0, 1, 0, 2, 0, 1, 0, 3, 0, 1]
The exponent of the largest power of 2 which divides a given number 2n. The values of the ruler function for n=1, 2, ..., are 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, ...
const ruler = // => [0, 1, 0, 2, 0, 1, 0, 3, 0, 1]
npm i ruler-function
1
1.0.0
MIT
1.37 kB
3