These are brief answers and hints, not full solutions: they give the result and the key step, so that you can check your own work. Try each exercise properly before looking.
1.1 A Prime Factory
Suppose \(p_1, \ldots, p_k\) are all the primes; then \(p_1\cdots p_k + 1\) has a prime factor not in the list, a contradiction. The Fermat-number proof is constructive: it exhibits infinitely many pairwise coprime numbers \(F_0, F_1, \ldots\), each of which supplies a new prime.
For \(n \geq 2\), \(2^n\) is a multiple of \(4\), so \(2^{2^n} = 16^{2^{n-2}}\), and every power of \(16\) ends in \(6\). Hence \(F_n\) ends in \(7\).
(a) Induction: \(a_{n+1} - 1 = a_n(a_n - 1) = a_n \cdot a_1\cdots a_{n-1}\). (b) A common factor of \(a_m\) and \(a_n\) (\(m < n\)) divides \(a_1\cdots a_{n-1} = a_n - 1\) and \(a_n\), so it is \(1\); each term has a prime factor shared with no other. (c) \(\frac{1}{a_n} = \frac{1}{a_n - 1} - \frac{1}{a_{n+1} - 1}\); the sum telescopes to \(1 - \frac{1}{a_{n+1} - 1}\).
(a) \(p \mid F_n\) gives \(2^{2^n} \equiv -1\); squaring gives \(2^{2^{n+1}} \equiv 1\). (b) \(d\) divides every \(e\) with \(2^e \equiv 1\), so \(d \mid 2^{n+1}\); \(d \nmid 2^n\) since \(2^{2^n} \equiv -1 \not\equiv 1\) (as \(p\) is odd). So \(d = 2^{n+1}\). (c) \(2^{p-1} \equiv 1\), so \(2^{n+1} \mid p - 1\). (d) \(641 = 64 \times 10 + 1\). The primes of the form \(64k + 1\) below \(641\) are \(193\), \(257\), \(449\) and \(577\): only four candidates to try, which is how Euler found \(641\).
The \(n\)th prime is at most the largest prime factor of any of \(F_0, \ldots, F_{n-1}\), so \(p_n \leq F_{n-1} = 2^{2^{n-1}} + 1\). For \(n = 5\) the bound is \(65\,537\), while \(p_5 = 11\): correct but extremely weak.
1.2 How Thinly Spread Are the Primes?
\(P_{1,10} = 210\), \(P_{1,20} = 9\,699\,690\), \(P_{1,30} = 6\,469\,693\,230\). Compare \(4^{30} \approx 1.15 \times 10^{18}\) and \(e^{30} \approx 1.07 \times 10^{13}\): the product is far below \(4^n\) and grows roughly like \(e^n\) (in fact \(\ln P_{1,n} \sim n\), a form of the Prime Number Theorem).
\(\binom{2m}{k+1}\big/\binom{2m}{k} = \frac{2m - k}{k + 1}\), which exceeds \(1\) exactly when \(k < m\), so the coefficients rise to the middle and then fall. The largest of \(2m + 1\) terms adding to \(4^m\) is at least their average.
The primes in \((\sqrt n, n]\) each exceed \(\sqrt n\) and their product is less than \(4^n\), so \((\sqrt n)^{\pi(n) - \pi(\sqrt n)} < 4^n\); take logarithms. Since \(2\ln4 \approx 2.77\) and \(\pi(\sqrt n) \leq \sqrt n\), the bound follows. It has the right shape \(n/\ln n\), with the constant \(2.8\) instead of the true \(1\).
Use the primes \(2, 3, 5, 7, 13, 23, 43, 83\), each less than twice the one before. For any \(n \leq 50\), the first prime in this list greater than \(n\) is less than twice the previous one, which is at most \(n\), so it lies between \(n\) and \(2n\).
1.3 The Smallest Counterexample
If \(k\sqrt3\) is an integer for a smallest positive integer \(k\), then \(k' = (\sqrt3 - 1)k\) is a smaller positive integer with \(k'\sqrt3 = 3k - k\sqrt3\) an integer. The number \(\sqrt3 - 1\) plays the role of \(\sqrt2 - 1\).
With \(0 < \sqrt N - m < 1\), \(k' = (\sqrt N - m)k\) is a positive integer smaller than \(k\), and \(k'\sqrt N = kN - mk\sqrt N\) is an integer: a contradiction.
With \(N = 4\), \(m = 2 = \sqrt4\), so \(\sqrt N - m = 0\) and \(k' = 0\) is not a positive integer. The step “\(0 < \sqrt N - m\)” fails.
In the picture, the two overlapping squares of side \(b\) inside the square of side \(a\) cover a central square of side \(2b - a\) twice and leave two uncovered squares of side \(a - b\). Algebraically, \((2b - a)^2 - 2(a - b)^2 = 2b^2 - a^2 = 0\).
1.4 \(e\) Is Irrational, and So Is \(e^2\)
If \(\frac1e = \frac pq\), multiply \(\frac1e = \sum_{k \geq 0}\frac{(-1)^k}{k!}\) by \(q!\). The terms with \(k \leq q\) are integers, and the tail \(\sum_{k > q}(-1)^kq!/k!\) is an alternating series of decreasing terms, so it lies strictly between \(0\) and \(\frac{1}{q+1}\) in absolute value. So \(q!/e\) is not an integer: contradiction.
If \(\sin 1 = \frac pq\), multiply by \((2n + 1)!\) with \(2n + 1 \geq q\). The left side is an integer, and so are the terms of the series up to \(\frac{1}{(2n+1)!}\); the tail is alternating with first term of size \(\frac{1}{(2n+2)(2n+3)} < 1\), so it is not an integer.
The method needs a series with rational terms whose tails shrink faster than the denominators grow, like \(\frac{1}{k!}\); no such series is known for \(\pi\). Niven’s proof uses \(\int_0^\pi\frac{x^n(\pi - x)^n}{n!}\sin x\,\mathrm{d}x\), which would be a positive integer smaller than \(1\) for large \(n\) if \(\pi\) were rational.
The roots of \(x^2 - (e + \pi)x + e\pi\) are \(e\) and \(\pi\). If \(e + \pi\) and \(e\pi\) were both algebraic, \(\pi\) would be a root of a polynomial with algebraic coefficients, hence algebraic, contradicting Lindemann’s theorem.
1.5 Infinite Descent
\(3 \mid a\); writing \(a = 3a_1\) gives \(9a_1^3 + b^3 = 3c^3\), so \(3 \mid b\), then \(3a_1^3 + 9b_1^3 = c^3\), so \(3 \mid c\), and \((a_1, b_1, c_1)\) is a smaller solution: descent. For \(p^4 + 2q^4 = 5r^4\): fourth powers are \(0\) or \(1\) modulo \(5\) (they end in \(0\), \(1\), \(5\) or \(6\)), so \(p^4 + 2q^4 \equiv 0\) forces \(5 \mid p\) and \(5 \mid q\); then \(5^4 \mid 5r^4\), so \(5 \mid r\), and descent again.
Squares are \(0\) or \(1\) modulo \(4\), so \(x^2 + y^2\) is \(0\), \(1\) or \(2\), never \(3\).
A rational point \((\frac ac, \frac bc)\) would give \(a^2 + b^2 = 3c^2\) with \(c \neq 0\), which part (iii) rules out.
For fixed \(x\), \(y\), the equation is the quadratic \(z^2 - 3xyz + (x^2 + y^2) = 0\), whose two roots add to \(3xy\). From \((1,1,1)\): \((1,1,2)\); replacing the \(1\) opposite \((1, 2)\) gives \(3 \cdot 1 \cdot 2 - 1 = 5\), so \((1,2,5)\); then \((1,5,13)\) and \((2,5,29)\).
1.6 Sums of Two Squares
Squares are \(0\) or \(1\) modulo \(4\), so a sum of two squares is never \(3\) modulo \(4\).
\(65 = 1^2 + 8^2 = 4^2 + 7^2\) and \(85 = 2^2 + 9^2 = 6^2 + 7^2\). With \(65 = (2 + \mathrm{i})(2 - \mathrm{i})(3 + 2\mathrm{i})(3 - 2\mathrm{i})\): \((2 + \mathrm{i})(3 + 2\mathrm{i}) = 4 + 7\mathrm{i}\) and \((2 + \mathrm{i})(3 - 2\mathrm{i}) = 8 - \mathrm{i}\). Similarly \((2 + \mathrm{i})(4 \pm \mathrm{i})\) gives \(7 + 6\mathrm{i}\) and \(9 - 2\mathrm{i}\) for \(85\).
\(1105 = 4^2 + 33^2 = 9^2 + 32^2 = 12^2 + 31^2 = 23^2 + 24^2\). Each of \(5\), \(13\), \(17\) splits as a Gaussian integer times its conjugate; choosing one factor from each pair gives \(8\) products, which pair up into conjugates (the same sum of squares), leaving \(4\).
Taking moduli squared, \(9 = (a^2 + b^2)(c^2 + d^2)\). Since \(3\) is not a sum of two squares, one factor is \(1\).
1.7 When Factorisation Fails
\(693 = 9 \times 77 = 21 \times 33\), all four factors being \(S\)-prime. Recipe: take four primes \(p, q, r, s\) of the form \(4k + 3\); then \((pq)(rs) = (pr)(qs)\) gives two factorisations into \(S\)-primes.
The \(E\)-primes are the numbers \(2 \pmod 4\) (they cannot be products of two even numbers). \(60 = 2 \times 30 = 6 \times 10\).
\(N(zw) = N(z)N(w)\) by expanding \((ac - 5bd)^2 + 5(ad + bc)^2\). \(a^2 + 5b^2\) is never \(2\) or \(3\). Since \(N(2) = 4\), \(N(3) = 9\) and \(N(1 \pm \sqrt{-5}) = 6\), a factorisation into non-units would need a factor of norm \(2\) or \(3\).
Let \(n\) be the smallest number with two different factorisations \(p_1\cdots p_r = q_1\cdots q_s\). By Euclid’s lemma \(p_1\) divides some \(q_j\), so \(p_1 = q_j\); cancelling gives a smaller number with two different factorisations, a contradiction.
1.8 Counting the Rationals
\(\frac35\): parents \((3, 5) \leftarrow (3, 2) \leftarrow (1, 2) \leftarrow (1, 1)\), giving positions \(1 \to 2 \to 5 \to 10\), so \(f(10) = \frac35\). \(\frac53\): \((5, 3) \leftarrow (2, 3) \leftarrow (2, 1) \leftarrow (1, 1)\), positions \(1 \to 3 \to 6 \to 13\), so \(f(13) = \frac53\).
Newman’s rule \(x_{n+1} = \frac{1}{2\lfloor x_n\rfloor - x_n + 1}\) gives \(1\), \(\frac12\), \(2\), \(\frac13\), \(\frac32\), \(\frac23\), \(3\), \(\frac14\), \(\frac43\), \(\frac35\), matching \(f(1), \ldots, f(10)\).
Choose the \(n\)th digit to be \(5\) unless the \(n\)th number’s \(n\)th digit is \(5\), in which case choose \(4\). The new decimal differs from every number in the list, and avoiding \(0\) and \(9\) means it has only one decimal expansion, so it really is a different number.
Every positive integer is uniquely a power of \(2\) times an odd number, \(2^{m-1}(2n - 1)\), so \((m, n) \mapsto 2^{m-1}(2n - 1)\) is a bijection.
1.9 Tangents to a Cubic
Substituting \(y = t(x + 1)\) into \(x^2 + y^2 = 1\) gives \((1 + t^2)x^2 + 2t^2x + t^2 - 1 = 0\), with roots \(-1\) and \(\frac{1 - t^2}{1 + t^2}\). With \(t = \frac qp\) the point is \(\bigl(\frac{p^2 - q^2}{p^2 + q^2}, \frac{2pq}{p^2 + q^2}\bigr)\), giving the triples \((p^2 - q^2, 2pq, p^2 + q^2)\).
The line is \(x + y = 3\), and \(x^3 + (3 - x)^3 = 9\) reduces to \(9x^2 - 27x + 18 = 0\): the cubic terms cancel, leaving only \(x = 1, 2\). The line is parallel to the asymptote \(y = -x\), and the third intersection is at infinity.
The tangent has gradient \(\frac{x^2}{y^2} = \frac{289}{400}\), and meets the curve again at \(\bigl(-\frac{188479}{90391}, -\frac{36520}{90391}\bigr)\). Clearing denominators, \(188479^3 = 36520^3 + 90391^3 + 180782^3\).
The line meets \(x^3 + y^3 = 1729\) again at \(\bigl(-\frac{37}{3}, \frac{46}{3}\bigr)\), so \(46^3 = 37^3 + 27 \times 1729 = 37^3 + 3^3 + 36^3\) (using \(27 = 3^3\) and \(27 \times 1728 = 36^3\)).