PARI
Here are some notes and programs from an elementary number theory course (Math 7) taught at Caltech.
Notes
Programs
- Collatz.gp
Calculates the length and terminating value of the 3n+1 algorithm for any starting value.
- congruent.gp
Searches for a rational right triangle of given integral area.
- iscongruent.gp
Determines if a given number is a congruent number (assuming the Birch and Swinnerton-Dyer conjecture).
- iscarmichael.gp
Determines if a given number is a Carmichael number.
- fermat.gp
Determines the primes that are congruent to 2 mod 3, less than 1000 and for which the first case of FLT does not hold.
- primes1mod4.gp
Generates a list of primes congruent to 1 mod 4 using the procedure described in the book.
Save these programs to the same directory as PARI, then open PARI and type \r followed by the file name.
Links
- Go here to download the latest version of PARI.
- The User's Guide is here, the Tutorial is here and the Reference Card is here.
- The PARI homepage is here.
- Some elementary examples of programming in PARI are here.
- A catalogue of PARI functions is here.
- William Stein's online PARI and MAGMA calculator is here.