% If you are working from this template to just write up your own
% solutions, I'm trying to keep it simple for you and there are only a
% few places you need to edit. On line 43 there's a place where the
% phrase "YOUR NAME HERE" appears; change it to your actual
% name. Several places below there are places where the phrase "YOUR
% ANSWER HERE" appears, and directly below (or replacing) those lines
% are good places to put your answers.
%
% One important thing you need to do, however (due to the complicated
% way I use a single form to produce both the question sheets and
% solution writeups) is to make sure that you keep the word 'solution'
% in your filename, or else your answers won't be printed at all.
\documentclass[12pt]{article}
 
\usepackage[margin=0.7in,dvips]{geometry}
\usepackage{fancyhdr,lastpage}
\usepackage{amsmath,amsfonts,amsthm,amssymb}
\usepackage{tikz}
\usepackage{substr}

\IfSubStringInString{\detokenize{solution}}{\jobname}{%
  % Solutions
  \newcommand\qfill{}
  \newcommand\qpage{}
  \newcommand\qonly[1]{}
  \newcommand\answer[1]{#1}
  \newcommand\question[1]{{\em #1}}
  \newcommand\rubric[1]{}
}
{%
  % Question sheets
  \newcommand\qfill{\vfill}
  \newcommand\qpage{\newpage}
  \newcommand\qonly[1]{#1}
  \newcommand\answer[1]{}
  \newcommand\question[1]{#1}
  \newcommand\rubric[1]{}
}

\pagestyle{fancy}
\lhead{MATH 311-01}
\chead{Problem Set \#5\answer{ solutions}}
\rhead{\answer{}}
\lfoot{}
\cfoot{Page \thepage\ of \pageref{LastPage}}
\rfoot{{\bf due February 23, 2017}}

\newtheorem{prop}{Proposition}

% The command below redefines \neg (the logical negation character)
% to be a big tilde, in line with the usage in the book. Comment it
% out if you prefer the more traditional negation symbol.
\renewcommand*{\neg}{\mathord{\sim}}

\begin{document}
\begin{enumerate}
\item \question{Prove that for any two integers $x$ and $y$, if $x$ and $y$ have the same parity, then $x^2+y^2$ is even.}

\answer{
  % If you want a proposition-statement before your proof, you can add
  % a "prop" environment; the question as originally phrased is
  % suitable to be proven without any restatement, however.
  \begin{proof}
    
  \end{proof}
}

\item \question{Prove that for any two integers $x$ and $y$, if
    $x^2+y^2$ is even, then $x$ and $y$ have the same parity.}

\answer{
  % If you want a proposition-statement before your proof, you can add
  % a "prop" environment; the question as originally phrased is
  % suitable to be proven without any restatement, however.
  \begin{proof}
    
  \end{proof}
}


  % Note below: "\mid" is a standard divisibility symbol. "|" will
  % also work but has poor spacing better suited for absolute values
  % than divisiblity. The "is not divisible by" symbol is "\nmid".

\item \question{Prove that for every nonnegative integer $n$,
    $3^n+6^n+12^n$ is divisible by 3 (hint: how do the divisibility of each
    addend by 3 depend on the value of $n$?)}

\answer{
  % If you want a proposition-statement before your proof, you can add
  % a "prop" environment; the question as originally phrased is
  % suitable to be proven without any restatement, however.
  \begin{proof}
    
  \end{proof}
}

\item \question{Prove that for any integer $n$, if $3\mid 2n$, then
    $3\mid n$.}


  % "\equiv" is a triple-bar suitable for describing modular
  % congruence. "\pmod{n}" typesets the phrase "(mod n)" suitably.
\item \question{Prove that for integers $x$ and $y$, if $x\equiv
    1\pmod{6}$ and $y\equiv 3\pmod{4}$, then $4x+2y\equiv 2\pmod 8$.}

\answer{
  % If you want a proposition-statement before your proof, you can add
  % a "prop" environment; the question as originally phrased is
  % suitable to be proven without any restatement, however.
  \begin{proof}
    
  \end{proof}
}

\end{enumerate}

\end{document}
