\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{comment}
\usepackage{color}
\usepackage{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{needspace}
\usepackage{tabls}
\usepackage{wasysym}
\usepackage{easytable}
\usepackage{ytableau}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Monday, November 13, 2023 21:16:21}
%TCIDATA{SuppressPackageManagement}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{Language=American English}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\usetikzlibrary{arrows.meta}
\usetikzlibrary{chains}
\newcounter{exer}
\newcounter{exera}
\numberwithin{exer}{subsection}
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[subsection]
\newenvironment{theorem}[1][]
{\begin{theo}[#1]\begin{leftbar}}
{\end{leftbar}\end{theo}}
\newtheorem{lem}[theo]{Lemma}
\newenvironment{lemma}[1][]
{\begin{lem}[#1]\begin{leftbar}}
{\end{leftbar}\end{lem}}
\newtheorem{prop}[theo]{Proposition}
\newenvironment{proposition}[1][]
{\begin{prop}[#1]\begin{leftbar}}
{\end{leftbar}\end{prop}}
\newtheorem{defi}[theo]{Definition}
\newenvironment{definition}[1][]
{\begin{defi}[#1]\begin{leftbar}}
{\end{leftbar}\end{defi}}
\newtheorem{remk}[theo]{Remark}
\newenvironment{remark}[1][]
{\begin{remk}[#1]\begin{leftbar}}
{\end{leftbar}\end{remk}}
\newtheorem{coro}[theo]{Corollary}
\newenvironment{corollary}[1][]
{\begin{coro}[#1]\begin{leftbar}}
{\end{leftbar}\end{coro}}
\newtheorem{conv}[theo]{Convention}
\newenvironment{convention}[1][]
{\begin{conv}[#1]\begin{leftbar}}
{\end{leftbar}\end{conv}}
\newtheorem{quest}[theo]{Question}
\newenvironment{question}[1][]
{\begin{quest}[#1]\begin{leftbar}}
{\end{leftbar}\end{quest}}
\newtheorem{warn}[theo]{Warning}
\newenvironment{warning}[1][]
{\begin{warn}[#1]\begin{leftbar}}
{\end{leftbar}\end{warn}}
\newtheorem{conj}[theo]{Conjecture}
\newenvironment{conjecture}[1][]
{\begin{conj}[#1]\begin{leftbar}}
{\end{leftbar}\end{conj}}
\newtheorem{exam}[theo]{Example}
\newenvironment{example}[1][]
{\begin{exam}[#1]\begin{leftbar}}
{\end{leftbar}\end{exam}}
\newtheorem{exmp}[exer]{Exercise}
\newenvironment{exercise}[1][]
{\begin{exmp}[#1]\begin{leftbar}}
{\end{leftbar}\end{exmp}}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\newenvironment{fineprint}{\medskip \begin{small}}{\end{small} \medskip}
\iffalse
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{question}[1][Question]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{warning}[1][Warning]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{teachingnote}[1][Teaching note]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\fi
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\let\cupnonlimits\bigcup
\let\capnonlimits\bigcap
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\renewcommand{\bigcup}{\cupnonlimits\limits}
\renewcommand{\bigcap}{\capnonlimits\limits}
\setlength\tablinesep{3pt}
\setlength\arraylinesep{3pt}
\setlength\extrarulesep{3pt}
\voffset=0cm
\hoffset=-0.7cm
\setlength\textheight{22.5cm}
\setlength\textwidth{15.5cm}
\newcommand\arxiv[1]{\href{http://www.arxiv.org/abs/#1}{\texttt{arXiv:#1}}}
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\newenvironment{teachingnote}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\excludecomment{teachingnote}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\KK}{\mathbb{K}}
\newcommand{\id}{\operatorname{id}}
\newcommand{\lcm}{\operatorname{lcm}}
\newcommand{\rev}{\operatorname{rev}}
\newcommand{\powset}[2][]{\ifthenelse{\equal{#2}{}}{\mathcal{P}\left(#1\right)}{\mathcal{P}_{#1}\left(#2\right)}}
\newcommand{\set}[1]{\left\{ #1 \right\}}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\tup}[1]{\left( #1 \right)}
\newcommand{\ive}[1]{\left[ #1 \right]}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\lf}[2]{#1^{\underline{#2}}}
\newcommand{\underbrack}[2]{\underbrace{#1}_{\substack{#2}}}
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}}
\newcommand{\are}{\ar@{-}}
\newcommand{\nnn}{\nonumber\\}
\newcommand{\sslash}{\mathbin{/\mkern-6mu/}}
\newcommand{\numboxed}[2]{\underbrace{\boxed{#1}}_{\text{box } #2}}
\newcommand{\ig}[2]{\includegraphics[scale=#1]{#2.png}}
\iffalse
\NOEXPAND{\today}{\today}
\NOEXPAND{\sslash}{\sslash}
\NOEXPAND{\numboxed}[2]{\numboxed}
\fi
\ihead{Math 235 Fall 2023, Worksheet 0, version \today}
\ohead{page \thepage}
\cfoot{Darij Grinberg}
\begin{document}
\setcounter{section}{-1}

\section{Math 235 Fall 2023, Worksheet 0: Introduction to problem-solving}

Welcome to Math 235: a course on mathematical problem-solving. The main
\textquotedblleft practical\textquotedblright\ purpose of this course is to
prepare for
\href{https://en.wikipedia.org/wiki/William_Lowell_Putnam_Mathematical_Competition}{the
\emph{Putnam contest}}, a 6-hour problem-solving competition that happens
annually on the first Saturday of December (such as December 2 in 2023). Its
full name is \textquotedblleft William Lowell Putnam Mathematical
Competition\textquotedblright, but everyone calls it the \textquotedblleft
Putnam contest\textquotedblright\ or just \textquotedblleft the
Putnam\textquotedblright.

\subsubsection{A short history of mathematical competitions}

Mathematical problems have been used as puzzles since antiquity;
\href{https://mathworld.wolfram.com/DiophantussRiddle.html}{Diophantus'
gravestone supposedly contains a mathematical riddle}. In the 8th Century AD,
Alcuin of York (a scholar at the court of Charlemagne) collected over 50
mathematical puzzles in
\href{https://en.wikipedia.org/wiki/Propositiones_ad_Acuendos_Juvenes}{a book
named \textit{Propositiones ad Acuendos Juvenes} (\textquotedblleft Problems
to Sharpen the Young\textquotedblright)}. Many of these puzzles have become
straightforward with the methods of modern high-school mathematics, but some
still remain nontrivial.

Somewhere in the 19th Century, some journals introduced problem sections, in
which authors would challenge readers to solve problems until a given
deadline, after which the best solutions would get published in the journal
(along with a list of all solvers). This tradition still lives on in journals
such as \href{https://cms.math.ca/publications/crux/}{\textit{Crux
Mathematicorum}}, the
\href{https://www.tandfonline.com/toc/uamm20/current}{\textit{American
Mathematical Monthly}}, the
\href{https://www.tandfonline.com/toc/ucmj20/current}{\textit{College
Mathematics Journal}} or the
\href{https://www.tandfonline.com/toc/umma20/current}{\textit{Mathematics
Magazine}}; I recommend you check out the recent problem sections in these journals.

The first \textit{mathematical olympiad} in the modern sense -- i.e.,
exam-like contest with non-straightforward problems -- was held in Hungary in
1894. Since then, the Hungarian Mathematics Olympiad for high-school students
(\textquotedblleft E\"{o}tv\"{o}s Competition\textquotedblright) has been
administered yearly, and over the 20th Century, its format has been copied by
dozens of other countries. Students from all over the world compete in the
\href{https://www.imo-official.org/}{\textit{International Mathematical
Olympiad}}; similar international contests have sprung up (e.g.) in Europe and Asia.

While the USA has been late in adopting high-school mathematical olympiads, it
can boast one of the first university-level olympiads: the very
\href{https://en.wikipedia.org/wiki/William_Lowell_Putnam_Mathematical_Competition}{\textit{Putnam
contest}} that this course is meant to train you for. It has been held yearly
since 1938 (with a pause for WWII), and is open to any undergraduate at a
North American university that participates in it (Drexel does). While its
results are often used to compare universities, it is actually an individual
competition, and every contestant gets scored independently. Among
mathematical competitions, it is notorious for the time pressure involved:
There are only 6 hours available for 12 problems, each of which can range from
nontrivial (the level of a hard homework exercise) to highly challenging (the
level of a main result of a low-tier research paper).\footnote{In contrast,
the International Mathematical Olympiad would give you 4.5 hours for 3
problems.} The median score at the Putnam contest is often 0 or 1 points out
of 120 (each problem is worth 10 points when correctly solved), and the
maximum score is often far below 120; some problems even don't get solved by
any participant.\footnote{See Kiran Kedlaya's \textit{Putnam archive} (
\url{https://kskedlaya.org/putnam-archive/} ) for the problems, solutions and
score distributions of the Putnam in recent years.
\par
I never participated in the Putnam myself, as I attended college in Germany,
but at my current level of training I would typically score 40--50 points on
the exam if I took part.}

\subsubsection{Why play the Putnam?}

Why should you partake in such a hopeless and overtaxing competition?

The obvious first answer is \textquotedblleft you should if you like a
challenge\textquotedblright, but there are other reasons as well. You get to
play around with ideas in a tenser environment than usual, which can liberate
some creativity that would not reveal itself when you sit on the
sofa\footnote{The opposite effect might also happen. It is best to try out
both environments from time to time.}. The potential reward is high, but the
risks are low (all you can lose is a few hours of time). Solving a single
problem out of 12 gives you bragging rights\footnote{Some employers will count
your Putnam score (if it is, say, $\geq10$ or $\geq20$) in your favor, but no
one will count its lack against you, since the Putnam is known to be
challenging and not everyone's idea of a good time.}. Every once in a while,
someone gets famous for inventing a particularly surprising or elegant solution.

Finally, problem-solving is research writ small. Even as research projects
happen on the scale of months rather than hours, training for the Putnam
contest will also build many of the skills needed in research.

Also, there is free lunch between the two parts of the exam (which are
conveniently timed 9:00--12:00 AM and 2:00--5:00 PM).

\subsubsection{Can problem-solving be learned?}

Problem-solving is a vast and open-ended skillset. There is no way to master
it; you can only get better and better at it. However, many of the most useful
skills are the easiest to pick up. This course will familiarize you with some
of the most frequently used techniques, as well as some topics that are not
commonly covered in other classes. It does not replace any course on linear
algebra, analysis, abstract algebra, combinatorics or probability theory (five
mainstays of the Putnam contest), but it covers some minor theories off the
beaten path.

We will learn problem-solving by solving problems and discussing the
solutions. In particular, the problems of old Putnam contests are a good
source of training problems, but we cast our net wider and also use other
contests, journals, etc.. No two contests are completely alike, and in
particular the Putnam has a certain set of pecularities\footnote{Compared to
other contests, it is characterized by its aggressive time limit, as well as
the presence of \textquotedblleft university mathematics\textquotedblright%
\ (analysis, probability, some basic abstract algebra) and the near-absence of
elementary geometry.}, so you will want to familiarize yourself with the last
few decades of Putnam\footnote{Older problems (prior to ca. 1980, I guess) are
less useful, as the focus of the contest has shifted over time.}. Good sources
for this are the books \cite{KePoVa01} and \cite{KKKO20} as well as Kiran
Kedlaya's problem archive ( \url{https://kskedlaya.org/putnam-archive/} ).
Also, Gelca's and Andreescu's book \cite{GelAnd17} is a training resource
specifically tailored at the Putnam contest and is highly recommended.

This year, the main focus of this course is \emph{problem-solving strategies},
i.e., heuristics and techniques for solving nontrivial problems. In some other
years, I teach a different version of this course, which focuses more on
\emph{knowledge}, specifically on some of the \textquotedblleft
mini-theories\textquotedblright\ that frequently come useful in competitions
but are not part of the typical undergraduate curriculum. Notes for the latter
version can be found at \cite{20f}. There is significant overlap between the
two versions (some things are too important to miss), but the notes are
different enough to be worth a look. A bunch of other texts are cited in
\cite{20f}, but let me recommend a few more here:

\begin{itemize}
\item David Galvin's notes
\url{https://www3.nd.edu/~dgalvin1/43900/43900_F20/index.html} (click the
Overleaf link and compile \texttt{main.tex});

\item Richard Stanley's peculiar book \cite{Stanle20} (a good, if distracting,
bedtime read);

\item the Velleman--Wagon puzzle collections \cite{KoVeWa96} and
\cite{WagVel20};

\item Goucher's notes \cite{Gouche12} with their unconventional choice of topics;

\item Polya's classic \cite{Polya81} with its detailed study of thinking
processes and basic steps of problem-solving.
\end{itemize}

\subsubsection{Prerequisites; knowledge vs. lateral thinking}

Unlike homework, the typical contest problem does not become straightforward
just because you have learned the right topic. In fact, the ideal contest
problem is not supposed to reward expertise overly much; it is supposed to
test ingenuity and creativity, not voracious learning of fashionable subjects.
In practice, however, the typical contest problem rewards both ingenuity and
subject knowledge. The two can often be traded for one another, and even when
a problem can be solved using the former alone, the latter still tends to be
useful, e.g., by putting the right tools in one's hand or revealing certain
approaches as hopeless. It rarely hurts to know more.

What kind of knowledge can come useful in the Putnam contest? Theoretically,
any kind, but some kinds are more frequently useful.

To \textbf{understand} the problems at a Putnam, it is necessary to know the
standard undergraduate curriculum (analysis and linear algebra) and
high-school mathematics. Occasionally, problems rely on some probability
theory and abstract algebra (elementary number theory, groups, rings, fields
on the level of a first course). All of this can be learned from undergraduate
classes (albeit sometimes topics classes) and won't be the focus of this
course (although I can give some references at least on the algebraic and
combinatorial side).

\begin{fineprint}
The tougher question is what can be useful to \textbf{solve} the problems at a
Putnam. Here is a list of various topics that have been helpful over the last
5 years (2018--2022):

\begin{itemize}
\item elementary modular arithmetic $7\times$

\item generating functions $7\times$

\item degree-$2$ linear recurrences (Fibonacci sequence and its ilk, Chebyshev
polynomials) $4\times$

\item basic combinatorics (permutations, combinations, counting, finite
probabilities, etc.) $4\times$

\item complex roots of polynomials (Fundamental Theorem of Algebra,
Gauss--Lucas, etc.) $4\times$

\item basic inequalities (AM--GM, Cauchy--Schwarz, rearrangement, Jensen,
etc.) $3\times$

\item deeper modular arithmetic (quadratic residues, primitive roots etc.)
$2\times$

\item elementary combinatorial game theory (winning and losing positions)
$2\times$

\item determinantal identities beyond the basics (e.g., Vandermonde,
Cauchy--Binet, adjugate, etc.) $2\times$

\item triangle geometry $2\times$

\item Fourier transform and series $2\times$

\item geometric (i.e., non-discrete) probability $2\times$

\item symmetric polynomials (e.g. Newton identities) $1\times$

\item advanced linear algebra (e.g., positive definiteness, orthogonal
matrices) $1\times$

\item differential equations $1\times$

\item complex analysis (maximum principle, Cauchy integral, etc.) $1\times$

\item Lagrange multipliers $1\times$

\item elementary group theory $1\times$

\item binomial coefficient manipulations $1\times$

\item trigonometric identities $1\times$
\end{itemize}

(I have made this table by skimming Kedlaya's solutions for the $60$ problems
of the Putnam contests 2018--2022. The symbol \textquotedblleft$k\times
$\textquotedblright\ means that $k$ out of the $60$ problems have solutions
using the respective topic. Expect some bias, since Kedlaya likes some topics
more than others. Note that many problems have several different solutions,
and often some of them use advanced techniques while others are elementary.
Many problems can be solved with basic knowledge, but become much easier with
advanced theories.)
\end{fineprint}

\begin{noncompile}
Strategies

TODO: Race against the clock? Focus on A1/B1 or try all problems?

Write down your proof in the shortest form in which it can be checked. Don't
bother explaining how you find it; focus on justifying that it is true. You
can invent notation, words and abbreviations (\textquotedblleft Let `rat' mean
`rational number\textquotedblright' is totally worth it if you use the word
often), as long as you define it.
\end{noncompile}

\subsubsection{The format of our weekly worksheets}

This worksheet (and most future worksheets) consists of

\begin{itemize}
\item a reading section (with a few example problems that are discussed in
detail) to be read at home,

\item a discussion section (with some more problems) to be thought about
briefly and then discussed in class, and

\item a homework section (with some more problems) to be attempted at home.
\end{itemize}

Solving a nontrivial problem requires both ingenuity and luck, so I don't
expect you to solve everything. For example, this worksheet has 10 homework
problems, but you are only expected to solve 5. (But try them all!)

\subsection{Example problems}

We begin with comparably easy problems. On the Putnam contest, the problems in
each 3-hour session are sorted by difficulty, so the easiest problems are A1
and B1 (that is, the first problems of each session), the next-easiest ones
are A2 and B2, and so on until A6 and B6. At least this is true in theory.
More often than not, the problem committee has a strange idea of what is easy
and what is hard, and your mileage will differ significantly. More
importantly, a medium-difficulty problem on your favorite subject will often
be easier (for you!) than an easy problem on a topic you have never studied.
There are quite a few A1/B1 problems that I have never figured out on my own;
there are also A6/B6 problems I solved without much trouble. You should expect
surprises like this as well. Don't waste the whole exam struggling with an A1;
think about the other problems too!

\subsubsection{Experiment and discover}

The simplest problem-solving strategy of all is to \emph{experiment and
discover}\footnote{sometimes abbreviated \textquotedblleft
FAFO\textquotedblright}. This takes many forms and pervades all sciences; it
is the only way to discover something really novel. Nevertheless, it is often
forgotten and disused. In concrete situations, \textquotedblleft experiment
and discover\textquotedblright\ can mean any of the following:

\begin{itemize}
\item If you need to study a sequence of numbers, you compute the first few
entries of this sequence (as many as you can comfortably compute) and try to
spot patterns in these entries. Then you can try to prove these patterns.

\item If you have a problem (say) about the number $500$, you first try to
solve the analogous problem for the number $3$ or the number $5$ or (better)
for all small numbers for which you can solve it. Then you analyze the results
and the ideas used in these small cases, and try to transfer them back to the
case of $500$.

\item Modify (\textquotedblleft mutate\textquotedblright) the problem to make
it simpler, and see what you can say about the resulting modified problem(s).
For instance, if your problem involves a product, you can replace this product
by a sum. If your problem is about three-dimensional geometry, you can try to
state and solve a two-dimensional analogue. There is no guarantee that solving
the modified problem will help solve the original one, but it often serves as
a manageable first step.

\item If you must solve a system of equations in (say) three variables
$x,y,z$, you can first try to solve it under extra requirements such as $x=0$
or $x=1$ or $x=y$. This rarely finds you all solutions, but often gives you
the first few.
\end{itemize}

The following exercises provide some examples for these.

\begin{exercise}
Let $\left(  a_{0},a_{1},a_{2},\ldots\right)  $ be a sequence of real numbers
defined recursively by $a_{0}=4$ and $a_{1}=1$ and%
\[
a_{n}=\dfrac{1+a_{n-1}}{a_{n-2}}\ \ \ \ \ \ \ \ \ \ \text{for all }n\geq2.
\]
Find $a_{1000}$.
\end{exercise}

\begin{proof}
[Solution idea.]This is clearly a finite problem (all we need is to compute
$a_{0},a_{1},a_{2},\ldots,a_{1000}$ in order, using the recursion given). A
computer could do this in a second. But we are not computers and don't have
any available at an exam. So we need to find a trick, e.g., a pattern in the
sequence that makes it easier to compute.

To find a pattern, we compute the first few entries of our sequence:%
\[%
\begin{tabular}
[c]{|c||c|c|c|c|c|c|c|c|c|}\hline
$n$ & $0$ & $1$ & $2$ & $3$ & $4$ & $5$ & $6$ & $7$ & $8$\\\hline
$a_{n}$ & $4$ & $1$ & $\dfrac{1}{2}$ & $\dfrac{3}{2}$ & $5$ & $4$ & $1$ &
$\dfrac{1}{2}$ & $\dfrac{3}{2}$\\\hline
\end{tabular}
\ \ \ \ .
\]
The pattern should now be clear: The sequence is $5$-periodic, i.e., repeats
itself every $5$ entries. In other words, $a_{n+5}=a_{n}$ for each $n\geq0$.
Once noticed, this is straightforward to prove: If we set $u:=a_{n}$ and
$v:=a_{n+1}$ (for a given $n\geq0$), then our recursion yields%
\begin{align*}
a_{n+2}  &  =\dfrac{1+a_{n+1}}{a_{n}}=\dfrac{1+v}{u};\\
a_{n+3}  &  =\dfrac{1+a_{n+2}}{a_{n+1}}=\dfrac{1+\dfrac{1+v}{u}}{v}%
=\dfrac{1+u+v}{uv};\\
a_{n+4}  &  =\dfrac{1+a_{n+3}}{a_{n+2}}=\dfrac{1+\dfrac{1+u+v}{uv}}{\left(
\dfrac{1+v}{u}\right)  }=\dfrac{1+u+v+uv}{v\left(  1+v\right)  };\\
a_{n+5}  &  =\dfrac{1+a_{n+4}}{a_{n+3}}=\dfrac{1+\dfrac{1+u+v+uv}{v\left(
1+v\right)  }}{\left(  \dfrac{1+u+v}{uv}\right)  }=\dfrac{\left(
1+u+v+uv+v\left(  1+v\right)  \right)  u}{\left(  1+u+v\right)  \left(
1+v\right)  }\\
&  =\dfrac{\left(  1+u+2v+uv+v^{2}\right)  u}{1+u+2v+uv+v^{2}}%
\ \ \ \ \ \ \ \ \ \ \left(  \text{by expanding the products}\right) \\
&  =u\ \ \ \ \ \ \ \ \ \ \left(  \text{by cancellation}\right) \\
&  =a_{n},
\end{align*}
which is exactly what we wanted\footnote{You can simplify the above
computation by observing that the numerator $1+u+v+uv$ of $a_{n+4}$ can be
factored as $\left(  1+u\right)  \left(  1+v\right)  $, so that $1+v$ can be
cancelled from the fraction and we obtain $a_{n+4}=\dfrac{1+u}{v}$. But I
deliberately avoided this shortcut to stress that no ingenuity was needed in
our proof.}. (Note that we did not use the starting values $a_{0}=4$ and
$a_{1}=1$ in this computation; thus, the $5$-periodicity $a_{n+5}=a_{n}$ holds
for \textbf{any} choice of starting values $a_{0}$ and $a_{1}$, as long as the
sequence is well-defined\footnote{How could the sequence not be well-defined?
Well, the recursion $a_{n}=\dfrac{1+a_{n-1}}{a_{n-2}}$ requires dividing by
$a_{n-2}$, and this fails if $a_{n-2}=0$. This happens, e.g., if we pick our
starting values to be $a_{0}=1$ and $a_{2}=-1$ (in which case $a_{4}$ will
fail to exist, and thus the sequence won't be well-defined).}. This phenomenon
is known as the \emph{Lyness 5-cycle}.)

Anyway, this was great but let us not forget to solve the exercise. It asks us
to compute $a_{1000}$. The $5$-periodicity of our sequence yields that for
every $n\geq0$, we have%
\[
a_{n}=a_{n-5}=a_{n-10}=a_{n-15}=\cdots=a_{n-5q},
\]
where $5q$ is the largest (integer) multiple of $5$ that can be subtracted
from $n$ without going negative. Of course, the $n-5q$ in this equality is
nothing other than the remainder of $n$ upon division by $5$; thus, we obtain%
\[
a_{n}=a_{n\%5}\ \ \ \ \ \ \ \ \ \ \text{for every }n\geq0,
\]
where $n\%5$ is the remainder of $n$ upon division by $5$. Applying this to
$n=1000$, we find%
\begin{align*}
a_{1000}  &  =a_{1000\%5}=a_{0}\ \ \ \ \ \ \ \ \ \ \left(  \text{since
}1000\%5=0\right) \\
&  =4.
\end{align*}

\end{proof}

\begin{exercise}
The \emph{Triscal triangle} is an infinite triangle-shaped table of integers,
which looks as follows:%
\[%
\begin{array}
[c]{ccccccccc}
&  &  &  & 1 &  &  &  & \\
&  &  & 1 & 1 & 1 &  &  & \\
&  & 1 & 2 & 3 & 2 & 1 &  & \\
& 1 & 3 & 6 & 7 & 6 & 3 & 1 & \\
1 & 4 & 10 & 16 & 19 & 16 & 10 & 4 & 1\\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots
\end{array}
\]
(going on forever in the western, eastern and southern directions). It is
defined as follows: At its apex lies the single integer $1$. Each further
entry is defined to be the sum of the three closest entries of the row above
it (i.e., of the entry immediately north of it, the entry immediately
northwest of it, and the immediately northeast of it). (If one of these three
entries is not present, we count it as a $0$.) For example, the fourth entry
of the fifth row is $3+6+7=16$, whereas the third entry of the fourth row is
$1+2+3=6$.

The first two rows of the triangle consist entirely of odd entries. Does any
other row of this triangle have this property?

\flushright( \url{https://math.stackexchange.com/questions/2693839} )
\end{exercise}

\begin{proof}
[Solution idea.]First, some context. You might be familiar with \emph{the
Pascal triangle}, which is a triangular table of integers in which every entry
(except for the $1$ at the apex) is the sum of the two closest entries in the
row above it. This triangle (or, rather, its first $6$ rows) looks as follows:%
\[%
\begin{tabular}
[c]{ccccccccccc}
&  &  &  &  & $1$ &  &  &  &  & \\
&  &  &  & $1$ &  & $1$ &  &  &  & \\
&  &  & $1$ &  & $2$ &  & $1$ &  &  & \\
&  & $1$ &  & $3$ &  & $3$ &  & $1$ &  & \\
& $1$ &  & $4$ &  & $6$ &  & $4$ &  & $1$ & \\
$1$ &  & $5$ &  & $10$ &  & $10$ &  & $5$ &  & $1$%
\end{tabular}
\ \ \ \ .
\]
It is thus a simpler analogue of the Triscal triangle. It is famous for
\href{https://en.wikipedia.org/wiki/Pascals_triangle}{its myriad properties},
including the explicit formula $\dbinom{n}{k}=\dfrac{n!}{k!\left(  n-k\right)
!}$ for its entries.

Unfortunately, none of this is helpful for the problem at hand. There is no
explicit formula for the entries of the Triscal triangle\footnote{The simplest
way to express the $\left(  k+1\right)  $-st entry in the $\left(  n+1\right)
$-st row of the Triscal triangle is $\sum_{j=0}^{k}\dbinom{n}{j}\dbinom
{j}{k-j}$. This is too complicated to be helpful.}. Also, the claim of the
exercise would be false for the Pascal triangle, as its $1$-st, $2$-nd,
$4$-th, $8$-th and $16$-th rows (for example) consist entirely of odd numbers.
(Do you see the pattern in this sequence? Try to prove it; it's another nice problem!)

Anyway, this is a good example of a useless analogy; the Triscal triangle is
genuinely different from the Pascal one in this regard. Following this thread
just wastes your time (and the more you know about the Pascal triangle, the
more time you waste).

So let us start from scratch and experiment directly on the Triscal triangle.
We can easily compute some further rows of it, but we can make this even
easier with a simple trick: We don't need the entries themselves; we only need
to know their parities. (The \emph{parity} of an integer $m$ is the
information whether $m$ is even or odd.) To do so, we write \textquotedblleft%
$e$\textquotedblright\ for an even integer and \textquotedblleft%
$o$\textquotedblright\ for an odd integer. Then, we have $o+o=e$ (by which we
mean that the sum of two odd integers is always even) and $o+e=o$ and $e+o=o$
and $e+e=e$. Thus, in order to find out the parity of an entry, we only need
to know the parities of the three entries above it, but we don't need the
entries themselves. This lets us easily fill in several rows of the Triscal
triangle:%
\[%
\begin{array}
[c]{ccccccccccccccc}
&  &  &  &  &  &  & o &  &  &  &  &  &  & \\
&  &  &  &  &  & o & o & o &  &  &  &  &  & \\
&  &  &  &  & o & e & o & e & o &  &  &  &  & \\
&  &  &  & o & o & e & o & e & o & o &  &  &  & \\
&  &  & o & e & e & e & o & e & e & e & o &  &  & \\
&  & o & o & o & e & o & o & o & e & o & o & o &  & \\
& o & e & o & e & e & e & o & e & e & e & o & e & o & \\
o & o & e & o & o & e & o & o & o & e & o & o & e & o & o
\end{array}
\ \ .
\]
You may see some patterns already, and prove the one or the other quite
easily\footnote{For example, you should see that the middle entry of each row
is odd. Do you see why?}. But let us focus on the problem. As we recall, we
need to see whether some row of this triangle (besides the first two) consists
entirely of odd entries. The first two rows do, but it appears that they are
the only ones: In each further row, we can easily find an even entry (i.e., an
\textquotedblleft$e$\textquotedblright). Namely, the $3$-rd, $5$-th and $7$-th
rows\footnote{From a mathematically erudite point of view, it would be better
to count the rows from $0$ (thus placing the apex in the $0$-th row instead of
the $1$-st row). But it does not help in this particular problem, so let us
not change horses mid-ride.} begin with\footnote{\textquotedblleft Begin with
$oe$\textquotedblright\ means that the first two entries of these rows (from
west to east) are $o$ and $e$.} $oe$ (so that their second entries are already
even), whereas the $4$-th and $8$-th rows begin with $ooe$, and the sixth row
begins with $oooe$. In either case, we find an $e$ (that is, an even entry)
among the first four entries of the row; thus, we never need to go beyond the
fourth entry in a row. Hence, we can drop these later entries, and obtain the
following picture:
\[%
\begin{array}
[c]{ccccccccc}
&  &  &  &  &  &  & o & \\
&  &  &  &  &  & o & o & o\\
&  &  &  &  & o & e & o & e\\
&  &  &  & o & o & e & o & \\
&  &  & o & e & e & e &  & \\
&  & o & o & o & e &  &  & \\
& o & e & o & e &  &  &  & \\
o & o & e & o &  &  &  &  &
\end{array}
\ \ .
\]
Now we see a periodicity pattern: The sequence of the first four entries in a
row repeats every $4$ rows! Specifically, we observe that for each positive
integer $k$,

\begin{itemize}
\item the $\left(  4k\right)  $-th row begins with $ooeo$;

\item the $\left(  4k+1\right)  $-th row begins with $oeee$;

\item the $\left(  4k+2\right)  $-th row begins with $oooe$;

\item the $\left(  4k+3\right)  $-th row begins with $oeoe$.
\end{itemize}

(You might have to compute a few more rows to spot this pattern, but computing
them is easy.)

Having discovered this pattern, we can prove it quickly: If the first four
entries of a certain row are $a,\ b,\ c,\ d$, then the first entries of the
next row are $a,\ a+b,\ a+b+c,\ b+c+d$ (by the construction of the triangle).
In particular, the latter four entries are fully determined by the former
four. Therefore,

\begin{itemize}
\item if a row begins with $ooeo$, then the next row begins with $oeee$ (since
$o=o$, $o+o=e$, $o+o+e=e$ and $o+e+o=e$);

\item if a row begins with $oeee$, then the next row begins with $oooe$ (for
similar reasons);

\item if a row begins with $oooe$, then the next row begins with $oeoe$ (for
similar reasons);

\item if a row begins with $oeoe$, then the next row begins with $ooeo$ (for
similar reasons).
\end{itemize}

\noindent Since the $3$-rd row of our triangle begins with $oeoe$, we thus
conclude (by applying the above four bullet points) that the $4$-th begins
with $ooeo$, the $5$-th begins with $oeee$, the $6$-th begins with $oooe$, the
$7$-th begins again with $oeoe$, and so on periodically.

\begin{noncompile}
if we find two rows that begin with the same first four entries (more
precisely: the same parities of the first four entries), then the respective
next rows will also begin with the same first four entries, and therefore the
same will hold for the rows after them, and so on ad infinitum.

Thus, once we check (and this is straightforward) that the fourth, fifth,
sixth, seventh and eighth rows begin with $oeoe,\ ooeo,\ oeee,\ oooe,\ oeoe$,
respectively, we can conclude that all the rows after them will begin with the
same prefixes (i.e., the prefixes will repeat themselves every four rows).
\end{noncompile}

In particular, each of these rows will have an \textquotedblleft%
$e$\textquotedblright\ (that is, an even entry) among its first four entries.
Therefore, it cannot consist entirely of odd entries. We thus have shown that
the Triscal triangle has no row that consists entirely of odd entries, except
for its first two rows.
\end{proof}

The above two exercises show the power of periodicity patterns. Not every
pattern is a periodicity. Here is another problem on number sequences that
gives in to pattern analysis:

\begin{exercise}
\label{exe.fafo.derange-div}Let $\left(  u_{0},u_{1},u_{2},\ldots\right)  $ be
a sequence of integers such that every $n\geq1$ satisfies
\[
u_{n}=nu_{n-1}+\left(  -1\right)  ^{n}.
\]
Prove that $u_{n}$ is divisible by $u_{n-1}+u_{n-2}$ for each $n\geq2$.

\flushright(After an idea of Euler, 1779)
\end{exercise}

\begin{proof}
[Solution idea.]In other words, we must prove that the fraction $\dfrac{u_{n}%
}{u_{n-1}+u_{n-2}}$ is an integer for each $n\geq2$. Maybe we can explicitly
compute this fraction?

First, let us set $s:=u_{0}$. Then, the recursion lets us easily compute the
first few entries of our sequence:%
\[%
\begin{tabular}
[c]{|c||c|c|c|c|c|c|c|}\hline
$n$ & $0$ & $1$ & $2$ & $3$ & $4$ & $5$ & $6$\\\hline
$u_{n}$ & $s$ & $s-1$ & $2s-1$ & $6s-4$ & $24s-15$ & $120s-76$ &
$720s-455$\\\hline
\end{tabular}
\ \ \ \ \ .
\]
Let us also divide them by $u_{n-1}+u_{n-2}$ and see what comes out:%
\[%
\begin{tabular}
[c]{|c||c|c|c|c|c|c|c|}\hline
$n$ & $0$ & $1$ & $2$ & $3$ & $4$ & $5$ & $6$\\\hline
$\dfrac{u_{n}}{u_{n-1}+u_{n-2}}$ &  &  & $1$ & $2$ & $3$ & $4$ & $5$\\\hline
\end{tabular}
\ \ \ \ \ .
\]


Could it be any more obvious? We suspect that $\dfrac{u_{n}}{u_{n-1}+u_{n-2}%
}=n-1$. In other words, we suspect that%
\begin{equation}
u_{n}=\left(  n-1\right)  \left(  u_{n-1}+u_{n-2}\right)
\ \ \ \ \ \ \ \ \ \ \text{for each }n\geq2. \label{sol.fafo.derange-div.1}%
\end{equation}


It remains to prove this equality.

Indeed, fix $n\geq2$. Since the equality we want to prove involves the three
terms $u_{n}$, $u_{n-1}$ and $u_{n-2}$, it appears reasonable to apply the
recursive definition of our sequence once to $n$, obtaining%
\begin{equation}
u_{n}=nu_{n-1}+\left(  -1\right)  ^{n}, \label{sol.fafo.derange-div.2}%
\end{equation}
and once again to $n-1$, obtaining%
\begin{equation}
u_{n-1}=\left(  n-1\right)  u_{n-2}+\left(  -1\right)  ^{n-1}.
\label{sol.fafo.derange-div.3}%
\end{equation}
Wouldn't it be nice if we could obtain (\ref{sol.fafo.derange-div.1}) from
(\ref{sol.fafo.derange-div.2}) and (\ref{sol.fafo.derange-div.3}) by a bit of algebra?

Well, we can try. Ultimately, (\ref{sol.fafo.derange-div.2}) and
(\ref{sol.fafo.derange-div.3}) are two linear equations in the three variables
$u_{n},\ u_{n-1},\ u_{n-2}$, whereas (\ref{sol.fafo.derange-div.1}) is another
linear equation in the same variables. Linear algebra provides a surefire way
(using Gaussian elimination) to check whether one linear equation follows from
a set of others. We can also just try to cancel the $\left(  -1\right)  ^{n}$
in (\ref{sol.fafo.derange-div.2}) against the $\left(  -1\right)  ^{n-1}$ in
(\ref{sol.fafo.derange-div.3}). Either way, we find the following:

Adding the equalities (\ref{sol.fafo.derange-div.2}) and
(\ref{sol.fafo.derange-div.3}) together, we obtain%
\begin{align*}
u_{n}+u_{n-1}  &  =\left(  nu_{n-1}+\left(  -1\right)  ^{n}\right)  +\left(
\left(  n-1\right)  u_{n-2}+\left(  -1\right)  ^{n-1}\right) \\
&  =nu_{n-1}+\left(  n-1\right)  u_{n-2}+\underbrace{\left(  -1\right)
^{n}+\left(  -1\right)  ^{n-1}}_{\substack{=0\\\text{(since }\left(
-1\right)  ^{n}=-\left(  -1\right)  ^{n-1}\text{)}}}\\
&  =nu_{n-1}+\left(  n-1\right)  u_{n-2}.
\end{align*}
Now, subtracting $u_{n-1}$ from this equality, we obtain%
\[
u_{n}=nu_{n-1}+\left(  n-1\right)  u_{n-2}-u_{n-1}=\left(  n-1\right)  \left(
u_{n-1}+u_{n-2}\right)  .
\]
Thus, (\ref{sol.fafo.derange-div.1}) is proven, and the claim of the problem follows.
\end{proof}

\subsubsection{Giving names, algebraization}

Mathematical problems are often stated in words. Even when these verbal
descriptions are unambiguous and clear, it is often helpful to restate them in
algebraic symbols, simply for the reason that such symbols can be
algebraically manipulated (a craft you have been practicing since your high
school days). I call this strategy \emph{algebraization}. In school, it
manifests itself as the \textquotedblleft call the knowns $a,b,c,\ldots$ and
the unknowns $x,y,z,\ldots$\textquotedblright\ method for solving word
problems. In contest mathematics, it becomes a more sophisticated and creative
undertaking, as you get to decide which objects to give names, what names to
give them, how to order and organize them, etc.. Some choices end up more
useful than others.

Algebraization is an art that cannot be fully learned, but let me give some examples.

\begin{exercise}
\label{exe.algize.nn}Let $n$ be an even positive integer. Write the numbers
$1,2,\ldots,n^{2}$ in the squares of an $n\times n$ grid in such a way that
the numbers in the $k$-th row, from left to right, are%
\[
\left(  k-1\right)  n+1,\ \ \left(  k-1\right)  n+2,\ \ \ldots,\ \ \left(
k-1\right)  n+n.
\]
Assume that the squares of the grid are colored in black and white, making
sure that each row has exactly $\dfrac{n}{2}$ black squares and each column
has exactly $\dfrac{n}{2}$ white squares. (For instance, the usual chessboard
coloring satisfies this requirement, but so do some other colorings.)

Prove that the sum of the numbers in the white squares is equal to the sum of
the numbers in the black squares. \flushright(62nd Putnam contest 2001,
Problem B1)
\end{exercise}

\begin{proof}
[Solution idea.]How can we algebraize the choice of black and white squares?
The simplest way would be to give a name to the set of all squares (let's call
it $S$), and to give a name to the set of all black squares (let's call it
$B$), so that the set of all white squares becomes $S\setminus B$ (the set
difference of $S$ and $B$).

This can be useful, but there is a better way: First, we identify each square
with a pair $\left(  i,j\right)  $ of two integers $i,j\in\left\{
1,2,\ldots,n\right\}  $ (namely, we let $\left(  i,j\right)  $ stand for the
square in the $i$-th row and the $j$-th column of our grid). Thus, the set of
all squares is just the set of all such pairs. Next, for any $i,j\in\left\{
1,2,\ldots,n\right\}  $, we define a number%
\[
a_{i,j}:=%
\begin{cases}
1, & \text{if the square }\left(  i,j\right)  \text{ is black};\\
0, & \text{if the square }\left(  i,j\right)  \text{ is white}.
\end{cases}
\]
Thus, we have encoded our black-and-white coloring as a list of numbers
$a_{i,j}$. (We could choose the numbers differently; this would require minor
modifications in the solution that follows.)

Why is this encoding useful? For one, it lets us reformulate the assumptions
of the problem as a list of equations. Namely, for each $i\in\left\{
1,2,\ldots,n\right\}  $, the sum $\sum_{j=1}^{n}a_{i,j}$ equals the number of
all black squares in the $i$-th row (since each black square $\left(
i,j\right)  $ contributes an addend $a_{i,j}=1$ to this sum, whereas each
white square $\left(  i,j\right)  $ contributes an addend $a_{i,j}=0$ to it),
and thus equals $\dfrac{n}{2}$ (since each row has exactly $\dfrac{n}{2}$
black squares). In other words, for each $i\in\left\{  1,2,\ldots,n\right\}
$, we have\footnote{All sums in this solution range from $1$ to $n$. Thus, you
can just write $\sum_{j}$ instead of $\sum_{j=1}^{n}$, provided that you
explain this shorthand.}
\begin{equation}
\sum_{j=1}^{n}a_{i,j}=\dfrac{n}{2}. \label{sol.algize.nn.row}%
\end{equation}
Similarly, for each $j\in\left\{  1,2,\ldots,n\right\}  $, we have%
\begin{equation}
\sum_{i=1}^{n}a_{i,j}=\dfrac{n}{2}. \label{sol.algize.nn.col}%
\end{equation}


The integer written in the square $\left(  i,j\right)  $ of our grid (as
explained in the exercise) is%
\[
\left(  i-1\right)  n+j
\]
(since it is the $j$-th entry of the $i$-th row). Thus, the sum of all numbers
written in the grid is%
\[
\sum_{i=1}^{n}\ \ \sum_{j=1}^{n}\left(  \left(  i-1\right)  n+j\right)  .
\]


Furthermore, the sum of the numbers in all the black squares is%
\[
\sum_{i=1}^{n}\ \ \sum_{j=1}^{n}a_{i,j}\left(  \left(  i-1\right)  n+j\right)
\]
(because the $a_{i,j}$ factor in this sum \textquotedblleft turns
off\textquotedblright\ all the white squares\footnote{In fact, if $\left(
i,j\right)  $ is a white square, then this factor $a_{i,j}$ is $0$, and thus
renders the entire addend $a_{i,j}\left(  \left(  i-1\right)  n+j\right)  $
equal to $0$. Meanwhile, if $\left(  i,j\right)  $ is a black square, then
this factor $a_{i,j}$ is $1$, and thus the addend $a_{i,j}\left(  \left(
i-1\right)  n+j\right)  $ is just $\left(  i-1\right)  n+j$, which is the
number written in the square $\left(  i,j\right)  $. Thus, the sum $\sum
_{i=1}^{n}\ \ \sum_{j=1}^{n}a_{i,j}\left(  \left(  i-1\right)  n+j\right)  $
includes all the numbers written in the black squares, and has a $0$ for each
white square.}). If we can compute these two sums, then we can also compute
the sum of the numbers in all the white squares (as this is just the sum of
all numbers minus the sum of the numbers in all the black squares), and
compare it with the black sum; hopefully this will solve the exercise.

Let me compute the sum of the numbers in all the black squares, since this sum
is the harder one. It equals%
\begin{align}
&  \sum_{i=1}^{n}\ \ \underbrace{\sum_{j=1}^{n}a_{i,j}\left(  \left(
i-1\right)  n+j\right)  }_{\substack{=\sum_{j=1}^{n}a_{i,j}\left(  i-1\right)
n+\sum_{j=1}^{n}a_{i,j}j\\\text{(by the standard rule }\sum_{j=1}^{n}\left(
u_{j}+v_{j}\right)  =\sum_{j=1}^{n}u_{j}+\sum_{j=1}^{n}v_{j}\\\text{for finite
sums)}}}\ \ \ \ \ \ \ \ \ \ \left(  \text{as we saw above}\right) \nonumber\\
&  =\sum_{i=1}^{n}\left(  \sum_{j=1}^{n}a_{i,j}\left(  i-1\right)
n+\sum_{j=1}^{n}a_{i,j}j\right) \nonumber\\
&  =\sum_{i=1}^{n}\ \ \sum_{j=1}^{n}a_{i,j}\left(  i-1\right)  n+\sum
_{i=1}^{n}\ \ \sum_{j=1}^{n}a_{i,j}j\nonumber\\
&  =\sum_{i=1}^{n}\ \ \sum_{j=1}^{n}a_{i,j}\left(  i-1\right)  n+\sum
_{j=1}^{n}\ \ \sum_{i=1}^{n}a_{i,j}j\nonumber\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{here, we interchanged the third and fourth}\\
\text{summation signs (i.e., we used the summation}\\
\text{rule }\sum_{i=1}^{n}\ \ \sum_{j=1}^{n}u_{i,j}=\sum_{j=1}^{n}%
\ \ \sum_{i=1}^{n}u_{i,j}\text{)}%
\end{array}
\right) \nonumber\\
&  =\sum_{i=1}^{n}\underbrace{\left(  \sum_{j=1}^{n}a_{i,j}\right)
}_{\substack{=\dfrac{n}{2}\\\text{(by (\ref{sol.algize.nn.row}))}}}\left(
i-1\right)  n+\sum_{j=1}^{n}\underbrace{\left(  \sum_{i=1}^{n}a_{i,j}\right)
}_{\substack{=\dfrac{n}{2}\\\text{(by (\ref{sol.algize.nn.col}))}%
}}j\nonumber\\
&  =\sum_{i=1}^{n}\dfrac{n}{2}\left(  i-1\right)  n+\sum_{j=1}^{n}\dfrac{n}%
{2}j\nonumber\\
&  =\dfrac{1}{2}\left(  \sum_{i=1}^{n}n\left(  i-1\right)  n+n\sum_{j=1}%
^{n}j\right)  . \label{sol.algize.nn.blacksum}%
\end{align}
Meanwhile, the sum of all numbers written in the grid is%
\begin{align}
&  \sum_{i=1}^{n}\ \ \underbrace{\sum_{j=1}^{n}\left(  \left(  i-1\right)
n+j\right)  }_{\substack{=\sum_{j=1}^{n}\left(  i-1\right)  n+\sum_{j=1}^{n}%
j}}\ \ \ \ \ \ \ \ \ \ \left(  \text{as we saw above}\right) \nonumber\\
&  =\sum_{i=1}^{n}\left(  \sum_{j=1}^{n}\left(  i-1\right)  n+\sum_{j=1}%
^{n}j\right) \nonumber\\
&  =\sum_{i=1}^{n}\ \ \underbrace{\sum_{j=1}^{n}\left(  i-1\right)
n}_{=n\left(  i-1\right)  n}+\underbrace{\sum_{i=1}^{n}\ \ \sum_{j=1}^{n}%
j}_{=n\sum_{j=1}^{n}j}\nonumber\\
&  =\sum_{i=1}^{n}n\left(  i-1\right)  n+n\sum_{j=1}^{n}j.\nonumber
\end{align}
This is obviously twice the right hand side of (\ref{sol.algize.nn.blacksum}).
In other words, the sum of all numbers written in the grid equals twice the
sum of all numbers in the black squares. Hence, the sum of the numbers in the
white squares (which is the former sum minus the latter sum) must equal the
sum of all numbers in the black squares. The exercise is solved.

There are easier solutions, too, but the above one is very straightforward:
Once you introduce the $a_{i,j}$, the argument \textquotedblleft writes
itself\textquotedblright, as long as you remember how to manipulate sums and
how to use the $a_{i,j}$ to restrict your sums to black squares.
\end{proof}

\begin{remark}
Exercise \ref{exe.algize.nn} can be generalized:

\begin{statement}
Let $u_{1},u_{2},\ldots,u_{n}$ be $n$ real numbers, and let $v_{1}%
,v_{2},\ldots,v_{n}$ be $n$ further real numbers. Write the numbers
$u_{i}+v_{j}$ for all $i,j\in\left\{  1,2,\ldots,n\right\}  $ in the squares
of an $n\times n$-grid (putting the number $u_{i}+v_{j}$ into the square in
the $i$-th row and the $j$-th column).

Assume that the squares of the grid are colored in black and white, making
sure that each row has exactly $\dfrac{n}{2}$ black squares and each column
has exactly $\dfrac{n}{2}$ white squares.

Prove that the sum of the numbers in the white squares is equal to the sum of
the numbers in the black squares.
\end{statement}

Exercise \ref{exe.algize.nn} is the particular case for $u_{i}=\left(
i-1\right)  n$ and $v_{j}=j$. The solution we gave above can be easily adapted
to the generalization.
\end{remark}

\begin{exercise}
\label{exe.alg.shanille}Basketball star Shanille O'Keal keeps track of the
number of successful free throws she has made in her first $n$ attempts of the
season. More specifically, for every positive integer $n$, we let $S\left(
n\right)  $ denote the number of successful throws among Shanille's first $n$
throws, divided by $n$.

Early in the season, $S\left(  n\right)  $ was less than $80\%$, but by the
end of the season, $S\left(  n\right)  $ was more than $80\%$. Was there
necessarily a moment in between when $S\left(  n\right)  $ was exactly $80\%$
? \flushright(65th Putnam contest 2004, Problem A1)
\end{exercise}

\begin{proof}
[Solution idea.]First, let us guess: Is the answer \textquotedblleft
yes\textquotedblright\ or \textquotedblleft no\textquotedblright? If it is
\textquotedblleft yes\textquotedblright, then we need to prove it. If it is
\textquotedblleft no\textquotedblright, then a single counterexample (showing
a sequence of hits and misses that leads to $S\left(  n\right)  >80\%$ without
ever encountering a $S\left(  m\right)  =80\%$ moment along the way) is
sufficient. The former would make a more interesting problem than the latter,
so we suspect that the answer is \textquotedblleft yes\textquotedblright.
(This kind of reasoning is not infallible, but helps us focus on the goal more
likely to be right. Of course, you should not completely close your mind to
the other possibility.)

Next, let us translate the problem into algebra. For any nonnegative integer
$n$, we let $A\left(  n\right)  $ denote the number of successful free throws
among Shanille's first $n$ attempts. Then, $S\left(  n\right)  =\dfrac
{A\left(  n\right)  }{n}$ for all positive integers $n$. Moreover, $A\left(
n\right)  $ is a nonnegative integer, and we have $A\left(  0\right)  =0$
(since there are $0$ successful attempts among the first $0$ attempts). More
importantly, $A\left(  n\right)  $ grows either by $0$ or by $1$ with each
attempt (since a single attempt cannot result in more than one success). In
other words, for each nonnegative integer $n$, we have%
\[
A\left(  n+1\right)  =A\left(  n\right)  \text{ or }A\left(  n+1\right)
=A\left(  n\right)  +1.
\]
Thus, in particular, for each nonnegative integer $n$, we have%
\begin{equation}
A\left(  n+1\right)  \leq A\left(  n\right)  +1. \label{sol.alg.shanille.1leq}%
\end{equation}


Now, our condition says that $S\left(  n\right)  $ was $<80\%$ early in the
season but became $>80\%$ at the end of the season. In other words, there are
two positive integers $n_{1}$ and $n_{2}$ such that $n_{1}<n_{2}$ and
$S\left(  n_{1}\right)  <80\%$ and $S\left(  n_{2}\right)  >80\%$. Consider
these $n_{1}$ and $n_{2}$. (Note that $80\%$ means the number $\dfrac{80}%
{100}$; this is how mathematicians define percentages.)

Our goal (if our guess was correct) is to show that $S\left(  n\right)  =80\%$
for some $n>0$. To do so, we assume the contrary -- i.e., we assume that
$S\left(  n\right)  $ is never $80\%$. (Thus, we attempt a proof by contradiction.)

Consider the behavior of the number $S\left(  n\right)  $ as $n$ gradually
increases from $n_{1}$ by $n_{2}$ (growing by $1$ at each step). At the
beginning, $S\left(  n\right)  $ is $<80\%$ (since $S\left(  n_{1}\right)
<80\%$), but at the end, $S\left(  n\right)  $ is $\geq80\%$ (since $S\left(
n_{2}\right)  >80\%$). Hence, there must be a step in which $S\left(
n\right)  $ switches from being $<80\%$ to being $\geq80\%$ (since otherwise,
$S\left(  n\right)  $ would stay $<80\%$ forever). In other words, there
exists an $m\in\left\{  n_{1},n_{1}+1,n_{1}+2,\ldots,n_{2}-1\right\}  $ such
that%
\[
S\left(  m\right)  <80\%\text{ but }S\left(  m+1\right)  \geq80\%.
\]
Consider this $m$. (Note that there may be several $m$'s that
qualify\footnote{because $S\left(  n\right)  $ can increase, then decrease,
then increase again}, but we just pick one and stick with it.)

Note that $S\left(  m+1\right)  $ cannot be $80\%$ (since we assumed that
$S\left(  n\right)  $ is never $80\%$), and thus from $S\left(  m+1\right)
\geq80\%$ we obtain $S\left(  m+1\right)  >80\%$.

Note what we did here: Instead of sticking with the two integers $n_{1}<n_{2}$
satisfying%
\[
S\left(  n_{1}\right)  <80\%\text{ and }S\left(  n_{2}\right)  >80\%,
\]
we have found two \textbf{consecutive} integers $m<m+1$ satisfying%
\[
S\left(  m\right)  <80\%\text{ and }S\left(  m+1\right)  >80\%.
\]
This is a good step forward, since consecutive integers are more convenient to
work with and, in particular, allow us to apply (\ref{sol.alg.shanille.1leq}).

Now, let us expand the inequalities $S\left(  m\right)  <80\%$ and $S\left(
m+1\right)  >80\%$ and see what comes out.

Recall that $S\left(  m\right)  =\dfrac{A\left(  m\right)  }{m}$ (by the
definition of $S\left(  m\right)  $) and thus $\dfrac{A\left(  m\right)  }%
{m}=S\left(  m\right)  <80\%=\dfrac{80}{100}=\dfrac{4}{5}$. Cross-multiplying
by the denominators in this inequality, we find
\begin{equation}
5\cdot A\left(  m\right)  <4m. \label{sol.alg.shanille.3}%
\end{equation}


Similarly, from the inequality $S\left(  m+1\right)  >80\%$, we obtain
\begin{equation}
5\cdot A\left(  m+1\right)  >4\left(  m+1\right)  . \label{sol.alg.shanille.4}%
\end{equation}


Furthermore, both sides of the inequality (\ref{sol.alg.shanille.3}) are
integers, and thus it entails%
\begin{equation}
5\cdot A\left(  m\right)  \leq4m-1 \label{sol.alg.shanille.3-}%
\end{equation}
(because if two integers $a$ and $b$ satisfy $a<b$, then $a\leq b-1$).

\begin{noncompile}
Similarly, from (\ref{sol.alg.shanille.4}), we obtain%
\begin{equation}
5\cdot A\left(  m+1\right)  \geq4\left(  m+1\right)  +1
\label{sol.alg.shanille.4+}%
\end{equation}
(because if two integers $a$ and $b$ satisfy $a>b$, then $a\geq b+1$).
\end{noncompile}

However, (\ref{sol.alg.shanille.1leq}) (applied to $n=m$) yields $A\left(
m+1\right)  \leq A\left(  m\right)  +1$, and thus%
\begin{align*}
5\cdot\underbrace{A\left(  m+1\right)  }_{\leq A\left(  m\right)  +1}  &
\leq5\cdot\left(  A\left(  m\right)  +1\right)  =\underbrace{5\cdot A\left(
m\right)  }_{\substack{\leq4m-1\\\text{(by (\ref{sol.alg.shanille.3-}))}%
}}+\,5\\
&  \leq4m-1+5=4m+4=4\left(  m+1\right)  .
\end{align*}
This contradicts (\ref{sol.alg.shanille.4}).

\begin{noncompile}
Now, recall that if four numbers $a,b,c,d$ satisfy the inequalities $a\geq b$
and $c\leq d$, then $a-c\geq b-d$. That is, we can subtract an inequality from
another if the inequality signs point in opposite directions. Thus, we can
subtract the inequality (\ref{sol.alg.shanille.3-}) from
(\ref{sol.alg.shanille.4+}), and obtain%
\[
5\cdot A\left(  m+1\right)  -5\cdot A\left(  m\right)  \geq\left(  4\left(
m+1\right)  +1\right)  -\left(  4m-1\right)  =6.
\]
Some simplification turns this into%
\[
5\cdot\left(  A\left(  m+1\right)  -A\left(  m\right)  \right)  \geq6.
\]
In other words,
\begin{equation}
A\left(  m+1\right)  -A\left(  m\right)  \geq\dfrac{6}{5}.
\label{sol.alg.shanille.5}%
\end{equation}


However, (\ref{sol.alg.shanille.1leq}) (applied to $n=m$) yields that
$A\left(  m+1\right)  -A\left(  m\right)  \leq1<\dfrac{6}{5}$. This
contradicts (\ref{sol.alg.shanille.5}).
\end{noncompile}

This contradiction shows that our assumption was false, and hence the problem
is solved.
\end{proof}

Here are a few more tricks you can learn from the above solution:

\begin{itemize}
\item If something in a problem can be described by an integer or by a
non-integer, it is usually better to use the integer. Thus, in the above
problem, the integer $A\left(  n\right)  $ was more useful than the
non-integer $S\left(  n\right)  $, as it satisfied
(\ref{sol.alg.shanille.1leq}) and allowed us to use its integrality to get
from (\ref{sol.alg.shanille.3}) to (\ref{sol.alg.shanille.3-}).

\item If two integers $a$ and $b$ satisfy $a<b$, then $a\leq b-1$. Likewise,
if two integers $a$ and $b$ satisfy $a>b$, then $a\geq b+1$. Thus, strict
inequalities between integers can be strengthened at the cost of their
strictness. This is almost always useful when dealing with inequalities
between integers. (But of course, it would not hold for rational or real numbers.)

\item If a finite sequence of real numbers (in our above solution, these were
the numbers $S\left(  n\right)  $ for $n_{1}\leq n\leq n_{2}$) starts below a
certain threshold (in our above solution, this was $80\%$) but ends above this
threshold, then it must surpass this threshold at a certain step -- i.e., it
must contain two adjacent numbers of which the first is below the threshold
and the second is above it. (\textquotedblleft Above\textquotedblright\ should
here be understood as allowing it to \textbf{equal} the threshold. Of course,
in our above solution, we ruled this equality out by assuming that $S\left(
n\right)  $ is never $80\%$.)
\end{itemize}

\subsubsection{The via negativa (subtraction)}

The following two exercises come from completely different parts of
mathematics, but their solutions exemplify the same idea.

\begin{exercise}
\label{exe.vianeg.lunes}Consider the following picture:%
\[%
%TCIMACRO{\TeXButton{tikz lunes}{\begin{tikzpicture}[scale=2]
%\node(A) at (0, 0) {};
%\node(B) at (2, 0) {};
%\node(C) at (0, 2) {};
%\fill(A) circle (1pt) node[left] {$A$};
%\fill(B) circle (1pt) node[right] {$B$};
%\fill(C) circle (1pt) node[left] {$C$};
%\draw
%[fill=red] (2, 0) arc[radius=2, start angle=0, end angle=90] (0, 2) arc[radius=1, start angle=90, end angle=0] (1, 1) arc[radius=1, start angle=90, end angle=0];
%\draw
%[fill=blue] (1, 1) arc[radius=1, start angle=0, end angle=-90] (0, 0) arc[radius=1, start angle=180, end angle=90] ;
%\draw(2, 0) -- (0, 0) -- (0, 2);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[scale=2]
\node(A) at (0, 0) {};
\node(B) at (2, 0) {};
\node(C) at (0, 2) {};
\fill(A) circle (1pt) node[left] {$A$};
\fill(B) circle (1pt) node[right] {$B$};
\fill(C) circle (1pt) node[left] {$C$};
\draw
[fill=red] (2, 0) arc[radius=2, start angle=0, end angle=90] (0, 2) arc[radius=1, start angle=90, end angle=0] (1, 1) arc[radius=1, start angle=90, end angle=0];
\draw
[fill=blue] (1, 1) arc[radius=1, start angle=0, end angle=-90] (0, 0) arc[radius=1, start angle=180, end angle=90] ;
\draw(2, 0) -- (0, 0) -- (0, 2);
\end{tikzpicture}%
%EndExpansion
\ \ .
\]
Compare the area of the red region with that of the blue region.

(Here, $ABC$ is an isosceles right-angled triangle with right angle at $A$. We
have erected semicircles with diameters $AB$ and $AC$, both pointing into the
inside of triangle $ABC$. We have also drawn a quarter-circle with center $A$
and radius $AB=AC$ bordered by the points $B$ and $C$. The red region is
formed by removing the two semicircles from the quarter-circle. The blue
region is the (set-theoretical) intersection of the two semicircles.)
\end{exercise}

\begin{proof}
[Solution.]The two half-circles subdivide the quarter-circle into four
regions. We denote the areas of these four regions by $b,r,x,y$ in the
following way:%
\[%
%TCIMACRO{\TeXButton{tikz lunes}{\begin{tikzpicture}[scale=2]
%\node(A) at (0, 0) {};
%\node(B) at (2, 0) {};
%\node(C) at (0, 2) {};
%\fill(A) circle (1pt) node[left] {$A$};
%\fill(B) circle (1pt) node[right] {$B$};
%\fill(C) circle (1pt) node[left] {$C$};
%\draw
%(2, 0) arc[radius=2, start angle=0, end angle=90] (0, 2) arc[radius=1, start angle=90, end angle=0] (1, 1) arc[radius=1, start angle=90, end angle=0];
%\draw
%(1, 1) arc[radius=1, start angle=0, end angle=-90] (0, 0) arc[radius=1, start angle=180, end angle=90] ;
%\draw(2, 0) -- (0, 0) -- (0, 2);
%\node(area-b) at (0.5, 0.5) {$b$};
%\node(area-b) at (1.2, 1.2) {$r$};
%\node(area-b) at (0.5, 1.3) {$x$};
%\node(area-b) at (1.3, 0.5) {$y$};
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[scale=2]
\node(A) at (0, 0) {};
\node(B) at (2, 0) {};
\node(C) at (0, 2) {};
\fill(A) circle (1pt) node[left] {$A$};
\fill(B) circle (1pt) node[right] {$B$};
\fill(C) circle (1pt) node[left] {$C$};
\draw
(2, 0) arc[radius=2, start angle=0, end angle=90] (0, 2) arc[radius=1, start angle=90, end angle=0] (1, 1) arc[radius=1, start angle=90, end angle=0];
\draw
(1, 1) arc[radius=1, start angle=0, end angle=-90] (0, 0) arc[radius=1, start angle=180, end angle=90] ;
\draw(2, 0) -- (0, 0) -- (0, 2);
\node(area-b) at (0.5, 0.5) {$b$};
\node(area-b) at (1.2, 1.2) {$r$};
\node(area-b) at (0.5, 1.3) {$x$};
\node(area-b) at (1.3, 0.5) {$y$};
\end{tikzpicture}%
%EndExpansion
\ \ .
\]
\footnote{Here is how to define $b,r,x,y$ without referencing the picture: We
shall refer to the semicircle with diameter $AB$ as the \textit{lower
semicircle}. We shall refer to the semicircle with diameter $AC$ as the
\textit{upper semicircle}. Let $\mathbb{A}\left(  U\right)  $ denote the area
of any shape $U$. Now, we set%
\begin{align*}
b  &  =\mathbb{A}\left(  \left(  \text{lower semicircle}\right)  \cap\left(
\text{upper semicircle}\right)  \right)  ;\\
r  &  =\mathbb{A}\left(  \left(  \text{quarter-circle}\right)  \setminus
\left(  \left(  \text{lower semicircle}\right)  \cup\left(  \text{upper
semicircle}\right)  \right)  \right)  ;\\
x  &  =\mathbb{A}\left(  \left(  \text{upper semicircle}\right)
\setminus\left(  \text{lower semicircle}\right)  \right)  ;\\
y  &  =\mathbb{A}\left(  \left(  \text{lower semicircle}\right)
\setminus\left(  \text{upper semicircle}\right)  \right)  .
\end{align*}
} Thus, the area of the red region is $r$, whereas the area of the blue region
is $b$. We claim that $r=b$.

Indeed, let $a=\left\vert AB\right\vert =\left\vert AC\right\vert $. Thus, the
quarter-circle has radius $a$; hence, its area is $\dfrac{1}{4}\pi a^{2}$. In
other words,%
\begin{equation}
b+r+x+y=\dfrac{1}{4}\pi a^{2} \label{sol.enum.lunes-and-perms.a.1}%
\end{equation}
(since the quarter-circle has been subdivided into four regions with areas
$b,r,x,y$, and thus its area is $b+r+x+y$).

However, the lower semicircle has diameter $AB$ and thus radius $\dfrac{1}%
{2}\underbrace{\left\vert AB\right\vert }_{=a}=\dfrac{1}{2}a$. Hence, its area
is $\dfrac{1}{2}\pi\left(  \dfrac{1}{2}a\right)  ^{2}=\dfrac{1}{8}\pi a^{2}$.
In other words,
\begin{equation}
b+y=\dfrac{1}{8}\pi a^{2} \label{sol.enum.lunes-and-perms.a.2}%
\end{equation}
(since the lower semicircle has been subdivided into two regions with areas
$b$ and $y$, and thus its area is $b+y$).

A similar argument (using the upper semicircle instead of the lower one) shows
that $b+x=\dfrac{1}{8}\pi a^{2}$. Subtracting this equality from
(\ref{sol.enum.lunes-and-perms.a.1}), we obtain $\left(  b+r+x+y\right)
-\left(  b+x\right)  =\dfrac{1}{4}\pi a^{2}-\dfrac{1}{8}\pi a^{2}$. This
simplifies to $r+y=\dfrac{1}{8}\pi a^{2}$. Comparing this with
(\ref{sol.enum.lunes-and-perms.a.2}), we obtain $r+y=b+y$. Hence, $r=b$. This
solves the exercise.
\end{proof}

\begin{exercise}
\label{exe.vianeg.2}Let $a_{1},a_{2},\ldots,a_{n}$ be $n$ real numbers. Let
$b_{1},b_{2},\ldots,b_{n}$ be the same $n$ real numbers, arranged in a
different order. Let $s$ be a real number.

Let $x$ be the number of all $i\in\left\{  1,2,\ldots,n\right\}  $ such that
$a_{i}\geq s>b_{i}$. Let $y$ be the number of all $i\in\left\{  1,2,\ldots
,n\right\}  $ such that $b_{i}\geq s>a_{i}$. Prove that $x=y$.
\end{exercise}

\begin{proof}
[Solution.]An $i\in\left\{  1,2,\ldots,n\right\}  $ satisfies $a_{i}\geq
s>b_{i}$ if and only if it satisfies $a_{i}\geq s$ but not $b_{i}\geq s$
(because the inequality $s>b_{i}$ holds exactly when the inequality $b_{i}\geq
s$ does not). But the definition of $x$ shows that%
\begin{align}
x  &  =\left(  \text{the number of all }i\in\left\{  1,2,\ldots,n\right\}
\text{ such that }a_{i}\geq s>b_{i}\right) \nonumber\\
&  =\left(  \text{the number of all }i\in\left\{  1,2,\ldots,n\right\}  \text{
such that }a_{i}\geq s\text{ but not }b_{i}\geq s\right) \nonumber\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{since }i\text{ satisfies }a_{i}\geq s>b_{i}\text{ if and only if}\\
\text{it satisfies }a_{i}\geq s\text{ but not }b_{i}\geq s
\end{array}
\right) \nonumber\\
&  =\left(  \text{the number of all }i\in\left\{  1,2,\ldots,n\right\}  \text{
such that }a_{i}\geq s\right) \nonumber\\
&  \ \ \ \ \ \ \ \ \ \ -\left(  \text{the number of all }i\in\left\{
1,2,\ldots,n\right\}  \text{ such that }a_{i}\geq s\text{ and }b_{i}\geq
s\right)  \label{sol.vianeg.2.x=}%
\end{align}
(because if we want to count some objects $x$ that have some property
$\mathcal{A}\left(  x\right)  $ but not some other property $\mathcal{B}%
\left(  x\right)  $, then we can first count all objects $x$ that satisfy
$\mathcal{A}\left(  x\right)  $, and then subtract the number of those $x$
that satisfy both $\mathcal{A}\left(  x\right)  $ and $\mathcal{B}\left(
x\right)  $). An analogous computation shows that%
\begin{align}
y  &  =\left(  \text{the number of all }i\in\left\{  1,2,\ldots,n\right\}
\text{ such that }b_{i}\geq s\right) \nonumber\\
&  \ \ \ \ \ \ \ \ \ \ -\left(  \text{the number of all }i\in\left\{
1,2,\ldots,n\right\}  \text{ such that }b_{i}\geq s\text{ and }a_{i}\geq
s\right)  . \label{sol.vianeg.2.y=}%
\end{align}


However, the $n$ numbers $b_{1},b_{2},\ldots,b_{n}$ are just the $n$ numbers
$a_{1},a_{2},\ldots,a_{n}$ arranged in a different order. Thus, among the
latter $n$ numbers, there are equally many that are $\geq s$ as there are
among the former $n$ numbers. In other words,%
\begin{align*}
&  \left(  \text{the number of all }i\in\left\{  1,2,\ldots,n\right\}  \text{
such that }a_{i}\geq s\right) \\
&  =\left(  \text{the number of all }i\in\left\{  1,2,\ldots,n\right\}  \text{
such that }b_{i}\geq s\right)  .
\end{align*}
Moreover,
\begin{align*}
&  \left(  \text{the number of all }i\in\left\{  1,2,\ldots,n\right\}  \text{
such that }a_{i}\geq s\text{ and }b_{i}\geq s\right) \\
&  =\left(  \text{the number of all }i\in\left\{  1,2,\ldots,n\right\}  \text{
such that }b_{i}\geq s\text{ and }a_{i}\geq s\right)
\end{align*}
(this is trivial: the logical connective \textquotedblleft
and\textquotedblright\ is commutative). Subtracting the latter equality from
the former, we obtain%
\begin{align*}
&  =\left(  \text{the number of all }i\in\left\{  1,2,\ldots,n\right\}  \text{
such that }a_{i}\geq s\right) \\
&  \ \ \ \ \ \ \ \ \ \ -\left(  \text{the number of all }i\in\left\{
1,2,\ldots,n\right\}  \text{ such that }a_{i}\geq s\text{ and }b_{i}\geq
s\right) \\
&  =\left(  \text{the number of all }i\in\left\{  1,2,\ldots,n\right\}  \text{
such that }b_{i}\geq s\right) \\
&  \ \ \ \ \ \ \ \ \ \ -\left(  \text{the number of all }i\in\left\{
1,2,\ldots,n\right\}  \text{ such that }b_{i}\geq s\text{ and }a_{i}\geq
s\right)  .
\end{align*}
In view of (\ref{sol.vianeg.2.x=}) and (\ref{sol.vianeg.2.y=}), we can rewrite
this as $x=y$. Thus, Exercise \ref{exe.vianeg.2} is solved.
\end{proof}

What do Exercise \ref{exe.vianeg.lunes} and \ref{exe.vianeg.2} have in common?
Their solutions (at least the ones I showed above) both are instances of a
general technique, which is \emph{to view a thing as a difference of some
larger (but simpler) things}. In Exercise \ref{exe.vianeg.lunes}, we rewrote
the blue and red areas as differences of larger areas (e.g., we got to $r+y$
by subtracting $b+x$ from $b+r+x+y$, and we got $r$ by subtracting $y$ from
$r+y$). In Exercise \ref{exe.vianeg.2}, we rewrote $x$ and $y$ as differences
of larger (but simpler) numbers. Another instance of this technique is the
classical solution of the quadratic equation\footnote{To recall: In order to
solve the quadratic equation $x^{2}+bx+c=0$ (for fixed $b$ and $c$), you
rewrite $x^{2}+bx+c$ as the difference $\left(  x+\dfrac{b}{2}\right)
^{2}-\left(  \dfrac{b^{2}}{4}-c\right)  $. This is called \textquotedblleft
completing the square\textquotedblright. Likewise, our solution of Exercise
\ref{exe.vianeg.lunes} can be viewed as \textquotedblleft completing the
half-circle\textquotedblright, and in Exercise \ref{exe.vianeg.2} we have
\textquotedblleft completed the count\textquotedblright.}. I refer to this
technique as the \emph{via negativa}\footnote{This phrase originates in
Christian theology, where it meant (very roughly) defining God by describing
what God is not. It was recently repurposed by Nassim Taleb for any kind of
decision or description through elimination of undesired features, something
that has been done for millenia without an explicit name (Sherlock Holmes:
\textquotedblleft When you have eliminated the impossible, whatever remains,
however improbable, must be the truth\textquotedblright). But a moniker can
help bring it out into the foreground when it is used and remind of it when it
can come useful.}. It is used quite frequently in combinatorics when counting
things; the \emph{principle of inclusion and exclusion} (\cite[\S 7.8]{20f})
takes it to the next level, but there are various elementary examples as well
(e.g., \cite[Exercise 7.3.2]{20f}). I will not focus on enumerative
combinatorics this year, so I will not elaborate on this.

(You can view the classical computational trick $14\cdot16=15^{2}-1$ as an
instance of the via negativa as well.)

\subsubsection{A harder problem}

The final solved exercise for this worksheet is a more advanced example of
\textquotedblleft experiment and discover\textquotedblright:

\begin{exercise}
\label{exe.fafo.power2}True or False: For any even positive integer $n$, it is
possible to divide the set $\left\{  1,2,\ldots,n\right\}  $ into pairs so
that the sum of each pair is one less than a power of $2$ (that is, can be
written as $2^{m}-1$ for some nonnegative integer $m$). (Each pair must
consist of two distinct numbers, and each number in $\left\{  1,2,\ldots
,n\right\}  $ must belong to exactly one pair.)

[\textbf{Example:} For $n=6$, this can be done, and the pairs will be
$\left\{  1,6\right\}  $, $\left\{  2,5\right\}  $ and $\left\{  3,4\right\}
$.]

\flushright(\cite[Problem 23]{WagVel20})
\end{exercise}

\begin{proof}
[Solution idea.]First of all, what answer should we expect? I'd bet on
\textquotedblleft True\textquotedblright, because if the answer was
\textquotedblleft False\textquotedblright, this would not be a good contest
problem (the statement would be uninteresting, for starters). This heuristic
is not fully bulletproof (every once in a while, mischievous problem
committees will propose a plausible-looking claim that is actually false for
$n=29$), but it helps us decide whether to start trying to prove or to
disprove the claim (even if we might later redecide).

Having guessed that the answer is \textquotedblleft True\textquotedblright, we
need to actually find these pairs. Let us do this for some small values of
$n$:%
\[%
\begin{tabular}
[c]{|c|l|}\hline
$n$ & the pairs\\\hline\hline
$2$ & $\left\{  1,2\right\}  $\\\hline
$4$ & $\left\{  3,4\right\}  ,\ \left\{  1,2\right\}  $\\\hline
$6$ & $\left\{  1,6\right\}  ,\ \left\{  2,5\right\}  ,\ \left\{  3,4\right\}
$\\\hline
$8$ & $\left\{  7,8\right\}  ,\ \left\{  1,6\right\}  ,\ \left\{  2,5\right\}
,\ \left\{  3,4\right\}  $\\\hline
$10$ & $\left\{  5,10\right\}  ,\ \left\{  6,9\right\}  ,\ \left\{
7,8\right\}  ,\ \left\{  3,4\right\}  ,\ \left\{  1,2\right\}  $\\\hline
$12$ & $\left\{  3,12\right\}  ,\ \left\{  4,11\right\}  ,\ \left\{
5,10\right\}  ,\ \left\{  6,9\right\}  ,\ \left\{  7,8\right\}  ,\ \left\{
1,2\right\}  $\\\hline
\end{tabular}
\ \ \ \ .
\]
Finding these pairings is actually quite easy: You start by identifying the
partner of $n$ (you can hope that it will be unique), then you identify the
partner of $n-1$ (if it is not already \textquotedblleft
taken\textquotedblright\ by $n$), then the partner of $n-2$ (if it is not
already \textquotedblleft taken\textquotedblright\ by $n$ or $n-1$), and so
on, working your way downwards. This does not prove anything (what if some
number finds no partner?), but at least it helps us fill the above table.

Time to find some patterns in the table. One pattern you might see from the
table (it is even clearer from the method you use to construct the table) is
that if the first pair\footnote{The use of the word \textquotedblleft
pair\textquotedblright\ for a $2$-element set is a bit nonstandard (usually,
\textquotedblleft pair\textquotedblright\ means \textquotedblleft ordered
pair\textquotedblright\ in mathematics, and the two entries can be equal), but
it is excused here since the problem statement sets a precedent.} is $\left\{
k,n\right\}  $, then the next pairs will be $\left\{  k+1,n-1\right\}
,\ \left\{  k+2,n-2\right\}  ,\ \ldots$, going all the way up to $\left\{
k+\ell,n-\ell\right\}  $ where $\ell$ is the largest integer such that
$k+\ell<n-\ell$ (you cannot continue this pairing further, since that would
repeat already-existing pairs). Explicitly, this $\ell$ will be $\dfrac
{n-k-1}{2}$ (this is easy to see\footnote{\textit{Proof.} The inequality
$k+\ell<n-\ell$ is equivalent to $\ell<\dfrac{n-k}{2}$ (this is just
high-school algebra). Thus, the largest integer $\ell$ for which it holds is
either $\dfrac{n-k-1}{2}$ or $\dfrac{n-k-2}{2}$, depending on whether $n-k$ is
odd or even. It remains to show that $n-k$ is odd.
\par
To show this, we recall that $\left\{  k,n\right\}  $ is a pair, so that we
have $k+n=2^{m}-1$ for some $m>0$ (why?). Thus, $k+n$ is odd (since $2^{m}$ is
even), and therefore $n-k$ is odd as well (since $n-k=\underbrace{k+n}%
_{\text{odd}}-\underbrace{2k}_{\text{even}}$). This is what we needed to
prove.}). Thus, the last pair constructed so far will be $\left\{
\dfrac{n+k-1}{2},\ \dfrac{n+k+1}{2}\right\}  $, and altogether we have paired
up the numbers $k,\ k+1,\ k+2,\ \ldots,\ n$. It remains to pair up the
remaining numbers $1,2,\ldots,k-1$. Fortunately, $k-1$ is
even\footnote{\textit{Proof.} We already found that $n-k$ is odd. Since $n$ is
even, this entails that $k$ is odd. Hence, $k-1$ is even.}. Thus, to pair up
$1,2,\ldots,k-1$ is an instance of the same problem we are solving, but with
the number $k-1$ instead of $n$ (unless $k-1=0$, in which case we have nothing
left to do). Thus, we have reduced our problem to a simpler variant thereof,
in which the number $n$ is replaced by the smaller number $k-1$. This yields a
recursive algorithm for finding our pairing.

We still need to check one thing: We need to make sure that the partner of $n$
can be found. In other words, we must prove that there exists some
$k\in\left\{  1,2,\ldots,n-1\right\}  $ such that $k+n$ is one less than a
power of $2$. What is this $k$ ? Let us again make a table and try to identify
a pattern:%
\[%
\begin{tabular}
[c]{|c||c|c|c|c|c|c|c|c|c|c|c|c|}\hline
$n$ & $2$ & $4$ & $6$ & $8$ & $10$ & $12$ & $14$ & $16$ & $18$ & $20$ & $22$ &
$24$\\\hline
$k$ & $1$ & $3$ & $1$ & $7$ & $5$ & $3$ & $1$ & $15$ & $13$ & $11$ & $9$ &
$7$\\\hline
\end{tabular}
\ \ \ \ \ \ \ .
\]
Again, there is a visible pattern here: If $n$ itself is a power of $2$, then
$k=n-1$. Then, as $n$ increases, the respective $k$ decreases by the same
amount (e.g., as $n$ grows from $16$ to $18$, the respective $k$ falls from
$15$ to $13$), until $n$ hits the next power of $2$. This can be restated
explicitly: If $2^{m}$ is the largest power of $2$ that satisfies $2^{m}\leq
n$, then
\begin{equation}
k=2^{m}-1-\left(  n-2^{m}\right)  . \label{sol.fafo.power2.k=}%
\end{equation}
Once this formula has been guessed, it is easy to verify that it works: If we
define $k$ by (\ref{sol.fafo.power2.k=}), then%
\[
k+n=2^{m}-1-\left(  n-2^{m}\right)  +n=\underbrace{2\cdot2^{m}}_{=2^{m+1}%
}-1=2^{m+1}-1
\]
is clearly one less than a power of $2$, so that $\left\{  k,n\right\}  $ is a
valid pair. (You also have to check that this $k$ belongs to $\left\{
1,2,\ldots,n-1\right\}  $, but this is easy\footnote{\textit{Proof.} Since
$2^{m}$ is the largest power of $2$ that satisfies $2^{m}\leq n$, we have
$2^{m+1}>n$ (otherwise, $2^{m+1}$ would be an even larger power of $2$
satisfying the same inequality). Dividing this inequality by $2$, we obtain
$2^{m}>n/2$. Since $2^{m}$ and $n/2$ are both integers (indeed, $n/2$ is an
integer since $n$ is even), we thus obtain $2^{m}\geq n/2+1$. Now,%
\[
k=2^{m}-1-\left(  n-2^{m}\right)  =2\cdot\underbrace{2^{m}}_{\geq
n/2+1}-1-n\geq2\left(  n/2+1\right)  -1-n=1
\]
and
\[
k=2^{m}-1-\left(  n-2^{m}\right)  =2\cdot\underbrace{2^{m}}_{\leq n}%
-1-n\leq2n-1-n=n-1.
\]
Combining these two inequalities, we find $k\in\left\{  1,2,\ldots
,n-1\right\}  $.}.)

Thus, we have solved the exercise, although we still need to write up our
solution neatly. This should not be neglected: A good writeup of a proof is
often \textbf{not} the same as a good explanation of the thought process by
which the proof was found. The latter can involve detours, leaps of faith and
experiments, while the former should be streamlined, fully justified at each
step (never leave the reader waiting for a justification!) and free of
unnecessary information. When writing up a proof, it is unnecessary (and often
inadvisable) to motivate each step heuristically, but it is important to make
sure that each claim is fully justified using the previous claims.

Let us transform our above solution to Exercise \ref{exe.fafo.power2} into
such a clean writeup. This requires us to essentially read it backwards: First
we define $k$ by (\ref{sol.fafo.power2.k=}); then we prove that $\left\{
k,n\right\}  $ is a valid pair and so are $\left\{  k+1,n-1\right\}
,\ \left\{  k+2,n-2\right\}  ,\ \ldots,\ \left\{  k+\ell,n-\ell\right\}  $ for
$\ell=\dfrac{n-k-1}{2}$; finally we argue that the rest of the desired pairing
can be obtained by performing the same construction for $k-1$ instead of $n$.
And because this last step is recursive, we must organize our proof as a
strong induction on $n$, so that the last step can be made by invoking the
induction hypothesis. Here is the clean writeup that we obtain:

\begin{statement}
\textit{Solution to Exercise \ref{exe.fafo.power2} (final copy).} We define a
\emph{valid pair} to mean a set $\left\{  u,v\right\}  $ consisting of two
distinct integers such that $u+v$ is one less than a power of $2$ (that is,
such that $u+v=2^{m}-1$ for some nonnegative integer $m$). We define a
\emph{valid pairing} of the set $\left\{  1,2,\ldots,n\right\}  $ to be a
subdivision of this set $\left\{  1,2,\ldots,n\right\}  $ into valid pairs. (A
\textquotedblleft\emph{subdivision}\textquotedblright\ means a choice of valid
pairs inside $\left\{  1,2,\ldots,n\right\}  $ such that each element of
$\left\{  1,2,\ldots,n\right\}  $ belongs to exactly one of the chosen
pairs.)\footnote{We spent a whole paragraph just defining words. But it's
worth it, since these words allow us to be clearer.}

Thus, the problem is asking whether the set $\left\{  1,2,\ldots,n\right\}  $
has a valid pairing for each even positive integer $n$.

We claim that the answer to this question is \textquotedblleft
yes\textquotedblright.\footnote{Don't forget to state the answer when you are
solving a \textquotedblleft true or false?\textquotedblright\ problem.}

We will prove this claim by strong induction on $n$. We do not need a base
case\footnote{A strong induction needs no base case to work. See, e.g.,
\cite[Lecture 4, \S 1.9.4]{23wd} for details.} (although the reader can easily
check that it holds for $n=2$).

\textit{Induction step:} Let $n$ be an even positive integer. As our induction
hypothesis, we assume that the set $\left\{  1,2,\ldots,n^{\prime}\right\}  $
has a valid pairing whenever $n^{\prime}<n$ is an even positive integer. We
must now show that the set $\left\{  1,2,\ldots,n\right\}  $ has a valid
pairing, too. We will construct such a pairing.

We let $2^{m}$ be the largest power of $2$ that satisfies $2^{m}\leq n$. (Why
does this exist?\footnote{This is sufficiently easy that you don't need to
justify it on the Putnam, but let me give a proof just in case: The powers of
$2$ are integers and are strictly increasing (i.e., we have $2^{0}<2^{1}%
<2^{2}<\cdots$), which entails that they eventually surpass any given integer.
Hence, they eventually surpass $n$, and from that point on remain larger than
$n$. But they start out being $\leq n$ (since $2^{0}=1\leq n$). Hence, there
must be a last (i.e., largest) power of $2$ that is $\leq n$.}) Thus,
$2^{m}\leq n$ but $2^{m+1}>n$ (since otherwise, $2^{m+1}$ would be an even
larger power of $2$ that would still satisfy $2^{m+1}\leq n$). Dividing the
inequality $2^{m+1}>n$ by $2$, we find $2^{m}>n/2$. Since $2^{m}$ and $n/2$
are integers (indeed, $n/2$ is an integer because $n$ is even), we thus obtain
$2^{m}\geq n/2+1$ (because if two integers $a$ and $b$ satisfy $a>b$, then
$a\geq b+1$).

Now, set%
\[
k:=2^{m}-1-\left(  n-2^{m}\right)  =\underbrace{2\cdot2^{m}}_{=2^{m+1}%
}-\,1-n=2^{m+1}-1-n.
\]
Thus, $k+n=2^{m+1}-1$ is one less than a power of $2$. Furthermore, from%
\[
k=2\cdot\underbrace{2^{m}}_{\geq n/2+1}-\,1-n\geq2\cdot\left(  n/2+1\right)
-1-n=1
\]
and%
\[
k=2\cdot\underbrace{2^{m}}_{\leq n}-\,1-n\leq2\cdot n-1-n=n-1,
\]
we obtain $k\in\left\{  1,2,\ldots,n-1\right\}  $, so that $k\in\left\{
1,2,\ldots,n\right\}  $ and $k\neq n$. Hence, $\left\{  k,n\right\}  $ is a
valid pair (since $k+n$ is one less than a power of $2$).

Furthermore, $k+n=2^{m+1}-1$ is odd (since $2^{m+1}$ is even), so that
$k=\underbrace{\left(  k+n\right)  }_{\text{odd}}-\underbrace{n}_{\text{even}%
}$ is odd and therefore $\underbrace{n}_{\text{even}}-\underbrace{k}%
_{\text{odd}}$ must also be odd. Thus, $n-k-1$ is even. Hence, define the
integer%
\[
\ell:=\dfrac{n-k-1}{2}.
\]
This is a nonnegative integer (nonnegative because $k\leq n-1$). For each
$p\in\left\{  0,1,\ldots,\ell\right\}  $, we have
\[
\left(  n-p\right)  -\left(  k+p\right)  =n-k-2\underbrace{p}_{\leq\ell
=\dfrac{n-k-1}{2}}\geq n-k-2\cdot\dfrac{n-k-1}{2}=1>0,
\]
so that $k+p<n-p$, and thus the set $\left\{  k+p,\ n-p\right\}  $ is a valid
pair (since $\left(  k+p\right)  +\left(  n-p\right)  =k+n=2^{m+1}-1$ is one
less than a power of $2$). In other words, the $\ell+1$ sets%
\[
\left\{  k+0,\ n-0\right\}  ,\ \ \left\{  k+1,\ n-1\right\}  ,\ \ \left\{
k+2,\ n-2\right\}  ,\ \ \ldots,\ \ \left\{  k+\ell,\ n-\ell\right\}
\]
are valid pairs. Altogether, these $\ell+1$ sets contain (with no duplication)
exactly the $2\left(  \ell+1\right)  $ integers from $k$ to $n$
(inclusive)\footnote{The easiest way to see this is as follows: The set
$\left\{  k,k+1,k+2,\ldots,n\right\}  $ contains exactly $n-k+1$ elements,
i.e., exactly $2\left(  \ell+1\right)  $ elements (since $n-k+1=2\cdot
\underbrace{\dfrac{n-k-1}{2}}_{=\ell}+2=2\ell+2=2\left(  \ell+1\right)  $).
Hence, it can be subdivided into $\ell+1$ two-element subsets by pairing up
its two outermost elements ($k$ and $n$) with each other, then pairing their
neighbors ($k+1$ and $n-1$) with each other, then pairing their neighbors
($k+2$ and $n-2$) with each other, and so on. The $\ell+1$ subsets obtained in
this way are precisely
\[
\left\{  k+0,\ n-0\right\}  ,\ \ \left\{  k+1,\ n-1\right\}  ,\ \ \left\{
k+2,\ n-2\right\}  ,\ \ \ldots,\ \ \left\{  k+\ell,\ n-\ell\right\}  .
\]
Hence, these $\ell+1$ sets contain exactly the $2\left(  \ell+1\right)  $
integers from $k$ to $n$.}.

If $k=1$, then this shows that these $\ell+1$ sets contain (with no
duplication) exactly the $2\left(  \ell+1\right)  $ integers from $1$ to $n$,
and thus form a valid pairing of the set $\left\{  1,2,\ldots,n\right\}  $
(since they are valid pairs). Hence, if $k=1$, then the induction step is complete.

Now, consider the case when $k\neq1$. In this case, $k-1$ is a positive
integer. Furthermore, this integer $k-1$ is even (since $k$ is odd) and
smaller than $n$ (since $k-1<k\leq n$). Hence, by the induction hypothesis,
the set $\left\{  1,2,\ldots,k-1\right\}  $ has a valid pairing. This pairing
covers the numbers $1,2,\ldots,k-1$. Adding to it the $\ell+1$ valid pairs%
\[
\left\{  k+0,\ n-0\right\}  ,\ \ \left\{  k+1,\ n-1\right\}  ,\ \ \left\{
k+2,\ n-2\right\}  ,\ \ \ldots,\ \ \left\{  k+\ell,\ n-\ell\right\}
\]
(which, as we know, cover the remaining numbers $k,k+1,k+2,\ldots,n$), we
obtain a valid pairing of the set $\left\{  1,2,\ldots,n\right\}  $. Thus, the
induction step is complete. This completes the induction and thus the proof of
our claim.
\end{statement}
\end{proof}

\subsection{Class problems}

The following problems are to be discussed during class.

\begin{exercise}
Let $\left(  a_{0},a_{1},a_{2},\ldots\right)  $ be a sequence of real numbers
defined recursively by $a_{0}=1$ and%
\[
a_{n}=n-a_{n-1}\ \ \ \ \ \ \ \ \ \ \text{for each }n\geq1.
\]
Compute $a_{2023}$.
\end{exercise}

\begin{exercise}
Let $\mathbb{N}=\left\{  0,1,2,\ldots\right\}  $. Find all functions
$f:\mathbb{N}\rightarrow\mathbb{N}$ that satisfy%
\[
f\left(  m+n\right)  =f\left(  m\right)  +f\left(  n\right)
+mn\ \ \ \ \ \ \ \ \ \ \text{for all }m,n\in\mathbb{N}.
\]

\end{exercise}

\begin{exercise}
Let $\left(  a_{0},a_{1},a_{2},\ldots\right)  $ be a sequence of nonnegative
real numbers that satisfies $a_{0}=1$ and
\[
a_{n+1}=a_{n}+\sqrt{a_{n+1}+a_{n}}\ \ \ \ \ \ \ \ \ \ \text{for all }n\geq0.
\]
Prove that this sequence is uniquely determined by these requirements, and
find an explicit formula for all its entries $a_{n}$.

\flushright(Bundeswettbewerb Mathematik (BWM) 2001, Round 1, Problem 2)
\end{exercise}

\begin{exercise}
Let $A$ and $B$ be two finite sets such that $\left\vert A\right\vert
=\left\vert B\right\vert $. (The notation $\left\vert S\right\vert $ denotes
the size of a set $S$, that is, the number of all elements of $S$.)

Prove that $\left\vert A\setminus B\right\vert =\left\vert B\setminus
A\right\vert $.
\end{exercise}

\begin{exercise}
Let $A$ be an $n\times n$-matrix with real entries. A \emph{cross} of $A$
shall mean the union of a column and a row of $A$. (Thus, any cross has $2n-1$ entries.)

Let $m$ be a real number. Assume that in each cross of $A$, the sum of all
entries of the cross is $\geq m$. What is the smallest possible value that the
sum of all $n^{2}$ entries of $A$ can take?

\flushright(West German mathematics contest (BWM) 1971/72, Round 1, Problem 1)
\end{exercise}

\begin{exercise}
Solve the system of equations%
\[
\left\{
\begin{array}
[c]{l}%
xy+x+y=1;\\
yz+y+z=2;\\
zx+z+x=3
\end{array}
\right.
\]
in real numbers $x,y,z$. \medskip

[\textbf{Hint:} Add something to $xy+x+y$ to get a polynomial that factors nicely.]
\end{exercise}

\subsection{Homework exercises}

Solve 5 of the 10 exercises below and upload your solutions on gradescope by
October 3 before class.

\begin{exercise}
\label{exe.vianeg.alhazen-lunes} Consider the following picture:
\[%
%TCIMACRO{\TeXButton{tikz lunes of Alhazen}{\begin{tikzpicture}[scale=1.2]
%\node(A) at (0, 0) {};
%\node(B) at (0, 4) {};
%\node(C) at (3, 0) {};
%\fill(A) circle (1pt) node[below left] {$A$};
%\fill(B) circle (1pt) node[above] {$B$};
%\fill(C) circle (1pt) node[right] {$C$};
%\filldraw[fill=cyan] (0, 0) -- (0, 4) -- (3, 0) -- cycle;
%\begin{scope}
%\filldraw[fill=yellow] (0,0) arc({-180+asin(4/5)}:{-asin(4/5)}%
%:2.5) -- (3,0) arc(0:-180:1.5) -- cycle;
%\filldraw[fill=yellow] (0,0) arc({180+asin(4/5)}:{180-asin(4/5)}%
%:2.5) -- (0,4) arc(90:270:2) -- cycle;
%\end{scope}
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[scale=1.2]
\node(A) at (0, 0) {};
\node(B) at (0, 4) {};
\node(C) at (3, 0) {};
\fill(A) circle (1pt) node[below left] {$A$};
\fill(B) circle (1pt) node[above] {$B$};
\fill(C) circle (1pt) node[right] {$C$};
\filldraw[fill=cyan] (0, 0) -- (0, 4) -- (3, 0) -- cycle;
\begin{scope}
\filldraw[fill=yellow] (0,0) arc({-180+asin(4/5)}:{-asin(4/5)}%
:2.5) -- (3,0) arc(0:-180:1.5) -- cycle;
\filldraw[fill=yellow] (0,0) arc({180+asin(4/5)}:{180-asin(4/5)}%
:2.5) -- (0,4) arc(90:270:2) -- cycle;
\end{scope}
\end{tikzpicture}%
%EndExpansion
\ \ .
\]
Compare the area of the yellow region with that of the cyan region.

(Here, $ABC$ is an arbitrary right-angled triangle with right angle at $A$. We
have erected semicircles with diameters $AB$ and $AC$, both pointing outside
of triangle $ABC$, as well as a semicircle with diameter $BC$ pointing inside
it. The yellow region is formed by removing the latter semicircle from the
union of the former two. The cyan region is just the interior of triangle
$ABC$.)

\flushright(Hasan Ibn al-Haytham, ca. 1000)
\end{exercise}

\begin{exercise}
True or False: The pairing in Exercise \ref{exe.fafo.power2} is unique (i.e.,
there is only one way to divide the set $\left\{  1,2,\ldots,n\right\}  $ into
pairs satisfying the conditions of Exercise \ref{exe.fafo.power2}).
\end{exercise}

\begin{exercise}
\ \ 

\begin{enumerate}
\item[\textbf{(a)}] Would Exercise \ref{exe.alg.shanille} still hold if we
replaced \textquotedblleft$80\%$\textquotedblright\ by \textquotedblleft%
$50\%$\textquotedblright?

\item[\textbf{(b)}] What if we replaced \textquotedblleft$80\%$%
\textquotedblright\ by \textquotedblleft$60\%$\textquotedblright?

\item[\textbf{(c)}] What rational numbers $r$ satisfying $0<r<1$ have the
property that Exercise \ref{exe.alg.shanille} still holds if \textquotedblleft%
$80\%$\textquotedblright\ is replaced by \textquotedblleft$r$%
\textquotedblright\ throughout the exercise?
\end{enumerate}
\end{exercise}

\begin{exercise}
Let $n>3$ be an integer that is not prime. Show that we can find positive
integers $a,b,c$ such that $n=ab+bc+ca+1$.

\flushright(49th Putnam contest 1988, Problem B1)
\end{exercise}

\begin{exercise}
Let $k$ be a positive integer. Let $b_{k}$ be the number $\underbrace{44\cdots
4}_{k\text{ times}}\underbrace{88\cdots8}_{k-1\text{ times}}9$ (written in
base $10$). For instance, $b_{5}=4444488889$.

Prove that $b_{k}$ is a perfect square.

(A \emph{perfect square} means the square of an integer.)
\end{exercise}

\begin{noncompile}
Experiment. Then write $b_{k}=44\cdots488\cdots8+1$, then simplify
$44\cdots488\cdots8$ as $4\cdot\sum+8\cdot\sum$ and use the binomial.
\end{noncompile}

\begin{exercise}
Let $k$ be a real number. Consider the sequence $\left(  a_{0},a_{1}%
,a_{2},\ldots\right)  $ of real numbers defined recursively by%
\begin{align*}
a_{0}  &  =1;\\
a_{n}  &  =kn+\left(  -1\right)  ^{n}a_{n-1}\ \ \ \ \ \ \ \ \ \ \text{for all
}n\geq1.
\end{align*}
Compute $a_{2023}$.

\flushright(Simplified version of British Math Olympiad, Round 1, 1999/2000)
\end{exercise}

\begin{exercise}
Find a function $f:\mathbb{Z}\rightarrow\mathbb{Z}$ such that each
$x\in\mathbb{Z}$ satisfies%
\[
f\left(  f\left(  x\right)  \right)  =x+2\ \ \ \ \ \ \ \ \ \ \text{but}%
\ \ \ \ \ \ \ \ \ \ f\left(  x\right)  \neq x+1.
\]

\end{exercise}

\begin{exercise}
Given three positive reals $a,b,c$, solve the system of equations
\[
\left\{
\begin{array}
[c]{l}%
x^{2}=a+\left(  y-z\right)  ^{2};\\
y^{2}=b+\left(  z-x\right)  ^{2};\\
z^{2}=c+\left(  x-y\right)  ^{2}%
\end{array}
\right.
\]
in real numbers $x,y,z$.
\end{exercise}

\begin{exercise}
Let $\left(  a_{1},a_{2},a_{3},\ldots\right)  $ be a sequence of reals such
that all positive integers $n$ satisfy%
\[
1a_{1}+2a_{2}+\cdots+na_{n}=a_{n+1}-1.
\]
Set $c:=a_{1}$. Find an explicit formula for $a_{n}$ in terms of $c$.
\end{exercise}

\begin{exercise}
Let $I$ be an interval on $\mathbb{R}$. Let $f:I\rightarrow\mathbb{R}$ be a
function. Assume that
\[
f\left(  a\right)  +f\left(  b\right)  \geq2f\left(  \dfrac{a+b}{2}\right)
\ \ \ \ \ \ \ \ \ \ \text{for all }a,b\in I.
\]
(A function $f$ satisfying this assumption is said to be
\emph{midpoint-convex} on $I$.)

\begin{enumerate}
\item[\textbf{(a)}] Prove that
\[
f\left(  a\right)  +f\left(  b\right)  +f\left(  c\right)  +f\left(  d\right)
\geq4f\left(  \dfrac{a+b+c+d}{4}\right)  \ \ \ \ \ \ \ \ \ \ \text{for all
}a,b,c,d\in I.
\]


\item[\textbf{(b)}] Prove that%
\[
f\left(  a\right)  +f\left(  b\right)  +f\left(  c\right)  \geq3f\left(
\dfrac{a+b+c}{3}\right)  \ \ \ \ \ \ \ \ \ \ \text{for all }a,b,c\in I.
\]

\end{enumerate}

[\textbf{Hint:} To prove part \textbf{(b)}, apply part \textbf{(a)} with an
appropriate choice of $d$.]
\end{exercise}

\bigskip

\begin{thebibliography}{99999999}                                                                                         %


\bibitem[GelAnd17]{GelAnd17}%
\href{https://doi.org/10.1007/978-3-319-58988-6}{R\u{a}zvan Gelca, Titu
Andreescu, \textit{Putnam and Beyond}, 2nd edition, Springer 2017.}

\bibitem[Gouche12]{Gouche12}Adam P. Goucher, \textit{Mathematical Olympiad
Dark Arts}, 2012.\newline\url{https://www.isinj.com/mt-usamo/Math Olympiad Dark Arts - Goucher (2012).pdf}

\bibitem[Grinbe20]{20f}Darij Grinberg, \textit{Math 235: Mathematical Problem
Solving}, 10 August 2021.\newline\url{https://www.cip.ifi.lmu.de/~grinberg/t/20f/mps.pdf}

\bibitem[Grinbe23]{23wd}Darij Grinberg, \textit{Math 221: Discrete
Mathematics, Winter 2023}.\newline\url{https://www.cip.ifi.lmu.de/~grinberg/t/23wd/}

\bibitem[KePoVa01]{KePoVa01}\href{https://bookstore.ams.org/prb-33/}{Kiran S.
Kedlaya, Bjorn Poonen, Ravi Vakil, \textit{The William Lowell Putnam
Mathematical Competition 1985--2000: Problems, Solutions, and Commentary},
Problem Books \textbf{33}, MAA 2002.}

\bibitem[KKKO20]{KKKO20}%
\href{https://bookstore.ams.org/view?ProductCode=PRB/37}{Kiran S. Kedlaya,
Daniel M. Kane, Jonathan M. Kane, Evan M. O'Dorney, \textit{The William Lowell
Putnam Mathematical Competition 2001--2016: Problems, Solutions, and
Commentary}, Problem Books \textbf{37}, MAA 2020.}

\bibitem[KoVeWa96]{KoVeWa96}%
\href{https://bookstore.ams.org/view?ProductCode=DOL/18}{Joseph D. E.
Konhauser, Daniel J. Velleman, Stan Wagon, \textit{Which way did the bicycle
go: and other intriguing mathematical mysteries}, Dolciani Mathematical
Expositions \textbf{18}, MAA 1996.}

\bibitem[LeLeMe16]{LeLeMe16}Eric Lehman, F. Thomson Leighton, Albert R. Meyer,
\textit{Mathematics for Computer Science}, revised Tuesday 6th June 2018,
\newline\url{https://courses.csail.mit.edu/6.042/spring18/mcs.pdf} .

\bibitem[Polya81]{Polya81}George Polya, \textit{Mathematical Discovery}, Wiley
1981.\newline\url{https://www.isinj.com/mt-usamo/Mathematical Discovery Polya (1981, Wiley).pdf}

\bibitem[Stanle20]{Stanle20}\href{https://bookstore.ams.org/mbk-130}{Richard
P. Stanley, \textit{Conversational Problem Solving}, AMS 2020.}

\bibitem[Vellem06]{Vellem06}%
\href{https://doi.org/10.1017/CBO9780511808234}{Daniel J. Velleman,
\textit{How to Prove It}, 2nd edition, Cambridge University Press 2006.}

\bibitem[WagVel20]{WagVel20}\href{https://www.ams.org/books/prb/036/}{Daniel
J. Velleman, Stan Wagon, \textit{Bicycle or Unicycle?}, AMS/MAA Problem Books
\textbf{36}, MAA Press 2020.}
\end{thebibliography}


\end{document}