A387423 The length of binary expansion of n minus the length of the maximal common prefix of the binary expansions of n and sigma(n), where sigma is the sum of divisors function.
0, 1, 1, 2, 2, 0, 2, 3, 3, 2, 3, 2, 2, 2, 2, 4, 2, 1, 3, 1, 3, 3, 4, 3, 3, 4, 4, 0, 2, 4, 4, 5, 5, 5, 5, 4, 2, 5, 5, 3, 2, 5, 3, 3, 4, 4, 5, 4, 4, 5, 5, 3, 2, 4, 5, 3, 5, 5, 3, 5, 2, 4, 4, 6, 5, 4, 3, 6, 6, 4, 4, 6, 2, 6, 6, 4, 6, 5, 5, 4, 6, 6, 3, 6, 6, 5, 6, 2, 2, 6, 6, 4, 5, 5, 6, 5, 2, 6, 6, 4, 2, 4, 4, 1, 4
Offset: 1
Links
Crossrefs
Programs
-
PARI
A387423(n) = { my(a=binary(n), b=binary(sigma(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(#a-(i-1))); i++); (0); };
Comments