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.

A354112 Total number of 1's in binary expansion of all divisors of 2^n-1.

Original entry on oeis.org

1, 3, 4, 9, 6, 17, 8, 27, 16, 33, 20, 100, 14, 44, 42, 81, 18, 186, 20, 293, 80, 118, 38, 634, 62, 77, 64, 523, 80, 813, 32, 243, 153, 99, 154, 5031, 58, 110, 189, 1918, 67, 1624, 115, 1545, 761, 226, 120, 9366, 64, 1728, 472, 1861, 135, 2162, 945, 3471, 261, 1056, 101, 73418
Offset: 1

Views

Author

Michel Marcus, May 17 2022

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> add(add(i, i=Bits[Split](d)), d=numtheory[divisors](2^n-1)):
    seq(a(n), n=1..60);  # Alois P. Heinz, May 17 2022
  • Mathematica
    a[n_] := Total[DigitCount[Divisors[2^n - 1], 2, 1]]; Array[a, 60] (* Amiram Eldar, May 17 2022 *)
  • PARI
    a(n) = sumdiv(2^n-1, d, hammingweight(d));
    
  • Python
    # if python version < 3.10, replace d.bitcount() with bin(d).count('1')
    from sympy import divisors
    def A354112(n): return sum(d.bit_count() for d in divisors(2**n-1,generator=True)) # Chai Wah Wu, May 17 2022

Formula

a(n) = A093653(A000225(n)).