Does Bachet's conjecture hold if the numbers that are squared are required to be unique?

34 Views Asked by At

Some backstory, forgive me for not having any kind of mathematical background:

A friend of mine received an optional programming assignment to write an algorithm to find the four squares that sum to a given 5-digit number. The professor asserted that for every number there will be a solution. However, he added the constraint that all numbers must be unique amongst themselves.

I started playing with it, and for both the recursive and loop-based function I wrote, I got the following list of counterexamples when uniqueness was enforced:

12288
16384
18432
24576
28672
32768
45056
49152
65536
73728
98304

Is this an error in my programming, or does the conjecture indeed not hold when this constraint is included?