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 :)
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | tourist | 3755 |
| 3 | ecnerwala | 3696 |
| 4 | VivaciousAubergine | 3647 |
| 5 | ksun48 | 3629 |
| 6 | jiangly | 3616 |
| 7 | turmax | 3559 |
| 8 | strapple | 3486 |
| 9 | Kevin114514 | 3427 |
| 10 | Um_nik | 3376 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 162 |
| 2 | adamant | 148 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 143 |
| 5 | errorgorn | 141 |
| 6 | cry | 138 |
| 7 | Proof_by_QED | 136 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 10 | soullless | 133 |
How i can solve it if n = 5000 in the following problem ? http://postimg.org/image/4cfbw9vc5/ thanks in advance :)
| Название |
|---|


