|
|
A336931
|
|
Difference between the 2-adic valuation of A003973(n) [= the sum of divisors of the prime shifted n] and the 2-adic valuation of the number of divisors of n.
|
|
4
|
|
|
0, 1, 0, 0, 2, 1, 1, 1, 0, 3, 0, 0, 0, 2, 2, 0, 1, 1, 2, 2, 1, 1, 0, 1, 0, 1, 0, 1, 4, 3, 0, 1, 0, 2, 3, 0, 0, 3, 0, 3, 1, 2, 3, 0, 2, 1, 0, 0, 0, 1, 1, 0, 1, 1, 2, 2, 2, 5, 0, 2, 1, 1, 1, 0, 2, 1, 2, 1, 0, 4, 0, 1, 3, 1, 0, 2, 1, 1, 1, 2, 0, 2, 0, 1, 3, 4, 4, 1, 0, 3, 1, 0, 0, 1, 4, 1, 0, 1, 0, 0, 2, 2, 1, 1, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
Additive with a(p^e) = 0 when e is even, a(p^e) = A007814(1+A003961(p))-1 when e is odd.
|
|
PROG
|
(PARI)
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)); };
(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
|
|
|
STATUS
|
approved
|
|
|
|