OFFSET
1,3
COMMENTS
If n is abundant, then negate the value of A103977(n), otherwise use as it is.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
PROG
(PARI)
A033879(n) = (n+n-sigma(n));
nonzerocoefpositions(p) = { my(v=Vec(p), lista=List([])); for(i=1, #v, if(v[i], listput(lista, i))); Vec(lista); };
A103977(n) = { my(p=1); fordiv(n, d, p *= (1 + 'x^d)); my(plist=nonzerocoefpositions(p), m = #plist, d); if(!(m%2), plist[1+(m/2)]-plist[m/2], d = plist[(m+1)/2]-plist[(m-1)/2]; if(1==d, 0, d)); };
CROSSREFS
KEYWORD
sign,new
AUTHOR
Antti Karttunen, Dec 04 2024
STATUS
approved