Given an integer N, find how many pairs (A, B) are there such that: gcd(A, B) = A xor B where 1 ≤ B ≤ A ≤ N & 1 ≤ N ≤ 30000000 how can i solve it ? any hint would be helpful thanks in advance :)
How i can solve it if n = 5000 in the following problem ? http://postimg.org/image/4cfbw9vc5/ thanks in advance :)