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.
%I A354112 #17 Jan 17 2025 19:22:37 %S A354112 1,3,4,9,6,17,8,27,16,33,20,100,14,44,42,81,18,186,20,293,80,118,38, %T A354112 634,62,77,64,523,80,813,32,243,153,99,154,5031,58,110,189,1918,67, %U A354112 1624,115,1545,761,226,120,9366,64,1728,472,1861,135,2162,945,3471,261,1056,101,73418 %N A354112 Total number of 1's in binary expansion of all divisors of 2^n-1. %H A354112 Michel Marcus, <a href="/A354112/b354112.txt">Table of n, a(n) for n = 1..300</a> %F A354112 a(n) = A093653(A000225(n)). %p A354112 a:= n-> add(add(i, i=Bits[Split](d)), d=numtheory[divisors](2^n-1)): %p A354112 seq(a(n), n=1..60); # _Alois P. Heinz_, May 17 2022 %t A354112 a[n_] := Total[DigitCount[Divisors[2^n - 1], 2, 1]]; Array[a, 60] (* _Amiram Eldar_, May 17 2022 *) %o A354112 (PARI) a(n) = sumdiv(2^n-1, d, hammingweight(d)); %o A354112 (Python) %o A354112 # if python version < 3.10, replace d.bitcount() with bin(d).count('1') %o A354112 from sympy import divisors %o A354112 def A354112(n): return sum(d.bit_count() for d in divisors(2**n-1,generator=True)) # _Chai Wah Wu_, May 17 2022 %Y A354112 Cf. A000225, A093653. %K A354112 nonn,base %O A354112 1,2 %A A354112 _Michel Marcus_, May 17 2022