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 A380845 #10 Feb 07 2025 00:43:53 %S A380845 1,3,3,7,5,9,7,15,12,15,11,21,13,21,15,31,17,36,19,35,28,33,23,45,25, %T A380845 39,27,49,29,45,31,63,36,51,42,84,37,57,39,75,41,84,43,77,60,69,47,93, %U A380845 56,75,51,91,53,81,55,105,57,87,59,105,61,93,63,127,70,108 %N A380845 The sum of divisors of n that have the same binary weight as n. %C A380845 The number of these divisors is A380844(n). %H A380845 Amiram Eldar, <a href="/A380845/b380845.txt">Table of n, a(n) for n = 1..10000</a> %F A380845 a(n) = Sum_{d|n} d * [A000120(d) = A000120(n)], where [ ] is the Iverson bracket. %F A380845 a(2^n) = 2^(n+1) - 1. %F A380845 a(n) <= A000203(n) with equality if and only if n is a power of 2. %F A380845 a(n) = a(A000265(n)) * (2^(A007814(n)+1)-1) = a(A000265(n)) * A038712(n), or equivalently, a(k*2^n) = a(k)*(2^(n+1)-1) for k odd and n >= 0. %F A380845 In particular, since a(p) = p for an odd prime p, a(p*2^n) = p*(2^(n+1)-1) for an odd prime p and n >= 0. %F A380845 a(A000396(n)) = A000668(n)^2, assuming that odd perfect numbers do no exist. %e A380845 a(6) = 9 because 6 = 110_2 has binary weight 2, 2 of its divisors, 3 = 11_2 and 6, have the same binary weight, and 3 + 6 = 9. %t A380845 a[n_] := Module[{h = DigitCount[n, 2, 1]}, DivisorSum[n, # &, DigitCount[#, 2, 1] == h &]]; Array[a, 100] %o A380845 (PARI) a(n) = {my(h = hammingweight(n)); sumdiv(n, d, d * (hammingweight(d) == h));} %Y A380845 Cf. A000120, A000203, A000265, A000396, A000668, A007814, A038712, A380844. %K A380845 nonn,base,easy %O A380845 1,2 %A A380845 _Amiram Eldar_, Feb 05 2025