# Is there any general formula for strings?

1. Sep 8, 2008

### Physicsissuef

Is there any general formula for strings?

For example:

what is the formula of this string -1,3,-5,7,-9,....?

Thanks.

2. Sep 9, 2008

### Defennder

Re: string

Why is this called a string?

3. Sep 9, 2008

### HallsofIvy

Re: string

A "string" is any list of symbols so that qualifies as a string, although most of us might prefere the more precise term "numerical sequence".

Remove the negative signs: 1, 3, 5, 7, 9, ... Can you find a simple formula for that? (How do you normally write odd numbers?)

Now remember that (-1)n alternates sign.

4. Sep 10, 2008

### Physicsissuef

Re: string

(2n-1), and the final (-1)n(2n-1). Thanks for the help.

5. Sep 10, 2008

### Defennder

Re: string

Hmm I thought this was related to linear or abstract algebra in some way.

6. Sep 10, 2008

### HallsofIvy

Re: string

Now Why would you think that?:rofl:

7. Sep 11, 2008

### Defennder

Re: string

Well, it's in this forum, for one thing. Nevermind then.

8. Sep 11, 2008

### Physicsissuef

Re: string

2,5,9,14,20....

a2-a1=3

a3-a2=4

a4-a3=5

a5-a4=6

an-an-1=n+1

9. Sep 11, 2008

### HallsofIvy

Re: string

Let me reiterate Defennder's point: this is not really "Abstract Algebra" nor "Linear Algebra". It looks pretty much like "pre-calculus problems".

You have calculated the "first difference". Now what is the "second difference"? That is, what is 4- 3, 5- 4, 6- 5? Do you see that all "third differences" are 0? Do you know "Newton's divided difference formula"? In this particular case, the difference between the values of n is 1 so we have
$$f(n)= f(0)+ \Delta f(0) n+ \frac{\Delta^2 f(0)}{2}n(n-1)+ ...$$
(and here the "..." is 0 because all higher differences are 0.)

10. Sep 11, 2008

### Physicsissuef

Re: string

Sorry, I didn't know where to put this topic. And no, I didn't learn about Newton's divided difference formula. What is second and third difference? How to calculate second and third difference?

Edit: Ok, I understand the second and third difference. Just what I need to substitute for?

Last edited: Sep 11, 2008
11. Sep 11, 2008

### HallsofIvy

Re: string

Write it like this:
$$\begin{array}{ccccc}n & f(n) & \Delta f(n) & \Delta^2 f(n) & \Delta^3 f(n) \\ 0 & 0 & 2 & 1 & 0 \\1 & 2 & 3 & 1 & 0 \\ 2 & 5 & 4 & 1 & 0\\ 3 & 9 & 5 & 1 \\ 4 & 14 & 6 \\ 5 & 20 \end{array}$$
The first column are the "n" values. The second column are the sequence values: f(1)= 2, f(2)= 5, f(3)= 9, f(4)= 14, and f(5)= 20, as you gave. The third column are the "first difference" values also as you gave: the difference between two consecutive values in the second column. The third column is the "second differences": the difference between two consecutive values in the second column. Because those are consecutive integers, 2, 3, 4, 5, the "third differences", the difference between two consecutive values in the third column, is always 1. All further diffences, then, will be 0 and can be ignored.

I put in the top row, n= 0, by working backwards: if 3-a= 2, then a= 2; if 2- a= 2, then a= 0.

Now, as I said before, Newton's divided difference formula says
$$f(n)= f(0)+ \Delta f(0) n+ \frac{\Delta^2 f(0)}{2}n(n-1)+ ...$$
Looking at the chart, f(0)= 0, $\Delta f(0)= 2$, and $\Delta^2 f(0)= 1$
Therefore,
$$f(n)= 0+ 2n+ \frac{1}{2}n(n-1)$$
Simplify that and check its values for n= 1, 2, 3, 4, and 5.

12. Sep 11, 2008

### Physicsissuef

Re: string

Ok, now I completely understand. Thanks for the post. Can I use this formula to find other strings or this is special case?

13. Sep 12, 2008

### Physicsissuef

Re: string

Can I does the same with :

-1,3,-5,7,-9?