GP in your browser
Help / Community
Contributed GP scripts
Tests & benchmarks
Nice scripts and programs for PARI/GP
Books / Lectures
Numerical Algorithms for Number Theory (AMS Surveys and Monographs
254, 2021, 429 pages) by Karim Belabas and Henri Cohen.
Experimental Number Theory (Oxford Graduate Text in Math 13, 2007,
232 pages), a book by Fernando Rodriguez-Villegas, containing a huge number
of sample GP programs.
[get there]. A series
of introductory lectures about number theory, with a bias towards explicit
computations, by William Stein. It contains an introduction to GP and many
The SIAM 100-Digit Challenge book is a gourmet feast in ten courses on
(high precision) numerical analysis. Some GP scripts are available on the
book web site.
Series, products, integrals
- [get it] (v1.2)
indefinite summation of rational functions
using Gosper's algorithm (by Ralf
- [get it] Zeroes of Hecke L-functions (by
- [get it] (OBSOLETE). Compute values of Hurwitz zeta and Dirichlet
L-series, partial fraction decomposition of a rational
function F, as well as
(by Henri Cohen). The functionality is available in pari-2.10.
- [get it] (OBSOLETE) values of motivic L-functions (by
Tim Dokchitser). The functionality is available in pari-2.7.
- [get there] descent via isogeny on elliptic curves which have a rational
torsion point of order N (by V. Flynn and C. Grattoni).
- [get it] torsion over number fields, isogeny graphs, divisors, Vélu
formulae (by François Brunault).
- [get it]. 2-descent over number fields. Works quite well for fields of
degree less than 3, and is well suited for handling several quadratic twists
of a common curve. It gives an alternative to John Cremona's mwrank even over
Q. Of independant interest, the submodule
qfsolve solves efficiently any ternary quadratic equation, even
not in diagonal (Legendre) form (by Denis Simon).
Compute Heegner points, p-adic or complex (by Peter Green).
- [get it].
Derived periods and the Mazur-Tate circle pairing (by
Henri Darmon and Massimo Bertolini).
- [get there] The APIP library (GPL) for computing standard and optimized
variants of most cryptographic pairing, by Jérome Milan
- [get original] / [get new version] (OBSOLETE).
Hecke operators on S2(Γ0(N)), by
Joe Wetherell, William Stein, Dominique Bernardi, Bernadette Perrin-Riou and
Karim Belabas. The functionality is available in pari-2.9.
- [get it] (OBSOLETE). Various scripts by
John Cremona (Heegner points, division polynomials, Weil pairing,
group structure over ℤ/pℤ). The functionality is available
[get it] (OBSOLETE). The 'ellsea' package, an implementation of the
Schoof-Elkies-Atkin algorithm over a prime field,
by Christophe Doche and Sylvain Duquesne. The functionality
is now available natively in pari-2.5, using the
seadata official package.
[get it] (OBSOLETE). An implementation of Satoh's point-counting algorithm
(by Kim-Ee Yeoh).
The functionality is now available natively in pari-2.7:
[get it] (OBSOLETE).
Compute heuristically the analytic rank of an elliptic curve (by Tom Womack).
The functionality is now available natively in pari-2.5:
A Database of Local Fields, by John W. Jones and David P. Roberts.
memoize wrapper (function caches results from previous
calls; simplifies writing efficient recursions, for instance) by Kevin Ryde.
fullfactor package, implementing a large set of
integer factorization helpers for integers of a special form (includes tables
from the Cunningham project).
An implementation of fundamental domains for Shimura curves. You can compute
fundamental domains and view them with a Python application (using
Matplotlib), by James Rickards.
A package for integral binary quadratic forms and quaternion algebras over
by James Rickards. For integral binary quadratic forms, this includes
For quaternion algebras over Q, this includes
- lists of (fundamental, coprime to a given integer n) discriminants;
- automorph, discriminant, reduction, and equivalence of forms;
- for indefinite forms: compute all reduced forms, the Conway river, left and
right neighbours of river/reduced forms, intersection numbers;
- narrow class group and a set of generators, reduced
forms for each element in the group;
- integral solutions (x,y) to Ax2 + Bxy + Cy2
+ Dx + Ey + F = n;
- simultaneous integral solutions to Ax2 + By2
+ Cz2+Cz + Dxy + Exz+ Fyz = n1
and U x+V y+W z = n2;
- maximal/Eichler orders
- optimal embeddings of a quadratic order into a quaternion
algebra, arranged with respect to the class group action and their
orientation; intersection number of pairs of optimal embeddings;
- elements of norm n in an Eichler order (when n is
coprime to the level), action of Hecke operators Tn on
- fundamental domain of unit groups of Eichler orders in indefinite
algebras (Shimura curves).
A page on diagonal quartic surfaces, containing GP scripts and PARI
programs (Picard groups and point counting); by Martin Bright.
[get there]. Large library of GP routines, developed by
Fernando Rodriguez-Villegas and
Ariel Pacetti: quaternion algebras, binary quadratic forms, conics,
jacobian of cubics/quartics, Igusa invariants, Dedekind's eta function on CM
points, skew-symetric matrices, elliptic units, elliptic dilogarithm, p-adic
gamma function, Brandt matrices, lifting matrices, polynomials in several
variables, vector handling routines, various factoring algorithms over Z
(p-1, Lenstra), K-theory of number fields and zeta values
(Lichtenbaum-Zagier conjectures), statistics...
- [get there] Miscellaneous scripts
written by Jörg Arndt (continued
fractions, Pell equation, recurrent sequences, gaussian normal basis,
hypergeometric functions, singular value decomposition)
- [get there]
Miscellaneous scripts written by Max Alekseyev:
number of Hamiltonial paths and cycles in graphs,
inversion of Euler Totient function, binomial coefficients modulo primes
number of subgroups of an abelian group, period of recurrent sequences modulo
primes, empirical recurrent formulas with polynomial coefficients, generation
of integer partitions, number of irreducible multivariate polynomials over
there] Bianchi.gp, by Alexander Rahm: compute fundamental domains for the Bianchi groups.
[get it] (OBSOLETE) Ramanujan's τ function (naive O(sqrt(p)) algorithm,
by Henri Cohen). The functionality is available in pari-2.9.