\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=Tuesday, November 28, 2023 23:34:47}
%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}
\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 7, version \today}
\ohead{page \thepage}
\cfoot{Darij Grinberg}
\begin{document}
\setcounter{section}{6}

\section{Math 235 Fall 2023, Worksheet 7: Assorted problems}

This worksheet, for a change, contains no new theory or methods, but just an
assortment of various problems I like.

As before, $\mathbb{N}$ means the set $\left\{  0,1,2,\ldots\right\}  $.

\subsection{Class problems}

The following problems are to be discussed during class.

\begin{exercise}
\label{exe.A.e3} Let $n \in\mathbb{N}$. Assume that the set $\left\{  1, 2,
\ldots, 2n \right\}  $ is partitioned into two disjoint subsets $A$ and $B$,
each of which has size $n$.

Let $a_{1}, a_{2}, \ldots, a_{n}$ be the elements of $A$ in increasing order
(that is, $a_{1} < a_{2} < \cdots< a_{n}$).

Let $b_{1}, b_{2}, \ldots, b_{n}$ be the elements of $B$ in decreasing order
(that is, $b_{1} > b_{2} > \cdots> b_{n}$).

Prove that
\[
\left\vert a_{1}-b_{1}\right\vert +\left\vert a_{2}-b_{2}\right\vert
+\cdots+\left\vert a_{n}-b_{n}\right\vert =n^{2}.
\]


\flushright
(Soviet Union 1985 grade 8 problem 8, known as \textquotedblleft%
\href{https://en.wikipedia.org/wiki/Proizvolov's_identity}{Proizvolov's
identity}\textquotedblright)
\end{exercise}

\begin{exercise}
Let $P$ be a polynomial with integer coefficients. Let $a,b,c$ be three
integers that satisfy $P\left(  a\right)  =b$ and $P\left(  b\right)  =c$ and
$P\left(  c\right)  =a$. Prove that $a=b=c$.
\end{exercise}

\begin{exercise}
\label{exe.A.e1}Consider the sequence $\left(  u_{0},u_{1},u_{2}%
,\ldots\right)  $ of numbers defined recursively by
\begin{align*}
u_{0}  &  =1;\\
u_{2n}  &  =u_{n}+u_{n-1}\qquad\text{for all positive }n\in\mathbb{N};\\
u_{2n+1}  &  =u_{n}\qquad\text{for all }n\in\mathbb{N}.
\end{align*}
(As we recall, $\mathbb{N}=\left\{  0,1,2,\ldots\right\}  $.) Prove that for
each positive rational number $k$, there is a unique $n\in\mathbb{N}$ such
that $u_{n}/u_{n+1}=k$.

\flushright (Stronger version of Putnam 2002 Problem A5)
\end{exercise}

\begin{exercise}
\label{exe.A.e4} Let $a,b,c,d$ be four integers such that $ab=cd$. Prove that
there exist four integers $x,y,z,w$ such that
\[
a=xy,\ \ \ \ \ \ \ \ \ \ b=zw,\ \ \ \ \ \ \ \ \ \ c=xz,\ \ \ \ \ \ \ \ \ \ d=yw.
\]

\end{exercise}

\begin{exercise}
\label{exe.A.e6} Let $n\in\mathbb{N}$.

\begin{enumerate}
\item[\textbf{(a)}] Prove that $\left(  2+\sqrt{3}\right)  ^{n}+\left(
2-\sqrt{3}\right)  ^{n}$ is an integer.

\item[\textbf{(b)}] Prove that $\left\lfloor \left(  2+\sqrt{3}\right)
^{n}\right\rfloor $ is odd. (Here, for any given real $x$, the notation
$\left\lfloor x\right\rfloor $ stands for the largest integer that is $\leq x$.)
\end{enumerate}
\end{exercise}

\subsection{Homework exercises}

Solve 4 of the 10 exercises below and upload your solutions on gradescope by
November 29.

\begin{exercise}
Let $P$ be a polynomial (in one indeterminate) with integer coefficients. Let
$n$ be an odd positive integer. Let $a_{1},a_{2},\ldots,a_{n}$ be $n$ integers
that satisfy
\[
P\left(  a_{i}\right)  =a_{i+1}\ \ \ \ \ \ \ \ \ \ \text{for each }%
i\in\left\{  1,2,\ldots,n\right\}  ,
\]
where we set $a_{n+1}:=a_{1}$. Prove that $a_{1}=a_{2}=\cdots=a_{n}$.
\end{exercise}

\begin{exercise}
\label{exe.seq.sumk2ak}Let $\left(  a_{1},a_{2},a_{3},\ldots\right)  $ be a
sequence of reals such that $a_{1}=1$ and such that all positive integers $k$
satisfy%
\begin{equation}
1^{2}a_{1}+2^{2}a_{2}+3^{2}a_{3}+\cdots+k^{2}a_{k}=\dfrac{k\left(  k+1\right)
}{2}\left(  a_{1}+a_{2}+\cdots+a_{k}\right)  .\nonumber
\end{equation}
Find an explicit formula for $a_{n}$.
\end{exercise}

\begin{exercise}
Let $n$ be a positive integer. Prove that either the number $n$ or the number
$3n$ (or both) begins with one of the digits $1$, $2$ and $9$ when written in
the decimal system.

(\textbf{Example:} If $n=52$, then $3n=156$ begins with a $1$.)

\flushright(Tournament of Towns 26.5.2, deobfuscated version)
\end{exercise}

\begin{exercise}
For each positive integer $n$, we let $\operatorname*{god}\left(  n\right)  $
denote the greatest odd divisor of $n$. For instance, $\operatorname*{god}%
\left(  24\right)  =3$ and $\operatorname*{god}\left(  25\right)  =25$ and
$\operatorname*{god}\left(  30\right)  =15$.

Let $n$ be a positive integer. Prove that
\[
\operatorname*{god}\left(  n+1\right)  +\operatorname*{god}\left(  n+2\right)
+\cdots+\operatorname*{god}\left(  2n\right)  =n^{2}.
\]


\flushright (Tournament of Towns 25.1.3)
\end{exercise}

\begin{exercise}
Let $n\in\mathbb{N}$. Let $A$ be an $n\times n$-matrix whose all entries are
odd integers.

Consider the product of all entries in each row and each column of $A$. Prove
that the sum of these $2n$ products is congruent to $2n$ modulo $4$.

\flushright (Variant of Soviet Union 1962 grade 8 problem 5)
\end{exercise}

\begin{exercise}
Let $n$ be a positive integer. Let $A$ be an $n\times n$-matrix whose all
entries belong to the set $\left\{  0,1\right\}  $. Assume that $A$ contains
equally many $0$'s and $1$'s. Prove that $A$ has two rows that contain the
same number of $1$'s or two columns that contain the same number of $1$'s.
(The \textquotedblleft or\textquotedblright\ is not exclusive, so $A$ can
contain both.)

\flushright(Tournament of Towns 36.F.H.1)
\end{exercise}

\begin{exercise}
Let $\varphi=\dfrac{1+\sqrt{5}}{2}$ be the golden ratio. Define a function
$F:\mathbb{N}\rightarrow\mathbb{N}$ by%
\[
F\left(  n\right)  =\left\lfloor \varphi n\right\rfloor
\ \ \ \ \ \ \ \ \ \ \text{for each }n\in\mathbb{N}\text{.}%
\]
(Recall that $\left\lfloor x\right\rfloor $ denotes the largest integer $\leq
x$ for each $x\in\mathbb{R}$.)

Recall also the Fibonacci sequence $\left(  f_{0},f_{1},f_{2},\ldots\right)
$, defined by $f_{0}=0$ and $f_{1}=1$ and $f_{n}=f_{n-1}+f_{n-2}$ for each
$n\geq2$.

\begin{enumerate}
\item[\textbf{(a)}] Prove that $F\left(  f_{n}\right)  =f_{n+1}$ for each odd
$n\geq1$.

\item[\textbf{(b)}] Prove that $F\left(  f_{n}\right)  =f_{n+1}-1$ for each
even $n\geq1$.

\item[\textbf{(c)}] Prove that%
\[
F\left(  F\left(  n\right)  \right)  =F\left(  n\right)
+n-1\ \ \ \ \ \ \ \ \ \ \text{for each positive integer }n.
\]

\end{enumerate}

[\textbf{Hint:} Feel free to use the fact that $\varphi$ is irrational.]
\end{exercise}

\begin{exercise}
Let $n$ be a positive integer such that $4n+1$ is a prime number. Prove that
$4n+1\mid n^{2n}-1$.

\flushright(Baltic Way contest 2018 problem 18)
\end{exercise}

\begin{exercise}
Let $A$ be an $m\times n$-matrix whose entries are nonnegative reals and which
has more columns than rows (that is, we have $n>m$). Assume that each column
of $A$ contains at least one positive entry.

Prove that $A$ has at least one cell with a positive entry such that the sum
of the entries in the row of this cell is larger than the sum of all entries
in the column of this cell.

\flushright(BWM Germany 2020, 2nd round, problem 4)
\end{exercise}

\begin{exercise}
Prove that there exists no function $f:\mathbb{Z}\rightarrow\mathbb{Z}$ such
that each $x\in\mathbb{Z}$ satisfies $f\left(  f\left(  x\right)  \right)
=x+1$.

[Note the contrast to Exercise 0.3.7 on worksheet \#0.]
\end{exercise}


\end{document}