The Four Numbers Game is a mathematical game, as taught by Dr. Paul Sally, Prof. of Mathematics at the University of Chicago. To play this game, draw a square and put a number at each corner, thus:

5___9
| |
| |
| |
7___13

Now form a new square based on the difference between each the values at the ends of each side. Example:

5_4_9
| |
2 4
| |
7_6_13

This gives a new square, which I'll rotate anticlockwise 45 degrees.

4___4
| |
| |
| |
2___6

This in turn gives

0___2
| |
| |
| |
2___4

Then

2___2
| |
| |
| |
2___2

Then

0___0
| |
| |
| |
0___0

At this point, the game is over. You count the number of squares you made, excluding the original, and try to get as high a score as possible.

What are the best numbers to choose? In general, Tribonacci numbers take a very long time to converge. If you pick a group of 4 successive Tribonacci numbers, this is what happens.

149 _ 274
| |
927 _ 504
125 _ 230
| |
778 _ 423
105 _ 193
| |
653 _ 355

This will go on for a long time, reaching all zeros on the 18th square. The complete set of corners is:

125 230 423 778
105 193 355 653
88 162 298 548
74 136 250 460
62 114 210 386
52 96 176 324
44 80 148 272
36 68 124 228
32 56 104 192
24 48 88 160
24 40 72 136
16 32 64 112
16 32 48 96
16 16 48 80
0 32 32 64
32 0 32 64
32 32 32 32
0 0 0 0

If you want to explore further, you can play online, courtesy of czeano, at:

http://projectmayhem.org/~czeano/fournumb.php

Alternatively, you could enter the following

C++ program:

// Program for the Four Numbers Game
// By Stuart Finlayson
// This code is public domain, and the author surrenders all rights to it
#include <iostream>
using namespace std;
main() {
int a, b, c, d;
int a1, b1, c1, d1;
cout << "Enter 4 integers for the corners\n";
cin >> a >> b >> c >> d;
while (a!=0 || b!=0 || c!=0 || d!=0) {
a1 = abs(b-a);
b1 = abs(c-b);
c1 = abs(d-c);
d1 = abs(a-d);
a=a1; b=b1; c=c1; d=d1;
cout << a << ' ' << b << ' ' << c << ' '
<< d << endl;
}
return 0;
}

##### Further reading

Anonymous, "The Four Numbers Game". http://www.geocities.com/SiliconValley/Park/5376/num.html, 2001/10/30.