in reply to Intriguing problem; maybe golf?
sub c {(8**$_[0]-1)/7}
Proof: For any x and n, by factoring, x**(n)-1 == (x-1)(x**(n-1)+x**(n-2)+...+1). So: x**(n-1)+x**(n-2)+...+1==(x**(n)-1)/(x-1). So, for x == 8: 8**(n-1)+8**(n-2)+...+1==(8**(n)-1)/7. And there, the left side is the sequence, the right side my solution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Intriguing problem; maybe golf?
by bobione (Pilgrim) on May 31, 2001 at 13:26 UTC |