cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A336932 The 2-adic valuation of A003973(n), the sum of divisors of prime shifted n.

Original entry on oeis.org

0, 2, 1, 0, 3, 3, 2, 3, 0, 5, 1, 1, 1, 4, 4, 0, 2, 2, 3, 3, 3, 3, 1, 4, 0, 3, 2, 2, 5, 6, 1, 2, 2, 4, 5, 0, 1, 5, 2, 6, 2, 5, 4, 1, 3, 3, 1, 1, 0, 2, 3, 1, 2, 4, 4, 5, 4, 7, 1, 4, 2, 3, 2, 0, 4, 4, 3, 2, 2, 7, 1, 3, 4, 3, 1, 3, 3, 4, 2, 3, 0, 4, 1, 3, 5, 6, 6, 4, 1, 5, 3, 1, 2, 3, 6, 3, 1, 2, 1, 0, 3, 5, 2, 4, 6
Offset: 1

Views

Author

Antti Karttunen, Aug 16 2020

Keywords

Crossrefs

Cf. A000203, A000290 (positions of zeros), A003961, A003973, A007814, A295664, A336937.

Programs

  • PARI
    A336932(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); valuation(sigma(factorback(f)),2); };
    
  • PARI
    A007814(n) = valuation(n, 2);
    A336932(n) = { my(f=factor(n)); sum(i=1, #f~, (f[i, 2]%2) * (A007814(1+nextprime(1+f[i, 1]))+A007814(1+f[i, 2])-1)); };
    
  • Python
    from math import prod
    from sympy import factorint, nextprime
    def A336932(n): return (~(m:=prod(((q:=nextprime(p))**(e+1)-1)//(q-1) for p,e in factorint(n).items()))& m-1).bit_length() # Chai Wah Wu, Jul 05 2022

Formula

Additive with a(p^2e) = 0, a(p^(2e-1)) = A007814(1+A003961(p)) + A007814(e).
a(n) = A007814(A003973(n)).
a(n) = A336937(A003961(n)).
For all n >= 1, a(n) >= A295664(n).