# Arithmetic sequences. Writing the general term differently

So I'm dealing with this problem that has to do with arithmetic sequences and I was wondering if I could write the general term of this kind of sequences (finite) like $$a_{k-1}=a_1+(k-\lfloor \frac{n}2 \rfloor)d$$ where $$k$$ can take values from $$2$$ to $$n+1$$

$$\lfloor \rfloor$$ is the floor function and d is the common difference

For example, if we take the sequence $$1,4,7,10,13$$.

In this case $$n=5$$ and $$d=a_n-a_{n-1}=3$$

From the formula above for $$k=2$$ $$a_1=1+3(2-\lfloor \frac{5}2 \rfloor)=1$$ $$k=3$$ $$a_2=1+3(3-\lfloor \frac{5}2 \rfloor)=4$$

$$k=4$$ $$a_3=1+3(4-\lfloor \frac{5}2 \rfloor)=7$$

$$k=5$$ $$a_4=1+3(5-\lfloor \frac{5}2 \rfloor)=10$$

$$k=6$$ $$a_5=1+3(6-\lfloor \frac{5}2 \rfloor)=13$$

• If you do that, wouldn't the odd elements be duplicated? I mean, for example $a_1$ would be the same as $a_2$ and $a_3$ would be the same as $a_4$ ... Then it's not an arithmetic sequence any more. If $k$ is the index, what is $n$ ? – Matti P. Jun 17 at 12:17
• Can you give an example of such a sequence? It is not clear what "common difference" means here – Henry Jun 17 at 12:20
• By $d$ being the "common difference" I assume you mean that for any $1 \leq i < n$, $d = a_{i+1}-a_i$ since $a_k$ defines an arithmetic sequence? – lurker Jun 17 at 12:22
• I've edited it and I gave an example – J.Dane Jun 17 at 12:34

## 1 Answer

If you really want to, you can, but $$n$$ isn't a free parameter. If you want the formula $$a_{k-1} = a_1 + (k-\lfloor \frac{n}{2}\rfloor)d$$ to hold for $$k=2$$, you get a condition $$a_1 = a_1 + (2-\lfloor \frac{n}{2}\rfloor)d$$ that means that for $$d\neq 0$$ you'll need $$\lfloor \frac{n}{2}\rfloor = 2$$ So, for natural $$n$$ it's only correct for $$n=4$$ and $$n=5$$ (like in your example). The formula simplifies then to the usual $$a_{k-1} = a_1 + (k-2)d$$ $$a_k = a_1 + (k-1) d$$

What may be of more use to you are the formulae $$a_{k} = a_{\lfloor \frac{n}{2}\rfloor} + (k-\lfloor \frac{n}{2}\rfloor)d$$ or $$a_{k-1} = a_{\lfloor \frac{n}{2}\rfloor-1} + (k-\lfloor \frac{n}{2}\rfloor)d$$ that are also variations on the general formula, but allow you to use an arbitrary $$n$$.