Note: This problems make uses of the element-to-element property of operations on numeric vectors to calculate pattern summation.
How to do it?:
Open the Rmarkdown file of this assignment (link) in Rstudio.
Right under each question, insert a code chunk (you can use the
hotkey Ctrl + Alt + I
to add a code chunk) and code the
solution for the question.
Knit
the rmarkdown file (hotkey:
Ctrl + Alt + K
) to export an html.
Publish the html file to your Githiub Page.
Sample Codes: You can find similar codes for this assignment here link
Submissions: Submit the link on Github of the assignment to Canvas under Assignment 2.
\[ S = 1 + 4 + 7 + 10 +... + 100 \]
\[ S = 1^{100} + 2^{100} + 3^{100} +...+100^{100} \]
\[ S = \frac{1}{1\cdot 2}+\frac{1}{2 \cdot 3}+...+\frac{1}{100\cdot 101} \]
\[ S = \frac{1}{1\cdot 2 \cdot 3}+\frac{1}{2 \cdot 3 \cdot 4}+...+\frac{1}{100\cdot 101 \cdot 102} \]
\[ S = 1^1 + 3^3 + 5^5 + 7^7 +....+101^{101} \]