More weird behaviour in Gosper and nusum (maxima does not know enough about factorials)



(%i1) load(zeilberger);
(%o1)  /usr/share/maxima/5.11.0/share/contrib/Zeilberger/zeilberger.mac
(%i2) AntiDifference((k+1)!-k!,k);
(k + 1)! - k!  is not hypergeometric in  k
(%o2)                         NON_HYPERGEOMETRIC

nusum has a similar problem, and hence so does closed_form.

I think maxima really needs some rules to work with factorials. At the
minimum there
should be some (optional) rules like

(expr+constant)!=expr! * (expr+1)*....*(expr+constant)

and similarly for (expr-constant)!.

Unfortunately this is somewhat tricky as  expr is equal to (expr-1)+1.

I fact maxima is aware of this! As an experiment I did

matchdeclare(n,true);
tellsimpafter((n+1)!,(n+1)*n!);
k!;
         k (k - 1)!   <== No this is *not* what I want. Maxima is too
smart:-(
                             


Michel