login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #17 Jul 05 2022 23:30:40

%S 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,

%T 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,

%U 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

%N 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.

%C Note that A295664(n) = A295664(A003961(n)).

%H Antti Karttunen, <a href="/A336931/b336931.txt">Table of n, a(n) for n = 1..65537</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%H <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>

%F Additive with a(p^e) = 0 when e is even, a(p^e) = A007814(1+A003961(p))-1 when e is odd.

%F a(n) = A336932(n) - A295664(n).

%F a(n) = a(A007913(n)).

%o (PARI)

%o A007814(n) = valuation(n, 2);

%o A336931(n) = { my(f=factor(n)); sum(i=1, #f~, (f[i, 2]%2) * (A007814(1+nextprime(1+f[i, 1]))-1)); };

%o (PARI)

%o A003973(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); sigma(factorback(f)); };

%o A007814(n) = valuation(n, 2);

%o A336931(n) = (A007814(A003973(n)) - A007814(numdiv(n)));

%o (Python)

%o from math import prod

%o from sympy import factorint, nextprime, divisor_count

%o 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

%Y Cf. A003961, A003973, A007814, A007913, A295664, A336930 (positions of zeros), A336932, A336937.

%K nonn

%O 1,5

%A _Antti Karttunen_, Aug 17 2020