\documentclass[noanswers,addpoints,12pt]{exam}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{datetime}
\usepackage{listings}
\usepackage{soul}
\usepackage{tikz}
\usetikzlibrary{arrows,automata,decorations.pathmorphing,backgrounds,positioning,fit}
\usepackage{enumerate}
\usepackage{multicol}
\usepackage{fontspec}
\IfFontExistsTF{Gentium Book Basic}{
  \setmainfont{Gentium Book Basic}
}{
  \setmainfont{Times New Roman}
}
\IfFontExistsTF{Comic Code}{
  \setmonofont{Comic Code}[
  Scale = 0.85,
  ]
}{
}
\setsansfont{Trebuchet MS}
\lstset{
  basicstyle=\ttfamily,
}

\DeclareMathOperator{\limplies}{\Rightarrow}
\DeclareMathOperator{\lbiconditional}{\Leftrightarrow}
\DeclareMathOperator{\liff}{\iff}
\DeclareMathOperator{\lxor}{\oplus}
\DeclareMathOperator{\qeq}{\overset{?}{=}}
\DeclareMathOperator{\modulus}{\mathbf{mod}}
\DeclareMathOperator{\even}{even}
\DeclareMathOperator{\odd}{odd}
\DeclareMathOperator{\ddiv}{|}
\DeclareMathOperator{\ndiv}{\not|}
\DeclareMathOperator{\contra}{\Rightarrow\mskip-\thinmuskip\Leftarrow}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\renewcommand{\P}[1]{\mathbb{P}(#1)}
\newcommand{\mathcheckmark}{\text{ \ding{51}}}

\DeclareMathOperator{\vowel}{vowel}
\DeclareMathOperator{\consonant}{consonant}
\DeclareMathOperator{\isprime}{prime}
\DeclareMathOperator{\equals}{equals}
\DeclareMathOperator{\divides}{divides}

% classname
\newcommand\examNumber{[Strong]? Induction}
\newcommand\semester{Fall 2023}
\newcommand\className{Foundations of Computing}
\newcommand\classNumber{CIS~300}
\newcommand\classFullName{\classNumber~\className}
\renewcommand{\dateseparator}{-}
\yyyymmdddate

% /classname

\pagestyle{headandfoot}
\firstpageheader{\classFullName\\\semester}{\examNumber\\~}{\today\\~}
\runningheader{\examNumber}{}{\today}
\firstpagefooter{Page \thepage\ of \numpages}
              {}
              {Points earned: \makebox[.5in]{\hrulefill}\\
                 out of a possible \pointsonpage{\thepage} points}
\runningfooter{Page \thepage\ of \numpages}
              {}
              {Points earned: \makebox[.5in]{\hrulefill}\\
                 out of a possible \pointsonpage{\thepage} points}



\begin{document}
\pointsinrightmargin{}
\begin{questions}
\question{} \textbf{Prove} or \textbf{disprove}:
  $$ \forall p \in \{prime\}, s, t \in \mathbb{Z}^+ \; (p \ddiv st)
  \limplies (p \ddiv s) \lor (p \ddiv t)$$

  (\textbf{Hint:} Not inductive. Rewrite the implication to something
  logically equivalent.)

\question{} Some questions about $gcd$ and divisibility. For $x, y \in
  \mathbb{Z}^+$:
  \begin{parts}
  \part{} If $2 \ddiv x$ and $2 \ddiv y$ what, if anything, do you
    know about $gcd(x,y)$? Why?
  \part{} If $51 \ddiv x$ and $51 \ddiv y$ what, if anything, do you
    know about $gcd(x,y)$? Why?
  \part{} If $2 \ddiv x$ and $17 \ddiv y$ what, if anything, do you
    know about $gcd(x,y)$? Why?
  \part{} If $2 \ddiv x$, $17 \ddiv x$, $2 \ddiv y$, and $17 \ddiv y$
    what, if anything, do you know about $gcd(x,y)$? Why?
  \end{parts}
\question{} Prove that for all non-negative integers $k$, $6 \ddiv k^3
  + 3k^2 + 2k$.

\question{} For the Fibonacci sequence: the sum of the first $a$
  \emph{odd} elements is $F_{2a}$.
  $$\forall a \in \mathbb{Z}^+ \;
  \sum\limits_{j = 1}^{a} F_{2j - 1} \; = \; F_{2a}$$ (\textbf{Hint:}
  Check the sums for some small values of $a$ and look for
  \emph{patterns}.)

\question{} Consider the $\sum\limits_{i = 0}^{n} 2 \cdot 3^i$.
  \begin{parts}
  \part{} Write a \textbf{recursive} Java method,
    \lstinline{int someSum(int n)} that calculates the sum. Do
  \textbf{not} use the answer to the following part of the question to
  calculate the answer.
  \part{} Prove $\forall n \in \mathbb{Z}^{\ge 0}$ $\sum\limits_{i =
      0}^{n} 2 \cdot 3^i$ = $3^{n + 1} - 1$.
  \end{parts}
\end{questions}
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
