Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What does Gosper_term ?

To evaluate a hypergeometric sum $$\sum_{n=1}^{N}f(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 $g_n/a_n$.

Let's take the provided examples:

  1. If a(n)=n then n.gosper_term(n) returns b(n)=1/2(n^2 - n)/n and if g(n)=a(n)b(n) then we indeed have f(n)=g(n+1)-g(n).
  2. If a(n)=nfactorial(n) then (nfactorial(n)).gosper_term(n) returns b(n)=1/n and if if g(n)=a(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 a(n).gosper_term(n) returns b(n) such that if f(n)=a(n)*b(n) then f(n+1)-f(n)=a(n)?

What does Gosper_term ?

To evaluate a hypergeometric sum $$\sum_{n=1}^{N}f(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 $g_n/a_n$.$g_n/f_n$.

Let's take the provided examples:

  1. If a(n)=n f(n)=n then n.gosper_term(n) returns b(n)=1/2(n^2 - n)/n and if g(n)=a(n)g(n)=f(n)b(n) then we indeed have f(n)=g(n+1)-g(n).
  2. If a(n)=nf(n)=nfactorial(n) then (nfactorial(n)).gosper_term(n) returns b(n)=1/n and if if g(n)=a(n)*b(n) 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 a(n).gosper_term(n) f(n).gosper_term(n) returns b(n) such that if f(n)=a(n)*b(n) then f(n+1)-f(n)=a(n)?g(n)=f(n)*b(n) then g(n+1)-g(n)=f(n)?