A339822 The exponent of the highest power of 2 dividing A339821(n).
0, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 2, 3, 4, 5, 2, 3, 4, 5, 3, 4, 5, 6, 3, 4, 5, 6, 4, 5, 6, 7, 4, 5, 6, 7, 5, 6, 7, 8, 5, 6, 7, 8, 6, 7, 8, 9, 6, 7, 8, 9, 7, 8, 9, 10, 7, 8, 9, 10, 8, 9, 10, 11, 1, 2, 3, 4, 2, 3, 4, 5, 2, 3, 4, 5, 3, 4, 5, 6, 3, 4, 5, 6, 4, 5, 6, 7, 4, 5, 6, 7, 5, 6, 7, 8, 5, 6, 7, 8, 6, 7, 8, 9, 6, 7
Offset: 0
Keywords
Links
Programs
-
PARI
A339822(n) = { my(s=0, p=2); while(n>0, p = nextprime(1+p); if(n%2, s += valuation((p-1),2)); n >>= 1); (s); };