维基百科的定义:
For integers, the exponent of the highest power of 2 dividing n gives 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, … (sequence A007814 in the OEIS). If 1 is added, or if the 0s are removed, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, … (sequence A001511 in the OEIS).
翻译一下:
定义 ruler function 为 r(n),
令r(n) = k,其满足以下条件 n mod 2^k = 0 并且 k 尽可能的大
所以r(1) = 0 由于 1 mod 2^0 = 0
所以r(2) = 1 由于 2 mod 2^1 = 0
所以r(3) = 0 由于 3 mod 2^0 = 0
所以r(4) = 2 由于 4 mod 2^2 = 0
所以r(5) = 0 由于 5 mod 2^0 = 0
因此序列为 0, 1, 0, 2, 0, ……