I'm having trouble finding info in the docs about how to solve a system of congruences. The closest I can find is 'matsolvemod' in here: http://pari.math.u-bordeaux.fr/dochtml/html.stable/Vectors,_matrices,_linear_algebra_and_sets.html
but I'm not sure if that's exactly what it's used for because I don't really understand where the M parameter comes in with a system of congruences. Is there a function for solving a system of linear equations of the form:
x = a1 (mod b1) x = a2 (mod b2) ... x = an (mod bn)
(or even for just 2 or 3 congruences is fine)
EDIT: Okay, I've tried just using the algorithm and basic arithmetic instead of finding a function to do it for me automatically but am receiving an error:

Moddoes more than just take the value ofamodulob(it changes its datatype, too). Can you try just usinga%binstead? Though I'm not sure how to get the modular inverse in that case, you'll need to look that up. I'm sorry, I'm not of much help - I don't use PARI/GP. – Thomas Mar 18 at 1:30