What does Gosper_term ?

asked 0 years ago

Emm gravatar image

updated 0 years ago

To evaluate a hypergeometric sum Nn=1f(n) where f(n+1)/f(n) is a rational fraction in n, it is useful to express f(n) in the form g(n+1)g(n) and thus be able to construct a telescopic sum.

The Gosper algorithm allows this in some cases.

So, I am looking for a command that, given f(n) as an input returns g(n).

I thought gosper_term would do this based on the documentation

However, it seems that this command rather returns gn/fn.

Let's take the provided examples:

  1. If f(n)=n then n.gosper_term(n) returns b(n)=1/2(n^2 - n)/n and if g(n)=f(n)b(n) then we indeed have f(n)=g(n+1)-g(n).
  2. If f(n)=nfactorial(n) then (nfactorial(n)).gosper_term(n) returns b(n)=1/n and if if g(n)=f(n)*b(n) then we indeed have f(n)=g(n+1)-g(n).
  3. I tried f(h)=h4^h/((2h-1)^2(4h+1)(4h+3))binomial(2h,h)/binomial(4h,2h) and got the same conclusion.

Question. Can someone confirm that my intuition on a few examples is correct, i.e., that f(n).gosper_term(n) returns b(n) such that if g(n)=f(n)*b(n) then g(n+1)-g(n)=f(n)?

Preview: (hide)

Comments

It looks like a bug. Please report at https://github.com/sagemath/sage/issues

Btw, if you have access to Maple (from within Sage), you can also use a more advanced Zeilberger's algorithm.

Max Alekseyev gravatar imageMax Alekseyev ( 0 years ago )