## Saturday, September 26, 2015

### Abstracted one generator for approximate square root of 3

Found myself intrigued by putting up just enough information to do the calculations for square root of 3 with one of an infinity of possible relations:

sqrt(3) approximately equals xn+1/yn+1, where:

xn+1 = 97xn + 168yn

yn+1 = 56xn + 97yn

and x0 = 1, and y0 = 0;

Does an n exist for: x = 1351, and y = 780?

With those if it does then: xn+1 = 262087, and yn+1 = 151316

And 262087/151316 equals approximately: 1.73205080758

Correct for sqrt(3), same number of digits: 1.73205080756

And differs from sqrt(3) by approximately: 1.26e-11

That pc calculator is so handy.

Oh yeah, negative DOES work. Just been kind of sloppy, and just talking the positive, so you can start with: x0 = -1, and y0 = 0

The math does NOT care. And of course you have two solutions! Positive and negative for sqrt(3). So yes, try x and y with different negations and see what happens! (Still works.)

Wondering if should fix prior posts, occuring to me don't really care as is freaking obvious anyway. Moving on to other more important things.

Still just doing these for fun.

James Harris

## Sunday, September 06, 2015

### More approximating square root of three

Did some math for fun where I used my BQD Iterator to approximate the square root of three, and found myself still thinking about it. So will extend things a bit. And will formalize a little so things will look a bit different from that post.

Ended with sqrt(3) approximately equals xn+1/yn+1, where:

xn+1 = 7xn + 12yn

yn+1 = 4xn + 7yn

and x0 = 1, and y0 = 0;

And I stopped with x = 1351, and y = 780, which I got using:

(7x + 12y)2 - 3(4x + 7y)2 = 1

And going to use the BQD Iterator to advance that a couple more, and then use that equation, to get a better approximation.

So next is:

(19x + 33y)2 - 3(11x + 19y)2 = -2

And next iteration is:

(52x + 90y)2 - 3(30x + 52y)2 = 4

And can divide off that 4 to finally get:

(26x + 45y)2 - 3(15x + 26y)2 = 1

Which is my new set and a quick check with x = 1, and y = 0, shows it works.

Now lets advance our x and y, so plugging in, x = 1351, and y = 780, I get:

(26(1351) + 45(780))2 - 3(15(1351) + 26(780))2 = 1

Which gives me my new x and y:

(70226)2 - 3(40545)2 = 1

And sqrt(3) approximately equals 70226/40545 which is about: 1.7320508077

Which is really close.

Now the new equations for approximating sqrt(3) are:

sqrt(3) approximately equals xn+1/yn+1, where:

xn+1 = 26xn + 45yn

yn+1 = 15xn + 26yn

and x0 = 1, and y0 = 0;

And why do it? Just for fun. Will admit it started to interest me that you have these recursive equations. So mainly did this post just to write it out that way.

There is some symmetry with the coefficients. And 3 itself is in there as a factor. Interesting.

You know you can just endlessly play with numbers just for fun. Of course it's trivial to get a calculation for the square root of 3, from the pc, but it's not like I need one.

Just playing around.

James Harris