MathDB
2018-2019 Fall OMO Problem 25

Source:

November 7, 2018

Problem Statement

Given two positive integers x,yx,y, we define z=xyz=x\,\oplus\,y to be the bitwise XOR sum of xx and yy; that is, zz has a 11 in its binary representation at exactly the place values where x,yx,y have differing binary representations. It is known that \oplus is both associative and commutative. For example, 2018=101002100102=1102=620 \oplus 18 = 10100_2 \oplus 10010_2 = 110_2 = 6. Given a set S={a1,a2,,an}S=\{a_1, a_2, \dots, a_n\} of positive integers, we let f(S)=a1a2a3anf(S) = a_1 \oplus a_2 \oplus a_3\oplus \dots \oplus a_n. We also let g(S)g(S) be the number of divisors of f(S)f(S) which are at most 20182018 but greater than or equal to the largest element in SS (if SS is empty then let g(S)=2018g(S)=2018). Compute the number of 11s in the binary representation of S{1,2,,2018}g(S)\displaystyle\sum_{S\subseteq \{1,2,\dots, 2018\}} g(S).
Proposed by Brandon Wang and Vincent Huang