%I #21 Sep 24 2015 01:38:05
%S 0,0,0,0,0,1,0,0,0,3,0,2,0,2,2,0,0,2,0,6,1,2,0,3,0,4,0,4,0,6,0,0,1,3,
%T 1,4,0,2,3,9,0,4,0,4,4,3,0,4,0,6,2,8,0,3,3,6,1,5,0,10,0,4,2,0,1,4,0,6,
%U 2,6,0,6,0,4,4,4,2,8,0,12,0,4,0,7,2,3,4,6,0,9,2,6,3,4,3,5,0,4,2,12,0,6,0,12,4,5,0,6,0,8,3,8,0,4,2,10,6,4,3,14
%N Sum of Hamming distances between binary representations of prime factors of n, summed over all nonordered pairs of primes present (with multiplicity) in the prime factorization of n.
%H Antti Karttunen, <a href="/A260737/b260737.txt">Table of n, a(n) for n = 1..10000</a>
%e For n = 1 the prime factorization is empty, thus there is nothing to sum, so a(1) = 0.
%e For n = 6 = 2*3, a(6) = 1 because the Hamming distance between 2 and 3 is 1 as 2 = "10" in binary and 3 = "11" in binary.
%e For n = 10 = 2*5, a(10) = 3 because the Hamming distance between 2 and 5 is 3 as 2 = "10" in binary (extended with a leading zero to make it "010") and 5 = "101" in binary.
%e For n = 12 = 2*2*3, a(12) = 2 because the Hamming distance between 2 and 3 is 1, and the pair (2,3) occurs twice as one can pick either one of the two 2's present in the prime factorization to be a pair of a single 3. Note that the Hamming distance between 2 and 2 is 0, thus the pair (2,2) of prime divisors does not contribute to the sum.
%e For n = 36 = 2*2*3*3, a(36) = 4 because the Hamming distance between 2 and 3 is 1, and the prime factor pair (2,3) occurs four times in total. Note that the Hamming distance is zero between 2 and 2 as well as between 3 and 3, thus the pairs (2,2) and (3,3) do not contribute to the sum.
%o (Scheme, with Aubrey Jaffer's SLIB Scheme library)
%o (require 'factor)
%o (define (A260737 n) (let loop ((s 0) (pfs (factor n))) (cond ((or (null? pfs) (null? (cdr pfs))) s) (else (loop (fold-left (lambda (a p) (+ a (A101080bi (car pfs) p))) s (cdr pfs)) (cdr pfs))))))
%Y Cf. A101080.
%Y Cf. A000961 (positions of the zeros), A261077 (positions of the ones).
%Y Cf. A072594, A072595, A235488.
%Y Cf. also A261079.
%K nonn,base
%O 1,10
%A _Antti Karttunen_, Sep 22 2015