Narf: Mostly using an iteritive Version of the function I posted earlier; although it does have issues if you feed it 0 or a negative number. There is no cut and dry one line, one pass equation to get a square root using the basic four functions (*/+-)
Kamog: that method works based on geometry. First, consider a 1x1 square of selected numerals:
Code:
1
Notice that there is one 1. In order to expand the square to a 2x2 grid, you need to add in 3 places: one above (or below) the existing 1, one left (or right) of the one, and another to fill in the corner three of them:
Code:
33
13
Suppose that we want to expand it further to a 3x3; we need to add two above (or below), two to the left (or right) and one in the corner 5 of them:
Code:
555
335
135
To generalize this, to get a square of size (N+1)x(N+1) from a square of size NxN, you need to add 2*N + 1 squares. (note that this works from a 0x0 - 2*0 + 1 = 1). In subtracting progressivly greater odd numbers, you are reversing the process - first you take out one square:
Code:
555
335
35
Then you take out three squares:
Code:
555
5
5
Then you take out five squares:
Code:
Once you are all out of squares, you are done.
However, those squares could also represent numbers just as easily.