Approximately how many numbers with at most d digits can be
written as the sum of two complete
squares?
Is the splitting of the prime p=4k+1 into a^2+b^2 unique?
See CoCalc
Sagemath page for further explanations.
Finding complete squares summing up to a prime for your own
large prime
The part below uses the mathematical programming environment sage
(
www.sagemath.org/). The
cells with the numbered lines are programming code, which will be
executed on the free cloud
service
sagecell.sagemath.org/
-
Type in a large whole number p0 below (replace the 987654321 for example with 2^100) and then click on evaluate. This may take a few seconds as the sagecell server needs to start up a computation.
- The following block finds the next prime number p after p0 that has the form p=4k+1. This may take a while for large numbers p0. Click Evaluate to run the code.
- The following block finds the whole numbers a and b such that the complete squares a^2 and b^2 add up to p. This should be faster than finding the large prime. Click Evaluate to run the code.