OFFSET
0,7
COMMENTS
This sequence tells how near sigma(x) is to each x in Doudna-tree, A005940, with x iterating over the vertices of the tree in the breadth-first fashion. Positions that correspond to perfect numbers or (hypothetical) odd triperfect numbers get values 0 and 1 respectively. 1's occur also elsewhere. (Clarified Jul 03 2023)
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..65471
Michael De Vlieger, Annotated fan style binary tree diagram labeling A005940(0..511) but using a color function for a(0..16383) where black represents 0, red 1, and magenta the largest value of a(n), n = 0..16383.
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));
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
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);
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 03 2022
STATUS
approved