A364955 a(n) = A252464(n) - A364954(n), where A364954(n) is the length of the common prefix in the binary expansions of A156552(n) and A156552(A163511(n)).
0, 0, 0, 0, 2, 0, 1, 0, 1, 3, 4, 0, 4, 2, 2, 0, 6, 2, 7, 4, 4, 5, 8, 0, 3, 5, 3, 3, 7, 3, 6, 0, 5, 7, 4, 3, 11, 8, 6, 5, 12, 5, 13, 6, 4, 9, 14, 0, 4, 4, 6, 6, 14, 4, 4, 4, 6, 8, 14, 4, 14, 7, 3, 0, 6, 6, 18, 8, 9, 5, 19, 4, 20, 12, 3, 9, 5, 7, 21, 6, 3, 13, 22, 6, 7, 14, 10, 7, 23, 5, 6, 10, 11, 15, 8, 0, 23, 5, 5, 5
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Programs
-
PARI
Abincompreflen(n, m) = { my(x=binary(n), y=binary(m), u=min(#x, #y)); for(i=1, u, if(x[i]!=y[i], return(i-1))); (u); }; A156552(n) = {my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552 A163511(n) = if(!n,1,my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p)); A364954(n) = Abincompreflen(A156552(n), A156552(A163511(n))); A061395(n) = if(n>1, primepi(vecmax(factor(n)[, 1])), 0); A252464(n) = if(1==n,0,(bigomega(n) + A061395(n) - 1)); A364955(n) = (A252464(n)-A364954(n));