Ponder This

Welcome to our monthly puzzles.
You are cordially invited to match wits with some of the best minds in IBM Research.

June 2021 - Solution

<< May July >>

June 2021 Challenge

While brute force is possible, certainly for the non-asterisked part of the problem, a quick way to determine possible representations as x^2+ny^2 is using Cornacchia's algorithm, which can be easily implemented without relying on any number-theory-specific math library.

A simple solution with more than 100 digits arises for a=34 and b=75, giving the following solution:

(34, 75)
(2341523227685802973317116937233099044272373695299363945845, 1333030648893058553789277061401358577881136005688481248832)
(1688720447290015642452516760229506509635032011397287059257, 1484574852876236578030099116366398251085237658488907102090)
(1393905404716216131892233482794414472900782174600716102781, 871511778412605044471256876208116162244764418001268613572)