What is the simplest series that alternates in order $+,+,-,-,+,+,-,- \dots$
Specifically I want to make a Riemann sum for something, but it has this reoccurent pattern I haven't previously encountered. Normally I have seen $(-1)^n$, but this is new to me.
$\endgroup$ 63 Answers
$\begingroup$$$f(n) = (-1)^{\dfrac{(n-1)(n + 2)}{2}} = \left\lbrace\begin{matrix}1, & n = 1,2,5,6,\ldots\\-1, & n = 3,4,7,8,\ldots\end{matrix}\right.$$
$\endgroup$ 3 $\begingroup$Depends on what you mean by simplest. The series $\displaystyle\sum_{n=0}^{\infty}a_n$, where $a_n = \operatorname{Re}(i^n) + \operatorname{Im}(i^n)$, follows this pattern.
$\endgroup$ 3 $\begingroup$Hint: the sequence $1,1,-1,-1,1,1,-1,-1,...$ can be described by the formula
$$f(n)=\sin{\frac{\pi n}{2}}+\cos{\frac{\pi n}{2}}.$$
$\endgroup$