\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage{amsfonts}
\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{needspace}
\usepackage{tabls}
\usepackage{tikz}
\usepackage{ytableau}
\usepackage{skak}
\usepackage{rotating}
\usepackage[framemethod=tikz]{mdframed}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Sunday, February 12, 2023 14:45:17}
%TCIDATA{SuppressPackageManagement}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\newcounter{exer}
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[section]
\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{condition}[1][]
{\begin{conv}[#1]\begin{leftbar}}
{\end{leftbar}\end{conv}}
\newtheorem{quest}[theo]{Question}
\newenvironment{algorithm}[1][]
{\begin{quest}[#1]\begin{leftbar}}
{\end{leftbar}\end{quest}}
\newtheorem{warn}[theo]{Warning}
\newenvironment{conclusion}[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{fns}{\begin{footnotesize}}{\end{footnotesize}}
\iffalse
\newenvironment{proof}[1][Proof]{\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}
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\newcommand{\id}{\operatorname{id}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\RR}{\mathbb{R}}
\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{\underbrack}[2]{\underbrace{#1}_{\substack{#2}}}
\newcommand{\are}{\ar@{-}}
\newcommand{\arebi}[1][]{\ar@{<-}@/_/[#1] \ar@/^/[#1]}
\ihead{Math 221 Winter 2023 (Darij Grinberg): homework set 3}
\ohead{page \thepage}
\cfoot{}
\begin{document}

\begin{center}
\textbf{Math 221 Winter 2023 (Darij Grinberg): homework set 3}

due date: Sunday 2023-02-07 at 11:59PM on gradescope (
\url{https://www.gradescope.com/courses/487830} ).

Please solve only \textbf{4 of the 6 exercises}.
\end{center}

Recall that $\mathbb{N}=\left\{  0,1,2,\ldots\right\}  $.

\begin{exercise}
Let $a,b\in\mathbb{Z}$. Prove the following:

\textbf{(a)} If $a\mid b$, then $a^{k}\mid b^{k}$ for each $k\in\mathbb{N}$.

\textbf{(b)} Let $n\in\mathbb{Z}$. If $a\equiv b\operatorname{mod}n$, then
$a^{k}\equiv b^{k}\operatorname{mod}n$ for each $k\in\mathbb{N}$.
\end{exercise}

\begin{exercise}
Let $n,d,a,b\in\mathbb{Z}$, and assume that $d\neq0$ and $da\equiv
db\operatorname{mod}dn$.

\textbf{(a)} Prove that $a\equiv b\operatorname{mod}n$.

\textbf{(b)} Show by an example that $a\equiv b\operatorname{mod}dn$ is not
necessarily true (i.e., we cannot simply cancel the $d$ from $da$ and $db$
while leaving the $dn$ unchanged).
\end{exercise}

\begin{exercise}
Let $n$ be any integer. Prove the following:

\textbf{(a)} If $n$ is odd, then $8\mid n^{2}-1$.

\textbf{(b)} If $3\nmid n$, then $3\mid n^{2}-1$.

[\textbf{Hint:} In part \textbf{(a)}, write $n$ as $2k+1$. In part
\textbf{(b)}, write $n$ as $q\cdot3+r$ and consider the possible values for
$r$.]
\end{exercise}

\begin{exercise}
Let $p$ be a positive integer.

Assume that you are given $p$-cent coins and $\left(  p+1\right)  $-cent coins
(each in infinite supply).

Prove that you can pay $n$ cents using these coins for every integer $n\geq
p^{2}-p$.

In other words, prove that each integer $n\geq p^{2}-p$ can be written as
$a\left(  p+1\right)  +bp$ with $a,b\in\mathbb{N}$.
\end{exercise}

\bigskip

Now for two more properties of binomial coefficients:

\begin{exercise}
\textbf{(a)} Prove that $k\dbinom{n}{k}=n\dbinom{n-1}{k-1}$ for any two
numbers $n$ and $k$.

\textbf{(b)} Prove that $\sum_{k=0}^{n}k\dbinom{n}{k}x^{k}=nx\left(
x+1\right)  ^{n-1}$ for any positive integer $n$ and any number $x$.

[\textbf{Hint:} Don't forget about cases like $k=0$ and $k\notin\mathbb{N}$.]
\end{exercise}

\begin{exercise}
Let $\left(  f_{0},f_{1},f_{2},\ldots\right)  $ be the Fibonacci sequence. Let
$n\in\mathbb{N}$. Prove that
\[
2^{n-1}\cdot f_{n}=\sum_{k=0}^{n}\dbinom{n}{2k+1}\cdot5^{k}.
\]


[\textbf{Hint:} The $5$ on the right hand side looks suspiciously like the $5$
in $\dfrac{1+\sqrt{5}}{2}$, whereas the binomial coefficients look like the
binomial formula...]
\end{exercise}


\end{document}