Bill Allombert on Mon, 02 Oct 2023 20:54:42 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: How to generate wolframscript "PowersRepresentations[...]" output in PARI/GP
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: How to generate wolframscript "PowersRepresentations[...]" output in PARI/GP
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Mon, 2 Oct 2023 20:54:29 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1696272865; c=relaxed/relaxed; bh=cmRvCdihwT7c1gJl+o5aT4DnAFj9yLLrSYzz3l8rh/E=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=kSMRNR/gUN8vctshchXdUG8ZfcZqMtpFMAgGkjSTMw9J+fPU+Wl41Xmw5hzChHAcFExSDfgptx+yJyAve/OuOqgTpgxizKYbN5mcW8peVTIl6YYPPdfgVYV5/jpauc84YkIdQjgwyKI2+Uk0qiGsvT1+CyUIw5w6v3FZEhO/uNRLG51vc9JSq/f4Zd2Vle98qgoqcbfOGx8LUavAKdQ0Y6hnADol6U80eR4g09zqbJ5Do1SmvIzuGjP2haRLu3oWfcOZ7PO7ajssZYCZ+Ff/K5UmtG4F8ed3EO7Va8uMFSens0iU1Vm2PzybVBZXKpPSVb1q0Nn8SjSpPMDRd9lWR3F7YbleAkkmthx62LN1XGr4JqtFrisrpk5N+Wf4kjsj6GKfnm7Fo5TC/k6hK7JCmc3cRdDdZ+QpLnmFw9ES4LdBl56BhLvLawg/RehYI/5Zjyxe9K3YqaOklaIMqkDzpxz50yYtn8Wmeqsj7ywk12GkK6Y4pKznh9LRg0cqx9aW/b/eLs/SMbS3sxy5U/BabbiC7loLq7026fvSlrTZRSCa/A53HDdCgPOUU7IWu9BLsWMezMygVEjR1sBw1yyF/XztJVDsjbyGaUUNqlEeK+Ae/u3PSjckwrOqU7bo6rfijbPe+9cjw2bhZuzEBBUhlcZ7dzGwxHfho0nNRY0To50=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1696272865; cv=none; b=xGN73C2M1mB2zzJT4Howj30MWUAegwswPe8tSvynVQuAYANkYx9n88l24N7UEWiZm2tea0uLOfwYm7OmBuuNHfri2YmRKRA9+Ya6poJWWHjD7tTO4hE2QGpz1upbjjGcKNNZf8SKw/k1uFv9V+oY35TE7l6q3aASrMIh+yB5CymsMkfb+UEUbbDpS997IPN/QK7UhCfKhoWyK2IS45QqKLU+yCxDTjGxnV+rZktMP8V2D4VkFhLrL1yhFpbmFYqah5554J37B/vn1Xs1cGU1ABd7vgNORhyLKg5f1ZxJxeHilOQSEwmnGzpoA3UfY/JE3w1injlanbR0+ZIV2EQeIqA/imv4gVwFAj2g+qR+0zPzFJtdaQ+/NdRpVmoS2GpgxaAHGPjgRrqgxuDchfP+JK6FJ7aBapeLR9sLK+bpRany2a9V/zadnlJWJ9KSS79nE5vKIbE+IBrg7iumy7KD0EmeH6fOoC5W9ACwDJgKQXPzz2ejUNWDlmRrcfKwrP7gHbBo1LqWK4eR5ZEzG/eto4VifBSaG2T+Yf5FOlTt64USYn6iKNnbLFoCUHCuGZJnVvpe4SL/jjbV8/xNf/f9DThzfJ0D54FkCtcU7Hxp95qI5SgmnZqGYkCiJrysOXTbNoLpvdmfr7rQPPdP5PRTA81Enr9sLS99cfQsg6LetpQ=
- Authentication-results: smail; arc=none
- Delivery-date: Mon, 02 Oct 2023 20:54:42 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1696272865; bh=cmRvCdihwT7c1gJl+o5aT4DnAFj9yLLrSYzz3l8rh/E=; h=Date:From:To:Subject:References:In-Reply-To:From; b=eG9DzwY2unVnRg9PU7AQThqk8luBLiseW45Rw4KfPgUuqfuCH0OYmCcA1bg0EepPg YryuxKl2DCFGKwFoQj+N0m2UYnghFUGRWpkNXObeDS/B4K5ftosUXHTVdRSRbpgCE9 OP236GTwE2mPthFR3vEgRVPlP9paU0SRzZg2tN4UBYt7/DTPQhe/SAooQH5aCPXc9a UQvxuouiU3XNd4YOjxSJdp/FCdkuOzhb7Ve/mv2QoZj6YCyR8vELnXWfkfASbriuBC 7s90p7vd4y+OGqXdmfCL3xnhoAL7hOktCIOAcE98kQItWP01EcQ+1HL397nRAw+v9M RybsIdA80w0qFl0lUxvCsfDlQbLhwtrPUIHNhAKcIFU1deaX0PPD1dkTnzWbKGnmlj SqxHpMvKntuShpbGFCrQq2tkFLAXPNjMsjGAE3Lif0/XKGFjwA0esFapTMLpKV7eqM 3y0f3HKECVrrgLlQbQnoDqP9BlV5A4/9Qm416icwZHbi/2nPfw4dHMdtZ3OH+3sv5w O6/VdWjBHpN3Ld6vHS+pF0Z/VyerkAXh3f8jlaHqcmh53Ps4gyUD3COQNXE+Z8qIz9 1U0rn53r8EvvZnXo2BPFuTB4ZqtoxqRZyqULN5wE/O/0PUMDl6an9Ds2Lpi16yGnOw 7JeJFNp5zd2IBTpaf9xiqh90=
- In-reply-to: <f7c048745aec43281aeb72b3b2f15d9d@stamm-wilbrandt.de>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <f7c048745aec43281aeb72b3b2f15d9d@stamm-wilbrandt.de>
On Mon, Oct 02, 2023 at 08:38:54PM +0200, hermann@stamm-wilbrandt.de wrote:
> https://reference.wolfram.com/language/ref/PowersRepresentations.html
> "PowersRepresentations[n,k,p]
> gives the distinct representations of the integer n as
> a sum of k non-negative p^(th) integer powers."
>
> I searched for all hits for "powers" and "representations" in GP user
> manual and found nothing. How to compute sum of 4 squares of here
> 17*29 semiprime with PARI/GP by using any builtin function?
If you want only one solution, you can do
foursquare(n) = abs(qfsolve(matdiagonal([1,1,1,1,-n]))[1..4]);
? foursquare(17*29)
%15 = [0,0,13,18]~
? foursquare(2^127-1)
%13 = [3485713606461563310,6176908041673972933,4510469025815889567,9974590734764851407]~
Cheers,
Bill