OFFSET
0,5
COMMENTS
LINKS
PROG
(PARI) A324348(n) = { my(m1=2, m2=1, p=2, mp=p*p); while(n, if(!(n%2), p=nextprime(1+p); mp = p*p, m1 *= p; if(3==(n%4), mp *= p, m2 *= (mp-1)/(p-1))); n>>=1); ((m1-m2)-hammingweight(m1)); };
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Feb 24 2019
STATUS
approved