Coursework Help - GCSE and A-Level Free Essays and Coursework

GCSE Coursework
A-Level Coursework and Essays
Contact Coursework Help
Coursework Links

CourseworkHelp

:

Triangular Square Numbers

Triangular Square Numbers

Aim

The aim of this investigation is to investigate numbers that are both square and triangular. Part of this investigation will be to try to find a formula to calculate the nth triangular square number.

 

Initial Analysis

Triangular numbers are numbers calculated using the equation:

 

Triangular square numbers must satisfy the above equation, and must also be square, so:

Obtaining Data

To investigate these numbers, some examples must be discovered. Finding these numbers by hand was tried, but it was found that triangular square numbers do not occur frequently in the set of natural numbers.

A computer program was written and ran to find these numbers quicker, and therefore be more efficient. This program is shown in Appendix A, and the output file in Appendix B. This program finds all the triangular square numbers between 1 and
1 x 1016 – 1. It puts every number starting with 1 into the triangular formula, and tests if its square root is a whole number. If it is, the number produced by the triangular formula is triangular square.

This is the largest range that the programming language in which the program is written can handle with complete accuracy. The language is Gauss, which is actually designed for complex Economical calculations, but was chosen for this task because it handles numbers well. A more appropriate language to write this program in would be Maple, but a copy of the necessary program was not available.

 

 

 

 

 

 

Data Found

n

Triangular Square

Square Root

Original Triangular

1

1

1

1

2

36

6

8

3

1225

35

49

4

41616

204

288

5

1413721

1189

1681

6

48024900

6930

9800

7

1631432881

40391

57121

8

55420693056

235416

332928

9

1882672131025

1372105

1940449

10

63955431761796

7997214

11309768

11

2172602007770041

46611179

65918161

 

Note:          The original triangular number is the number that is entered into the triangular formula to produce the triangular square number.

 

Analysing Data

The square roots of the triangular square numbers were analysed because they are smaller and so easier to handle. If a formula is found for the nth term in the sequence of square roots, this can then be squared to find the triangular square number.

To find a formula, the differencing method was used, as seen in Appendix C, but a common difference was not found. This suggests that the formula is not a polynomial. The formula may be exponential. To check this, the ratios between successive terms should be analysed – or in other words each number in the sequence will be divided by the previous. This is shown in the following graph, for which the data can be found in Appendix D.

 

 

 

 

This shows that the ratio tends to a limit, which is a sign of exponential growth. Exponential growth is where the growth becomes more rapid in proportion to the total size.

There is a method, which can derive a general formula from an inductive definition of a sequence that grows exponentially. This method is demonstrated by finding a formula for the nth term in the Fibonacci sequence in Appendix E.

 

Finding a general formula

Finding an inductive definition

To find the general formula, an inductive definition is required. A mathematical method of working out an inductive definition was not known, so trial and error was used along with some educated guesswork.

After “messing” around with the numbers, it was noticed that the factor that each term must be multiplied by is about 6. It was then noted that, when multiplied by 6, the number was too big to be the correct value. By experimentation, it was discovered that subtracting the term two terms before produced the correct answer. This can be easily shown in a table:

Rectangular Callout: The difference is equal to the square root term, 2 terms previous to the currentn

Square Root

6 x Square Root 2 terms before

Difference

1

1

 

 

2

6

6

0

3

35

36

1

4

204

210

6

5

1189

1224

35

6

6930

7134

204

7

40391

41580

1189

8

235416

242346

6930

9

1372105

1412496

40391

10

7997214

8232630

235416

11

46611179

47983284

1372105

 

 

This can then be use to produce an inductive definition:

 

 

 

 

 

This can then be used to create a general formula, using the method that is explained in greater detail in Appendix E.

 

General Form of the equation:

 

Finding l1 and l2

Replace Un with Aln.

 

 

 

 

Calculate solutions using quadratic formula.

 

 

 

 

 

 

 

 

 

 

 

 

 

Finding A and B


Values of for l1 and l2 substituted into the general formula:

 

 


 

 

 

 


 



A, B, l1 and l2 are then be entered into the general formula to find the final formula:

 



This is then checked on a calculator for n=0, 1, 2, 3, 4, 5, and 6. It produces the correct answer. However, they may be very small rounding errors on a calculator, so at least one has to be checked by hand. When n=2 will be checked because it was not one of the simultaneous equations used to calculate the formula.

 


This is the correct answer. This formula is almost totally proved. However, it is based on the inductive formula, which at the moment isn’t proved. Until it is proved the formula isn’t proved.

 

 

 


The formula above is the formula for the square roots of the triangular square numbers. This has to simply be squared to achieve the desired general formula:

 


Finding a formula using a different sequence

A general formula can also be found using the original triangular sequence. Once found, this formula must be substituted into the triangular formula to produce the required formula.

This method is only briefly described as most of it has already been shown in Appendix E or the previous section.

 

Finding an Inductive definition

After experimenting with the inductive definition for the square root sequence, it was found that the inductive definition of the original triangular sequence is very similar. This inductive definition has a constant of 2 added onto the end, and has different initial values:

 

 


The constant means that in this case, a particular solution must be found. This is made up of a non-specific solution, and a constant. The general form for the specific solution is:

 


Finding C

To work out C for the particular solution, let Un = C " n (in the inductive definition) and manipulate the equation.

 

 

 

 

 


The general form for the particular equation is therefore:

 


To calculate l1 and l2 from the inductive formula, the constant is ignored. This means that the inductive definition (ignoring the constant) is the same as for the square root sequence (apart from the initial values). Therefore l1 and l2 are the same as before, and do not have to be worked out again.

 

 

Finding A and B


The method to find A and B is very similar to how it was done previously, only this time the constant must be present in the simultaneous equations.

 

 

 

 

 

 


 

 


 



This means that the final general formula is like so:

 


This formula was checked on a calculator for when n = 0, 1, 2, 3, 4, and 5, and all the results proved to be correct. However, there could be very small inaccuracies rounded off by the calculator. It should be checked by hand – for n = 2.

 

 

 


 

 


This shows that the formula is correct, although it’s not totally proved as the inductive formula from which it was created isn’t proved.


To transform this formula into the triangular square formula, it can be substituted into the triangular formula:

 

 


Possible Extension Work

Research into triangular square numbers has shown that they may have something to do with Pell Equations. Study into this field could lead to other, simpler formulae.

The formulae discovered might be able to be simplified.

Testing to see whether the two equations are the same using algebraic manipulation would help to prove them both.

A method to prove the inductive definitions from which the general formulae are derived should be looked into.

 

 

Text Box: /*
**
** Program to discover triangular numbers that are also square
** Written in Gauss
** Michal Charemza (1999)
**
*/


/* Format screen output to show maximum accuracy */
format 25,16;

/* Set auxillary output to file "tri2.dat", and
** open file ready to append contents **/
output file=tri2.dat on;


/* Initialise variable used to calculate each triangular number */
n=1;
Tri=1;

/* Loop continues as long as numbers are not too large
** for the computer to calculate accuratly */
do while ((n<=9999999999999999) AND (Tri<=9999999999999999));

    /* Calculate triangular number using n */
    Tri=(n*(n+1))/2;

    /* Caculate square root of triangular number */
    SquareRoot=sqrt(Tri);

    /* Prints triangular number square root and n,
    ** if the square root is a whole number */
    if (SquareRoot-trunc(SquareRoot))==0;
            print "TriSquare: " Tri; "SquareRoot:" SquareRoot; "n:    " n;
            print;
    endif;

    n=n+1;

endo;

/* Closes the output file */
output off;
Appendix A

Text Box: TRI2.PRO

 

 



Appendix B

 

 


Appendix C

Attempting to use the differencing method to determine a formula for the square roots of the triangular square numbers.

Square Root

 

 

 

 

 

 

1

 

 

 

 

 

 

5

 

 

 

 

6

 

24

 

 

 

 

29

 

116

 

 

35

 

140

 

560

 

 

169

 

676

 

2704

204

 

816

 

3264

 

 

985

 

3940

 

15760

1189

 

4756

 

19024

 

 

5741

 

22964

 

91856

6930

 

27720

 

110880

 

 

33461

 

133844

 

535376

40391

 

161564

 

646256

 

 

195025

 

780100

 

3120400

235416

 

941664

 

3766656

 

 

1136689

 

4546756

 

18187024

1372105

 

5488420

 

21953680

 

 

6625109

 

26500436

 

 

7997214

 

31988856

 

 

 

 

38613965

 

 

 

 

46611179

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Appendix D

Table showing the ratio’s of successive terms in the square root sequence

 

n

Square Root

Ratio to term before

1

1

-

2

6

6.000000000

3

35

5.833333333

4

204

5.828571429

5

1189

5.828431373

6

6930

5.828427250

7

40391

5.828427128

8

235416

5.828427125

9

1372105

5.828427125

10

7997214

5.828427125

11

46611179

5.828427125

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Appendix E

This is the method for calculating a general formula for an exponential sequence using an inductive definition. This example uses this inductive definition of the Fibonacci sequence:

 

 

 

From this definition it is known that the exponential formula must take the form:

 

The reason for there being two growth factors, l1 and l2, is because the inductive definition requires the two previous terms in the sequence. There is no constant added onto the formula because there is no constant in the inductive definition.

 

Finding l1 and l2

From the inductive definition, replace fn with Aln.

 

From this l1 and l2 can be calculated. There are two solutions of this equation, because it is a quadratic, as can easily be seen from this manipulation of the equation:

 

 

 

The quadratic formula can then be used to solve the equation to find both of the growth factors.

 

 

 

 

 

The two growth factors are therefore:

 

They are kept in surd form to avoid any inaccuracies when rounding to decimal.

 

Finding A and B

By entering the values for l1 and l2, into the general form of the formula, and then using simultaneous equations (substitution method), A and B can be then be found.


 


 



A and B can then be entered into the general formula with l1 and l2, to find the final formula:

 


This method of deriving a general formula automatically proves the formula, because the inductive definition is proved (as it is itself the definition of the Fibonacci sequence). However, the general formula should still be checked, in case a mistake has been made.


This formula is checked for when n = 2:

 


This is the correct value for when n = 2, because 5 is the sum of the two previous values in the sequence.

The values for when n = 3, 4, 5 and 6 were also checked on a calculator. When entered into the formula they produced the correct number in the Fibonacci sequence. The above method was used in case of any small inaccuracies that the calculator would round, and the calculator was used for speed.

If you still can't find any of the coursework that you are looking for, click here to look at over 30,000 GCSE, A-Level and University Level essays on Coursework.Info.