MathDB
Bijection of natural numbers

Source: Indian IMOTC 2013, Practice Test 1, Problem 3

May 6, 2013
floor functioninductionvectorGaussnumber theoryrelatively primenumber theory proposed

Problem Statement

We define an operation \oplus on the set {0,1}\{0, 1\} by 00=0,01=1,10=1,11=0. 0 \oplus 0 = 0 \,, 0 \oplus 1 = 1 \,, 1 \oplus 0 = 1 \,, 1 \oplus 1 = 0 \,. For two natural numbers aa and bb, which are written in base 22 as a=(a1a2ak)2a = (a_1a_2 \ldots a_k)_2 and b=(b1b2bk)2b = (b_1b_2 \ldots b_k)_2 (possibly with leading 0's), we define ab=ca \oplus b = c where cc written in base 22 is (c1c2ck)2(c_1c_2 \ldots c_k)_2 with ci=aibic_i = a_i \oplus b_i, for 1ik1 \le i \le k. For example, we have 73=47 \oplus 3 = 4 since 7=(111)2 7 = (111)_2 and 3=(011)23 = (011)_2.
For a natural number nn, let f(n)=n[n/2]f(n) = n \oplus \left[ n/2 \right], where [x]\left[ x \right] denotes the largest integer less than or equal to xx. Prove that ff is a bijection on the set of natural numbers.