Assignment #10



Try out the following calculations in Maple.
> Fn:=proc(n);
> if n=0 or n=1 then return 1 end if;
> return Fn(n-1)+Fn(n-2);
> end proc;
> Fn(8);
> Fn(300);
> Gn:=proc(n) option remember;
> if n=0 or n=1 then return 1 end if;
> return Gn(n-1)+Gn(n-2);
> end proc;
> Gn(8);
> Gn(300);

Here are some quick calculations, that I want to make sure that you know how to solve using Maple:

1. It is known that $$\sum_{k=1}^\infty \frac{1}{k^4} = \frac{\pi^4}{90}$$ Find the smallest value of $N$ such that $$\left| \sum_{k=1}^N \frac{1}{k^4} - \frac{\pi^4}{90}\right| \leq 10^{-4}$$

2. A triangular number is a number of the form $n(n-1)/2$ for some positive integer $n$. A pentagonal number is a number of the form $n(3n-1)/2$ for some positive integer $n$. Find all the integers smaller than $10^8$ which are both pentagonal numbers and triangular numbers.

3. Determine the number solutions to the equation $$x_1 + x_2^2 + x_3^3 + x_4 = 221$$ if $0 \leq x_1, x_2, x_3 \leq x_4$ (that is all $x_1, x_2,x_3, x_4$ are greater than or equal to $0$ but $x_4$ is the largest value).

4. Let $a_n = 2 a_{n-1} + 3 a_{n-2} - 3$ with $a_0 = a_1 =1$. Find $a_{101}$.




You should open up a new worksheet and start from scratch. You will have to save your work in a file and upload that file on to the course moodle. Your solution should be a sequence of commands where it is easy to change the input string and after you execute the sequence of commands you should have the correct output string. Please add documentation to your worksheet to explain how it works. Just a few sentences is sufficient, but imagine that you were opening up the worksheet for the first time and wanted to know what it did. You will be marked down if what you write is not clear and coherent.

You should finish your assignment before class Thrusday, November 22 by 11:59pm by 11:59pm, Thursday, November 29. Assignments submitted after this date will be assessed a penalty of 10% per day.