Is there a general Formula for the series $2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7,\dots n^{th}$ term
I want to calculate the sum upto $n$th term for the above series.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityIs there a general Formula for the series $2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7,\dots n^{th}$ term
I want to calculate the sum upto $n$th term for the above series.
We denote $(u_n)_{n\geq 0}$ the sequence. For all non-negative integer $n$, we have $$ u_{2n} = n + 2 \qquad\text{and}\qquad u_{2n+1} = n + 2. $$ Let $S_n = \sum_{k=0}^n u_n$. Then $$ S_{2n + 1} = 2\sum_{k=2}^{n+2} k = 2(n+1)\times\frac{2 + (n+2)}{2} = n^2 + 5n + 4, $$ (remenber that the sum of the terms of a finite arithmetical progression is obtained by multiplying the number of terms by the arithmetic mean of the first and the last terms) and $$ S_{2n} = S_{2n+1} - (n+2) = n^2 + 4n + 2. $$ If you prefer, $$ S_n = \begin{cases} \frac{1}{4}(n^2 + 8n + 8) & \text{if $n$ is even},\\ \frac{1}{4}(n^2 + 8n + 7) & \text{if $n$ is odd}. \end{cases} $$
If you have a sequence $(a(n))_{n=1}^m$, then $(a(\lfloor \frac{n+1}{2} \rfloor)_{n=1}^m $ repeats each term twice.
Note that $(a(\lfloor \frac{n+k-1}{k} \rfloor)_{n=1}^m $ repeats each term $k$ times.
As for summing, I recommend that you consider even and odd $n$ separately. I would get the sum of an even number of terms first, then the sum for an odd number of terms is that sum plus the next term.