The gfun package

Gfun is a Maple package that provides tools for

  • guessing a sequence or a series from its first terms;

  • manipulating rigorously solutions of linear differential or recurrence equations, using the equation as a data-structure.

Latest version

 gfun 4.00 (April 2024).

Once downloaded, put the folder somewhere in your home directory.

If gfun_path is that location, set the variable libname so that Maple knows how to find gfun, by libname:="gfun_path",libname:

Be careful: the new path should appear before that of Maple’s library, otherwise the version of gfun shipped with Maple will be used. (See the help page of libname for more information).

It is convenient to add that line to your .mapleinit file (creating it if it does not exist) so that Maple will find the correct version of gfun in your future sessions.

You can then check that the installation worked by asking gfun:-version();

This command should return the number above. (You may have to restart Maple for your changes to be taken into account.)

The source code can be read by anyone who can read Maple code, but if you want to use the package, then it’s better to download it with the link above.


The function algvalues computes the algebraic values taken by an E-function at algebraic points. It is not part of gfun but can be downloaded here. A Maple worksheet of examples includes the examples given in the article

(missing reference)

This code requires a version of gfun ≥ 3.96.

Help pages

All the help pages are available directly from within Maple, and here are pdf versions:

Reference for gfun

The primary reference to use when citing gfun is the following one:

B. Salvy and P. Zimmermann, “Gfun: a Maple package for the manipulation of generating and holonomic functions in one variable,” ACM Transactions on Mathematical Software, vol. 20, no. 2, pp. 163–177, 1994.

If you are using the NumGfun subpackage, then the proper reference is:

M. Mezzarobba, “NumGfun: a Package for Numerical and Analytic Computation with D-finite Functions,” in Proceedings of the 2010 International Symposium on Symbolic and Algebraic Computation (ISSAC 2010), 2010, pp. 139–145.

Articles citing gfun

There are many of them. I used to maintain a list, but it is much easier to point directly to the corresponding page on Google Scholar.