|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|