Given the sum of a geometric progression and the number of terms, can we recover the progression?

62 Views Asked by At

Consider a set of numbers which are in geometric progression: $n, nd, nd^2, \ldots ,nd^{M-1}$

Their sum is $S=\frac{n(d^M-1)}{d-1}$.

Now if we know the values of $S$ and $M$, can we find values of $n$ and $d$ which are positive integers?

I know the linear Diophantine equation for solving $ax+by=c$. So is there similar method of integer programming to find solutions of this equation?

1

There are 1 best solutions below

0
On

There's a simple method that works, although I don't make any claims for its efficiency.

Given $S$ and $M$, $n$ must be a factor of $S$. There are only finitely many factors of $S$, and they're all between $1$ and $S$, so, in principle, you can make a list of all the possible values of $n$.

Then, for each of these finitely many values of $n$, there are only finitely many integers $d$ such that $|(d^M-1)/(d-1)|\le S/n$, so you can try these values of $d$ in turn until you have found all the ones that work. Then, you're done.