\documentclass[letterpaper,twoside]{tufte-book}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}

%\usepackage[fontsize=13pt]{scrextend}

\usepackage[all]{nowidow}
\usepackage{setspace}
\usepackage{ragged2e}
\setlength{\RaggedRightParindent}{\parindent}

%\usepackage[top=2.5cm, bottom=2cm, outer=5cm, inner=2cm, heightrounded, marginparwidth=3cm, marginparsep=1cm]{geometry}

%\setlength{\marginparpush}{1em}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{upquote}


\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}


\setlength{\parindent}{1em}
\setlength{\parskip}{0.4em plus 0.2em minus 0.1em}
\setlength{\emergencystretch}{3em}  % prevent overfull lines

\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}

\usepackage{setspace}

\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}

\setlength{\emergencystretch}{3em} % prevent overfull lines


\usepackage{hyperref}
\hypersetup{unicode=true,
            pdftitle={Pascal's Triangle},
            pdfauthor={Chris Spackman},
            pdfborder={0 0 0},
            breaklinks=true}



\title{Pascal's Triangle}
\author{Chris Spackman}
\date{Summer 2022}

\onehalfspace

\begin{document}
\maketitle

Pascal's Triangle is a mathematical triangular
array.\marginnote{\textbf{array:} a bunch of numbers aligned in
    rows or columns} It is named after French mathematician Blaise
  Pascal, but it was used in
  China at least 300 years before Pascal was born.

\begin{figure}[htbp]
\centering
\includegraphics[width=0.6\textwidth]{./Blaise_Pascal_Versailles.jpg}
\caption{Blaise Pascal. He lived 1623--1662.}
\end{figure}

Pascal's triangle looks like a triangle with 1 number at the top and
then each row having one more number---so, 2 numbers in the second
row, 3 numbers in the third row, etc. Actually, for Pascal's Triangle,
we start counting the rows with zero, because each row represents the
largest exponent in the expression. Zero is an acceptable exponent for
a term, so we start with zero. So, 1 by itself is the number in the
``zeroth'' row, 1 and 1 are the numbers in the ``first'' row, etc.

The triangle can be used to find out the
coefficients\marginnote{\textbf{coefficients:} the numbers in front of
  (attached to) variables in a term. In ``\(2x\)'', \(2\) is the
  coefficient of \(x\). (The final number in a row is always the
  coefficient of \(x^0\), which is \(1\).)} of the terms of a binomial raised to a
positive power. For example, \((x + 1)^4\) would not be much fun to
calculate by hand, but with Pascal's Triangle, we can just look at the
fifth row (because the fifth row would be an expression to the fourth
power --- remember, we started with zero). In the fifth row, we see
``1 4 6 4 1''. So, \((x + 1)^4\) will be
\(x^4 + 4x^3 + 6x^2 + 4x + 1\).


\begin{figure*}[htbp]
\centering
\includegraphics[width=0.6\textwidth]{./Pascals_triangle.png}
\caption{Pascal's Triangle, for exponents 0 to 5}
\end{figure*}

\section{Making the Triangle}

The triangle can be made as follows:

\begin{enumerate}
\item
  In the first row, write only the number 1.
\item
  In the second row, write the number 1 twice.
\item
  To get the numbers of following rows, add the two numbers to the left
  and right in the row above. If there is no number to the left or to
  the right, then pretend that that number is zero. That is why both
  numbers in the second row are 1---we pretend that the first row is
  \(0 1 0\).
\item
  Continue like this for as many rows as you need.

\item Be careful to keep track of the exponents that go with each row
  (as in the image). People sometimes forget to start with zero, and
  end up using numbers from the wrong row when they write out the
  expression. The third row, for example, is for a binomial raised to
  the \emph{\textbf{second}} power.\marginnote{\textbf{second power}
    aka ``squared''.}
\end{enumerate}



\section{Sources}\label{Sources}

This document includes or is based on content from the following files:

\begin{description}

\item [Binomial Expansion] at Simple Wikipedia. Accessed 2022 July 13; published under the \href{https://creativecommons.org/licenses/by-sa/3.0/}{Creative Commons Attribution-ShareAlike} 3.0 Unported License. \url{https://simple.wikipedia.org/wiki/Binomial_expansion}

\item [Pascal's Triangle] at Simple Wikipedia. Accessed 2022 July 13; published under the \href{https://creativecommons.org/licenses/by-sa/3.0/}{Creative Commons Attribution-ShareAlike} 3.0 Unported License. \url{https://simple.wikipedia.org/wiki/Pascal%27s_Triangle}

\item [Blaise Pascal] at Wikipedia. Accessed 2022 July 13; published under the \href{https://creativecommons.org/licenses/by-sa/3.0/}{Creative Commons Attribution-ShareAlike} 3.0 Unported License. \url{https://en.wikipedia.org/wiki/Blaise_Pascal}

\item [Pascal's Triangle (SVG)] graphics file from Wikipedia. Accessed 2022 July 13; published under the \href{https://creativecommons.org/licenses/by-sa/3.0/}{Creative Commons Attribution-ShareAlike} 3.0 Unported License. \url{https://en.wikipedia.org/wiki/File:Pascal%27s_triangle_5.svg}

\item [Blaise Pascal Versailles] image from Wikipedia. Accessed 2022 July 13; published under the \href{https://creativecommons.org/licenses/by/3.0/deed.en}{Creative Commons Attribution} 3.0 Unported License. \url{https://en.wikipedia.org/wiki/File:Blaise_Pascal_Versailles.JPG}

\end{description}
  
\section{Copyright}\label{copyright}

This document is licensed under the \href{https://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons Attribution-Share Alike 4.0 International license}.

The original \LaTeX{} files and images used to create this reading are available at:\\
\url{https://www.chrisspackman.com/educator-resources/readings/pascals-triangle/pascals-triangle-latex-files/}


\end{document}
