\documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \centerline{\bf Homework 7, MORALLY Due March 25} \centerline{\bf Recall: Spring Break is March 18-22} \newcommand{\st}{\mathrel{:}} \newcommand{\goes}{\Rightarrow} \newcommand{\NSQ}{{\rm NSQ}} \newcommand{\BLANK}{{\rm BLANK}} \newcommand{\into}{{\rightarrow}} \newcommand{\lf}{\left\lfloor} \newcommand{\rf}{\right\rfloor} \newcommand{\lc}{\left\lceil} \newcommand{\rc}{\right\rceil} \newcommand{\Ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\floor}[1]{\left\lfloor{#1}\right\rfloor} \newcommand{\Z}{{\sf Z}} \newcommand{\N}{{\sf N}} \newcommand{\Q}{{\sf Q}} \newcommand{\R}{{\sf R}} \newcommand{\D}{{\sf D}} \newcommand{\Rpos}{{\sf R}^+} \begin{enumerate} \item (30 points-10 points each) Write the following sequences in closed form: For example, if the sequence was $$1,1,2,2,3,3,\ldots$$ (So $a_1=1$, $a_2=1$, $a_3=2$, $a_4=2$, $\ldots$.) then the answer is \begin{equation} a_n= \begin{cases} (n+1)/2 & \text{if $n\equiv 1 \pmod 2$} \\ n/2 & \text{if $n\equiv 0 \pmod 2$}\\ \end{cases} \end{equation} \begin{enumerate} \item $2,5,10,17,26,\ldots$. \item $1,1,1,2,2,2,3,3,3,\ldots$ \item $1,-4,9,-16,\ldots$. \end{enumerate} \newpage \item (25 points) We define a sequence as follows: $a_1=1$. For all $n\ge 2$, $a_{n} = a_{n-1} + a_{\floor{n/2}}$. \begin{enumerate} \item (0 points but you will need it for the next part.) Write a program that will, given $n$, find the following: \begin{enumerate} \item \begin{itemize} \item For $1\le i\le n$, $$\frac{\textrm{The number of } a_i\equiv 0 \pmod 2}{n}$$ \item For $1\le i\le n$, $$\frac{\textrm{The number of } a_i\equiv 1 \pmod 2}{n}$$ \end{itemize} \bigskip \bigskip \item \begin{itemize} \item For $1\le i\le n$, $$\frac{\textrm{The number of } a_i\equiv 0 \pmod 3}{n}$$ \item For $1\le i\le n$, $$\frac{\textrm{The number of } a_i\equiv 1 \pmod 3}{n}$$ \item For $1\le i\le n$, $$\frac{\textrm{The number of } a_i\equiv 2 \pmod 3}{n}$$ \end{itemize} \bigskip \bigskip \item {\bf Similar} for mod 5,7,11,13,17,19. \end{enumerate} \bigskip \bigskip (There is more to this problem on the next page) \newpage \item (15 points) Run your program with n=1000. Report the results neatly. \item (10 points) Based on your data give conjectures about the following \begin{enumerate} \item Is $a_n\equiv 0 \pmod 2$ infinitely often? Do the cases $a_n\equiv 0 \pmod 2$ and Do the cases $a_n\equiv 1 \pmod 2$ occur about the same amount of time? \item {\bf Similar} for Mod 3,5,7,11,13,17,19. \end{enumerate} \end{enumerate} \newpage \item (25 points) In this problem we guide you through a proof that number of the form $4^n(8k+7)$ cannot be written as the sum of 3 squares. \begin{enumerate} \item (0 points but you will need this for later) Find the following set $$X = \{ x^2 \pmod 8 \st x\in \{0,1,2,3,4,5,6,7\}\}.$$ \item (7 points) Show that if $x\equiv 7 \pmod 8$ then $x$ is NOT the sum of three squares. ({\it Hint:} Show that any three elements of $X$ from Part a can never sum to 7 mod 8.) \item (8 points) Prove that if $x^2+y^2+z^2 \equiv 0 \pmod 4$ then $x,y,z$ are all even. ({\it Hint:} Look at what happens when: 1 of $\{x,y,z\}$ is odd, 2 of $\{x,y,z\}$ is odd, 3 of $\{x,y,z\}$ is odd. ) \item (9 points) Prove the following by induction on $n$. {\bf Theorem} Let $n\ge 0$. Let $k\in\N$. Show that $4^n(8k+7)$ cannot be written as the sum of 3 squares. \end{enumerate} \newpage \item (20 points) On HW 4 problem 3 you were asked for a conjecture of the form $$(\forall a\in \Z)[a^m \equiv a \pmod m] \hbox{ iff } \BLANK(m).$$ You based your conjecture on a program that you wrote and ran up to 200. ALL of your had the answer $\BLANK(m)$ is {\it $m$ is prime}. Run your program up to 1000. Did you find any value $m$ such that: \begin{itemize} \item $(\forall a\in \Z)[a^m \equiv a \pmod m]$ \item $m$ is NOT prime. \end{itemize} If you DID then output the smallest such $m$. If you DID NOT then state a Theorem in Mathematics, it can be a little one, that proves your conjecture. \end{enumerate} \end{document}