login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A080024 Number of divisors d of n such that in binary representation d and n/d have the same number of 1's as n. 3

%I #24 Dec 14 2017 03:45:51

%S 1,2,0,3,0,0,0,4,1,0,0,0,0,0,0,5,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,

%T 0,3,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,

%U 0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0

%N Number of divisors d of n such that in binary representation d and n/d have the same number of 1's as n.

%C a(n)<=A000005(n), a(n)=A000005(n) iff n=2^k (A000079).

%C Not multiplicative. Counterexample: 441=3^2*7^2, a(441)=0, but a(3^2) = a(7^2) = 1. - _Christian G. Bower_, May 16 2005

%H G. C. Greubel, <a href="/A080024/b080024.txt">Table of n, a(n) for n = 1..5000</a>

%e Divisors of 36 = {1,2,3,4,6,9,12,18,36}, 36->100100 and also 3,6,12 have two 1's in binary notation with 36 = 3*12 = 6*6, therefore a(36)=3 (18->10010 doesn't count, as 36/18 = 2 -> 10 has only one binary 1).

%t h[n_] := Total[IntegerDigits[n, 2]]; w[n_] := DigitCount[n, 2, 1]; a[n_] := With[{hn = h[n]}, DivisorSum[ n, Boole[h[#] == hn && w[n/#] == hn]&]]; Array[a, 105] (* _Jean-François Alcover_, Dec 06 2015, adapted from PARI *)

%o (PARI) a(n) = my(hn=hammingweight(n)); sumdiv(n, d, (hammingweight(d) == hn) && (hammingweight(n/d) == hn)); \\ _Michel Marcus_, Feb 16 2015

%Y Cf. A007088, A000120, a(A080025(n))>0, a(A080026(n))=1.

%K nonn,base

%O 1,2

%A _Reinhard Zumkeller_, Jan 21 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 08:27 EDT 2024. Contains 371698 sequences. (Running on oeis4.)