Bill Allombert on Fri, 14 Nov 2025 22:33:19 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: gaussian integer modulus / Pollard's rho method on gaussian integers


On Fri, Nov 14, 2025 at 12:22:01AM +0100, hermann@stamm-wilbrandt.de wrote:
> I used gaussian integer modulo since years, eg. for determining sum of two
> squares for a prime =1 (mod 4) [before I learned about
> "gcd(lift(sqrt(Mod(-1,p)))+I,p)"]. I started with 2010 Python code from
> Robert Chapman and transpiled it to Pari/GP:
> https://github.com/Hermann-SW/RSA_numbers_factored/blob/main/pari/RSA_numbers_factored.gp#L142-L220
> 
> Now I tried to use GP t_COMPLEX instead of a vector of two numbers for
> gaussian integers. And the code tells so much more how and what is done:

Exercise: write a GP script that write a number as the sum of three triangular numbers.

Cheers,
Bill