This is just a sandbox for you to work in, if you’d like. Be aware that there is no way to save your work except to cut and paste it elsewhere.
Some common commands:
Mod(a,n)computes the residue ofamodulon. If you need to do a giant exponent, put it outside, likeMod(a,n)^eso the computer does it sensibly.gcd(a,b)computes the gcd ofaandb.xgcd(a,b)computes the extended euclidean algorithm ofaandb(i.e. it outputs the solution to the linear Diophantine equation $ax+by=gcd(a,b)$).primitive_root(p)will give a primitive root modulop.next_prime(n)will compute the first prime aftern(e.g. $n+1$, $n+2$ etc.)is_prime(n)will return True ifnis prime, and false otherwise.factor(n)will display a factorization ofn.euler_phi(n)will compute the Euler phi (totient) function ofn.randint(n,m)will give a random integer betweennandminclusive.