Known since antiquity: x

^{2} - Dy

^{2} = 1

The smallest integer solution by absolute value for x and y, not zero is called the

*fundamental solution*. Sometimes it can be quite large, but why?

For example, for D = 61, the fundamental solution is quite large:

1766319049

^{2} - 61(226153980)

^{2} = 1

Part of the key to the answer--hidden in simple math for millennia:

(D-1)j

^{2} + (j - 1)

^{2} = (x+y)

^{2},

where j = (x+Dy+1)/D, so our x, gives: j = 255110030.

60*255110030

^{2} + 255110029

^{2} = 1992473029

^{2}
A connection like no other, an ellipse to a hyperbola--an answer? Part of it.

Here's another example, for D = 313, which I

found in a Wikipedia article:

32188120829134849

^{2} - 313(1819380158564160)

^{2} = 1

so:

j = 1922217605302610

312*1922217605302610

^{2} + 1922217605302609

^{2} = 34007500987699009

^{2}
That one is too big for my pc calculator, though I could program something to check it, I'll use another trick.

I know that when x = -1 mod D that x+y+j-1 must be a perfect square or twice one.

That's an absolute by the way.

And yup, x+y+j-1 = 2*134033053

^{2} so it works! Oh yeah, same thing works above, which is another clue.

If x = -1 mod D and x

^{2} - Dy

^{2} = 1, with all nonzero positive integers, then these equations apply, across infinity. So oh yeah, it's an infinity result. I get a kick out of those things, try now to note when I have one.

Oh yeah, remembered I could use

Wolfram Alpha and everything checked out ok there.

Who knew? Ellipses and hyperbolas, like a freaky number family?

Of course I have the full answer. It's ok. To me it's just nice to know, but I like having answers to mysteries.

James Harris