Prove for any integers \(m,n\ge0\) that \(F_{m+n} = F_{m-1}F_n + F_mF_{n+1}\).
Corollary: if \(k\mid n\), then \(F_k\mid F_n\). This can be proven by induction if we write \(n=sk\) for a natural \(s\), then \[F_{k+(s-1)k} = F_{k-1}F_{(s-1)k} + F_kF_{(s-1)k+1}.\]
Denote by \(\gcd(m,n)\) the greatest common divisor of numbers \(m,n\), namely the largest possible \(d\) which divides both \(n\) and \(m\). Prove for any \(m,n\) that \[\gcd(F_n,F_m) = F_{\gcd(m,n)}.\]
Suppose that \(p\) is a prime number. How many numbers are there less than \(p^2\) that are relatively prime to \(p^2\)?
How many cuboids are contained in an \(n\times n\times n\) cube? For example, we’ve got \(n^3\) cuboids of size \(1\times1\times1\), and obviously just \(1\) of size \(n\times n\times n\) (which is the whole cube itself). But we also have to count how many there of size \(1\times1\times2\), \(1\times2\times3\), and several more.
In the \(6\times7\) large rectangle shown below, how many rectangles are there in total formed by grid lines?
Simplify \(F_0-F_1+F_2-F_3+...-F_{2n-1}+F_{2n}\), where \(n\) is a positive integer.
Let us define XOR (or addition mod 2). XOR is defined for 0 and 1 only. Here is a table recording the values of XOR:
XOR | 0 | 1 |
---|---|---|
0 | 0 | 1 |
1 | 1 | 0 |
Now we define the important concept of nim-sum. Given two natural numbers \(x\) and \(y\), we first convert them into binary representations and then compute XOR on individual digits. The resulting number, denoted \(x \oplus y\), is the nim-sum of \(x\) and \(y\). Here is an example.
1 | 0 | 1 | 1 | 0 | |
XOR | 0 | 0 | 1 | 0 | 1 |
1 | 0 | 0 | 1 | 1 |
This is simply saying \(22 \oplus 5 = 19\). Note that \(22=(10110)_2\) and \(5=(00101)_2\).
Verify \((x \oplus y) \oplus z = x \oplus (y \oplus z)\), so we can speak of \(x \oplus y \oplus z\) with no ambiguity.
Show that \(x \oplus y = 0\) if and only if \(x = y\). Remember that \(x \oplus y\) denotes the nim-sum of \(x\) and \(y\).
Show that \(\text{Nim}(x,y,z)\) is a losing position if and only if \(x \oplus y \oplus z = 0\). Remember that \(x \oplus y\) denotes the nim-sum of \(x\) and \(y\).
Is \(\text{Nim}(7,11,15)\) a winning position or a losing position? If it is a winning position, what is the optimal move?