0

Let $a,b$ be positive integers. How to efficiently solve the diophantine equation

$$94 \cdot 10^{16} + 1 = a^2 + b^2$$

?

The solutions $a,b$ are unique (up to switching $a$ and $b$) because $94 \cdot 10^{16} + 1$ is a prime $1 \mod 4$.

Ofcourse one of $a,b$ is odd while the other is even. In fact $a,b$ are coprime.

A big search with a computer is ofcourse not considered valid.

Considering the expansion of

$$(1 + x + x^4 + x^9 + x^{16} + x^{25} + x^{36} + ...)^2$$

at the term $x^{94 \cdot 10^{16} + 1}$ without any speed up tricks is also not considered efficient.

With some guessing and puzzling and assuming that the ratio $a/b$ was not to boldly far from $94$ (*) I managed to get :

$$a = 969 427 940,b = 14 473 049 $$

where the ratio $a/b = 66.98..$


  • $94$ because $10^{16} + 1 $ is close to a square and so is $94$ ????

Is it true that Ramanujan solved this type of diophantines out of his head with continued fractions ?

How to reduce this to a problem of continued fractions ?

Is there a useful closed form for $a,b$ ?

What number theoretical functions help alot here ? Quadratic residue ? Integer Factoring ? (if that is still considered efficiently is another matter)

Perhaps a line of attack is set $p = 94 \cdot 10^{16} + 1$ and for some integers $Q,S$ we have $Q p = S^2 + 1$ [*]

Then $S^2 + 1 = (S + i)(S - i)$ and {$GCD(S+i,p)$, $GCD(S-i,p)$} is equal to {$a + bi$,$a-bi$}.

CGD is easier than factoring for any euclidean ring, so both integers and gaussian integers.

But I have no efficient method to solve $Q p = S^2 + 1$.

Maybe trying pythagoras ideas like $Q p - 1 = S^2 = u^2 + v^2$, if that even makes sense ?

Should I involve cubics maybe ?

Or maybe some kind of "Chakravala method" ?

see :

https://en.wikipedia.org/wiki/Chakravala_method

Or I would be impressed by some kind of infinite descent, however that is usually used to show something does not exist or is unique in a nonconstructive way.

I seem unable to find a deterministic efficient algoritm.

mick
  • 17,886
  • Perhaps somewhat related : https://math.stackexchange.com/questions/5072243/patterns-for-euclidean-complex-quadratic-rings – mick Jun 04 '25 at 00:28
  • There are techniques to solve $a^2+b^2=p,$ for prime $p\equiv1\pmod 4,$ I forget what they are though. Probably will require a computer. – Thomas Andrews Jun 04 '25 at 00:31
  • @ThomasAndrews deterministic or with guesses ? – mick Jun 04 '25 at 00:33
  • 1
    Deterministic. I'm remembering a particular algorithm I saw with continued fractions, but it was a long time ago. I remember I was surprised at the time. – Thomas Andrews Jun 04 '25 at 00:34
  • I wouldn't say $94$ is "…close" to a square. It is $13$ away from $81$ and $6$ away from $100.$ "Close" has to be described in relative terms. If $m=N^2-6,$ I would only call it "close" if $N$ is a bit larger than $10.$ – Thomas Andrews Jun 04 '25 at 00:37
  • @ThomasAndrews Origin of the algorithm ? Ramanujan ? – mick Jun 04 '25 at 00:38
  • I vaguely recall the book, by the look of its hardback cover. If it had a paper cover, I never saw it. I don't even recall the title, but it was on number theory. It is in a box somewhere here. I don't recall it referencing to Ramanujan, but I may be forgetting - this was more than 35 years ago. It wasn't an obscure book, because when I related it to a friend, I remember him saying, "Was it in ..." and getting the author correct. – Thomas Andrews Jun 04 '25 at 00:44
  • 1
    Does it help that $94 \cdot 10^{16} + 1$ has the form $A(x - h)^2 + k$ (vertex form of a quadratic)? – Hudjefa Jun 04 '25 at 00:46
  • @Hudjefa I wondered that myself. – mick Jun 04 '25 at 00:50
  • Then I think $a^2$ and $b^2$ should be of the form $\left(x^4\right)^2$ – Hudjefa Jun 04 '25 at 01:43
  • @Hudjefa i see no need for that. And i think the example given is already a counterexample. – mick Jun 04 '25 at 18:28
  • I'm not as familiar as I'd like with the topic. I put down some random musings of mine on the Diophantine under the assumption that you might see what I don't. Apologies it didn't work out. The moderator comment says that the question is a duplicate (verbatim that it already has answers). I made the same mistake multiple times and paid for it. – Hudjefa Jun 05 '25 at 12:28
  • @Hudjefa its ok – mick Jun 08 '25 at 00:43

0 Answers0