OFFSET
1,7
COMMENTS
a(n) tells about the degree of relatedness between n and sigma(n) in Doudna tree (see the illustration in A005940). It is 0 for those n where sigma(n) is one of the descendants of n, 1 for those n where the nearest common ancestor of n and sigma(n) is the parent of n, 2 for those n where the nearest common ancestor of n and sigma(n) is the grandparent of n, and so on.
LINKS
FORMULA
PROG
(PARI)
A000523(n) = logint(n, 2);
Abincompreflen(x, y) = if(!x || !y, 0, my(xl=A000523(x), yl=A000523(y), s=min(xl, yl), k=0); x >>= (xl-s); y >>= (yl-s); while(s>=0 && !bitand(1, bitxor(x>>s, y>>s)), s--; k++); (k));
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
A061395(n) = if(n>1, primepi(vecmax(factor(n)[, 1])), 0);
(PARI)
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Aug 30 2021
EXTENSIONS
Name changed, old name is now in formula section. - Antti Karttunen, Jul 09 2024
STATUS
approved