Re: expressing a number as the sum of 3 triangular numbers
Bill Allombert <[email protected]> Sun, 16 Nov 2025 19:46:40 +0100
| Newsgroups | gmane.comp.mathematics.pari.user |
|---|---|
| Message-ID | <aRocEAmIbtbYnCQc@seventeen> |
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.