login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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, 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, 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
OFFSET
1,2
COMMENTS
a(n)<=A000005(n), a(n)=A000005(n) iff n=2^k (A000079).
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
LINKS
EXAMPLE
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).
MATHEMATICA
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 *)
PROG
(PARI) a(n) = my(hn=hammingweight(n)); sumdiv(n, d, (hammingweight(d) == hn) && (hammingweight(n/d) == hn)); \\ Michel Marcus, Feb 16 2015
CROSSREFS
Cf. A007088, A000120, a(A080025(n))>0, a(A080026(n))=1.
Sequence in context: A085199 A338504 A085200 * A378998 A348223 A035199
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jan 21 2003
STATUS
approved