OFFSET
1,5
LINKS
FORMULA
PROG
(PARI)
A007814(n) = valuation(n, 2);
A336931(n) = { my(f=factor(n)); sum(i=1, #f~, (f[i, 2]%2) * (A007814(1+nextprime(1+f[i, 1]))-1)); };
(PARI)
A003973(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); sigma(factorback(f)); };
A007814(n) = valuation(n, 2);
(Python)
from math import prod
from sympy import factorint, nextprime, divisor_count
def A336931(n): return (~(m:=prod(((q:=nextprime(p))**(e+1)-1)//(q-1) for p, e in factorint(n).items()))& m-1).bit_length()-(~(k:=int(divisor_count(n))) & k-1).bit_length() # Chai Wah Wu, Jul 05 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 17 2020
STATUS
approved