% 
% hw2.tex
%
%   This is LaTeX template to get you started
%   making problem-set solutions
%
 
\documentclass[11pt]{article}
\usepackage{amsthm,amsmath, amssymb}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textheight}{9.0in}
\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{-0.5in}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{\bf Data, Logic, and Computing\\[2ex] 
       \rm\normalsize ECS 17 (Winter 2025)}
\date{\today}
\author{Patrice Koehl\\koehl@cs.ucdavis.edu}

\begin{document}
\maketitle
\section*{\underline{Homework 8}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 1} 

Using induction, show that $\forall n \in \mathbb{N}, \displaystyle \sum_{i=1}^{n}i^2 =  \displaystyle\frac{n(n+1)(2n+1)}{6} $.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 2} 

Using induction, show that $\forall n \in \mathbb{N}, \displaystyle\sum_{i=1}^{n}i(i+1)(i+2) = \displaystyle\frac{n(n+1)(n+2)(n+3)}{4} $.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 3} 

Show that $\forall n \in \mathbb{N}, n>1, \displaystyle\sum_{i=1}^{n}\displaystyle\frac{1}{i^2}<2-\displaystyle\frac{1}{n}$.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 4} 

Use a proof by induction to show that $\forall n \in \mathbb{N}, n>3,   n^2-7n+12\geq 0$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 5} 

A sequence $a_0, a_1, \ldots, a_n$ of natural numbers is defined by $a_0=2$ and $a_{n+1}=\left(a_n\right)^2, \quad \forall n \in \mathbb{N}$. Find a closed form formula for the term $a_n$ and prove that your formula is correct.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 6} 

Use the method of proof by induction to show that any amount of postage of 24 cents or more can be formed using just 5-cent and 7-cent stamps. 

\end{document}
