3 @setfilename guess.info
4 @settitle Package guess
12 @dircategory Mathematics/Maxima
14 * Package guess: (maxima)Maxima share package to guess a formula for a sequence.
17 @node Top, Introduction to package guess, (dir), (dir)
20 * Introduction to package guess::
21 * Definitions for package guess::
22 * Function and variable index::
24 @chapter Package guess
26 @node Introduction to package guess, Definitions for package guess, Top, Top
27 @section Introduction to package guess
29 Package @code{guess} guesses a formula for a sequence of numbers.
31 This package provides functions to find a formula for a sequence,
32 of numbers within the hierarchy of expressions of the form,
33 <rational function>, <product of rational function>, <product of product
34 of rational function>, etc.
36 This package is a translation of the Mathematica package @code{Rate.m}
37 by Christian Krattenthaler (Kratt at pap.univie.ac.at).
38 The translation to Maple was done by
39 Jean-Francois Beraud (Jean-Francois.Beraud at sic.sp2mi.univ-poitiers.fr)
40 and Bruno Gauthier (Bruno.Gauthier at univ-mlv.fr).
42 All features of this package are due to C. Krattenthaler.
43 The help text is due to Jean-Francois Beraud and Bruno Gauthier.
45 @node Definitions for package guess, Function and variable index, Introduction to package guess, Top
46 @section Definitions for package guess
48 @deffn {Function} guess @
50 @*guess (@var{l}, @var{nlevels}) @
51 @*guess (@var{l}, "one") @
52 @*guess (@var{l}, "nogamma")
54 @code{guess(@var{l})} tries to find a formula for a sequence within the hierarchy,
55 of expressions of the form <rational function>, <product of rational function>,
56 <product of product of rational function>, etc.
58 @code{guess(@var{l}, @var{nlevels})}, where @var{nlevels} is a positive integer,
59 does the same thing as @code{guess(@var{l})},
60 but it searches only within the first @var{nlevels} levels.
62 @code{guess(@var{l}, "one")} does the same thing as @code{guess(@var{l})}
63 but it returns the first solution it finds.
65 @code{guess(@var{l}, "nogamma")} does the same thing as @code{guess(@var{l})}
66 but it returns expressions without gamma functions.
84 guess([1,2,6,24,120]);
95 guess(makelist(product(product(gamma(i)*i^2,i,1,j),j,1,k),k,1,8));
100 [ ! ! 4 ! ! 18 ! ! ---------]
106 guess([1,2,7,42,429,7436,218348,10850216]);
110 ! ! ! ! 3 (3 i2 + 2) (3 i2 + 4)
111 [ ! ! 2 ! ! -----------------------]
112 ! ! ! ! 4 (2 i2 + 1) (2 i2 + 3)
117 guess(makelist(k^3+k^2,k,1,7));
120 Dependent equations eliminated: (6)
124 [i0 (i0 + 1), 2 ! ! (- --------------------------------------),
126 i1 = 1 i1 - 24 i1 + 245 i1 - 1422 i1 + 360
130 ! ! (i1 + 1) (i1 + 2)
131 2 ! ! -----------------]
136 Note that the last example produces three solutions. The first and the last are
137 equivalent, but the second is different! In this case,
140 guess(makelist(k^3+k^2,k,1,7),1);
146 guess(makelist(k^3+k^2,k,1,7),"one");
149 find only the solution @code{i0^2*(i0 + 1)}, which is a rational function, and is also
150 the first function @code{guess} finds.
154 @node Function and variable index, , Definitions for package guess, Top
155 @appendix Function and variable index