| Bill Allombert on Sun, 16 Nov 2025 19:46:44 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: expressing a number as the sum of 3 triangular numbers |
On Sat, Nov 15, 2025 at 09:28:35PM -0500, Max Alekseyev wrote:
> You can replace sqs3 with
>
> { sqs3_(N) = my(s = qfsolve(matdiagonal([1,1,1,-N])));
> vector(3,i,abs(s[i]/s[4])); }
Or by the threesquares function from
<https://pari.math.u-bordeaux.fr/Scripts/foursquares.gp>
But we already had this discussion two years ago!
<https://pari.math.u-bordeaux.fr/archives/pari-users-2310/msg00009.html>
(I took the opportunity to remove spurious headers from the archive)
Cheers,
Bill.