# Tutor profile: Jeremiah M.

## Questions

### Subject: Number Theory

Show that, if $$n\geq 6$$ is composite, then $$n$$ divides $$(n-1)!$$.

Suppose we have some composite $$n\geq 6$$. Then $$n = pq$$ for some nontrivial positive integers $$p,q$$ (that is, $$p$$ and $$q$$ are not $$1$$ and $$n$$). If $$n$$ is even, $$2\leq p,q \leq \frac{n}{2}$$. If $$n$$ is odd, $$3\leq p,q \leq \frac{n}{3} < \frac{n}{2}$$. Furthermore, $$\frac{n}{2} = n-\frac{n}{2} < n-1$$ as $$n\geq6$$. Therefore, $$p$$ and $$q$$ are positive integers that are greater than 1 and less than $$n-1$$. Recall that $$(n-1)!$$ is the product of every integer from 1 through $$n-1$$. Therefore, $$p$$ and $$q$$ both divide $$(n-1)!$$. Thus, $$pq = n$$ divides $$(n-1)!$$.

### Subject: Calculus

Use the Comparison Test to determine if the following series converges or diverges: $( \sum^\infty_{n=1} \frac{n^3}{n^6+n+5}$)

The first step in this problem is to determine a series with comparable behavior to our series. To do this, we look at the leading terms in the numerator and denominator and disregard the following terms as they have negligible impact. As a result, this series roughly reduces to $( \frac{n^3}{n^6} = \frac{1}{n^3}$) Furthermore, the series $( \sum^\infty_{n=1} \frac{1}{n^3}$)is convergent by the $$p$$-series test, as $$p=3$$, and a $$p$$-series converges if $$p>1$$. Now, if our comparable series is convergent, we expect that the original series should converge as well. This tells us which case of the Comparison Test we will use. Recall that the Comparison Test requires two series, $$ \sum a_n$$ and $$ \sum b_n$$, with $$0 \leq a_n \leq b_n$$ for all $$n$$. We will then choose our series to be $$\sum a_n$$, and derive a strictly larger convergent series $$\sum b_n$$, which will force $$ \sum a_n$$ to be convergent. In this case, the process of deriving $$b_n$$ is straightforward. We have that $( \sum^\infty_{n=1} \frac{1}{n^3} = \sum^\infty_{n=1} \frac{n^3}{n^6}$) converges, and $(\frac{n^3}{n^6+n+5} < \frac{n^3}{n^6}$) for all $$n\geq 1$$. Lastly, because $$n\geq1$$, each term in both sequences is always greater than 0. Therefore, all the requirements of the Comparison Test are satisfied, and we can say that our original series converges.

### Subject: C++ Programming

Using $$for$$ loops, create a program that outputs the following design to the console: + ++ +++ ++++ +++++ ++++++

With each line of the design, the number of pluses increases by one and the number of spaces decreases by one. This means that we can use nested for loops to create the design- the outer loop will iterate through each line of the message, and the inner for loops will handle the actual creation of pluses and spaces. The first task is setting up the outer loop. Because there are six lines in the design, we want the loop to run 6 times, like so: $(\texttt{for(int i=1; i<=6; i++) \{...\} }$) Then, the next step is to set up the inner loops. The first loop will output the spaces, which decrease by one every line. This means the space loop will run one less time with each iteration of the outer loop. To accomplish this, we set this loop's iterator variable, $$j$$, to be dependent on the outer loop's iterator $$i$$, like so: $(\texttt{for(int j=i; j<6; j++) \{cout << " ";\}}$) Because the starting value of $$j$$ is dependent on $$i$$, this loop will run 5 times on the first line, then 4 times on the second line, and so on. Similarly, we want the second inner loop for the pluses to also be dependent on $$i$$, but because this loop needs to increase the number of times it runs, we make $$i$$ part of the condition and not the declaration: $(\texttt{for(int k=1; k<i; k++) \{cout << "+";\}}$) All that's left is to assemble the program, and add a new line every time the outer loop runs: $$\texttt{int main()} \\ \{ \\ \texttt{ for (int i = 1; i<7; i++) \{ } \\ \texttt{ | for(int j = i; j <6; j++) \{cout <<" ";\}} \\ \texttt{ | for(int k = 1; k<=i; k++) \{cout << "+";} \} \\ \texttt{ | cout << endl;} \\ \texttt{ \}} \\ \texttt{\}}$$

## Contact tutor

needs and Jeremiah will reply soon.