# Difference Tab -> Algebra

This is a discussion on Difference Tab -> Algebra within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hey, I have a difference Table like this: Code: N Ts D1 D2 D3 1x1 1 2x2 5 4 3x3 ...

1. ## Difference Tab -> Algebra

Hey,

I have a difference Table like this:

Code:
```N        Ts        D1    D2    D3

1x1     1
2x2     5         4
3x3     14       9       5
4x4     30       16     7      2
5x5     55       25     9      2
6x6     91       36     11    2
7x7     140     49     13    2```
D3 contains the pattern, how do i now make a formula to get from N to Ts? I think its like n³ then somthing else which im not sure of.

Thanks for any help,

TNT

2. Ok, i have got the pattern the one i need is in d1.

Add up all the square numbers in d1 to the value of n then add 1.

E.g

for n = 4, ts =

4 + 9 + 1 = 14

I now need a formula to add up the square numbers, does anyone know any formula for this area?

Thanks
TNT

3. I think the formula is (1/6)n(n+1)(2n+1).