In accordance with our meta agreement, since one candidate received more votes than the others, we have a new featured language! Throughout March 2022, our Language of the Month will be:


What's a Language of the Month?

See the meta post for nominations. In short, during March , those who wish to participate should learn (at least the basics of) PARI/GP, and use it to solve challenges. Participation is completely optional, but is anticipated to be fun!

Information about PARI/GP

PARI/GP is a CAS (Computer Algebra System) designed for number theory. It consists of two parts: PARI is a C library, GP is an interactive shell and a scripting language. Even if you are not familiar with algebraic number theory, GP is still a powerful language for golfing math problems.


  • Intuitive syntax and good documentations. Easy to learn.
  • Built-in types for vectors, matrices, polynomials, power series, and many other math objects.
  • Lots of built-ins, especially for number theory, but also for linear algebra, polynomials, and other branches of algebra.
  • Single byte operator # for length (of vectors, matrices, strings, etc.).
  • Many OEIS pages have a PARI/GP program for the sequence.


  • Not so many built-ins outside of math. On the other hand, this force you to think out of the box, for example, using polynomials to solve array challenges.
  • Very limited array programming. You can add two vector or multiply a vector by a scalar, but there is no built-in to do element-wise multiplication.
  • You need to know some math to master the language.
  • The version on TIO is somewhat out of date.



I (alephalpha) will be offering a +50 rep bounty to any user's first PARI/GP answer during this month, and +200 to any user's tenth PARI/GP answer during this month. This includes using the GP scripting language, or using the PARI lib in a C/C++ answer.


1 Answer 1


List of all PARI/GP answers posted in March 2022

(first-time posters in bold)

List of relevant tips posted in March 2022

  • add entries in the form:

    [<tip summary>](https://codegolf.stackexchange.com/a/<answer-ID>) by [username](https://codegolf.stackexchange.com/users/<user-ID>)

List of relevant challenges posted in March 2022

  • add entries in the form:

    [<challenge title>](https://codegolf.stackexchange.com/a/<answer-ID>) by [username](https://codegolf.stackexchange.com/users/<user-ID>)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .