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.

A380844 The number of divisors of n that have the same binary weight as n.

This page as a plain text file.
%I A380844 #10 Feb 07 2025 00:43:46
%S A380844 1,2,1,3,1,2,1,4,2,2,1,3,1,2,1,5,1,4,1,3,2,2,1,4,1,2,1,3,1,2,1,6,2,2,
%T A380844 2,6,1,2,1,4,1,4,1,3,2,2,1,5,2,2,1,3,1,2,1,4,1,2,1,3,1,2,1,7,2,4,1,3,
%U A380844 1,4,1,8,1,2,2,3,1,2,1,5,1,2,1,6,1,2,1
%N A380844 The number of divisors of n that have the same binary weight as n.
%C A380844 First differs from A325565 at n = 133: a(133) = 3 while A325565(133) = 2.
%C A380844 The sum of these divisors is A380845(n).
%H A380844 Amiram Eldar, <a href="/A380844/b380844.txt">Table of n, a(n) for n = 1..10000</a>
%F A380844 a(n) = Sum_{d|n} [A000120(d) = A000120(n)], where [ ] is the Iverson bracket.
%F A380844 a(2^n) = n+1.
%F A380844 a(n) <= A000005(n) with equality if and only if n is a power of 2.
%F A380844 a(n) = a(A000265(n)) * (A007814(n)+1), or equivalently, a(k*2^n) = a(k)*(n+1) for k odd and n >= 0.
%F A380844 In particular, since a(p) = 1 for an odd prime p, a(p*2^n) = n+1 for an odd prime p and n >= 0.
%F A380844 a(A000396(n)) = A000043(n), assuming that odd perfect numbers do no exist.
%e A380844 a(6) = 2 because 6 = 110_2 has binary weight 2, and 2 of its divisors, 3 = 11_2 and 6, have the same binary weight.
%t A380844 a[n_] := Module[{h = DigitCount[n, 2, 1]}, DivisorSum[n, 1 &, DigitCount[#, 2, 1] == h &]]; Array[a, 100]
%o A380844 (PARI) a(n) = {my(h = hammingweight(n)); sumdiv(n, d, hammingweight(d) == h);}
%Y A380844 Cf. A000005, A000043, A000120, A000265, A000396, A007814, A324392, A325565, A380845.
%K A380844 nonn,base,easy
%O A380844 1,2
%A A380844 _Amiram Eldar_, Feb 05 2025