(In reply to
Solution by Old Original Oskar!)
The following program evaluates the actual sum, my formula and O.O.O.'s formula for various x and n:
CLS
FOR x = 2 TO 5
FOR n = 2 TO 5
term = x: t = term
FOR termNo = 2 TO n
term = term * x
t = t + termNo * term
NEXT termNo
PRINT x, n, t,
PRINT (1 - (n + 1) * x ^ n + n * x ^ (n + 1)) / (x - 2 + 1 / x),
f = x * (n * x ^ (n + 1) - (n + 1) * x ^ n + 1) / (x - 1) ^ 2
PRINT f
NEXT
PRINT
NEXT
The results agree. The columns below are x, n, the actual sum, my formula, O.O.O.'s formula:
2 2 10 10 10
2 3 34 34 34
2 4 98 98 98
2 5 258 258 258
3 2 21 21 21
3 3 102 102 102
3 4 426 426 426
3 5 1641 1641 1641
4 2 36 36 36
4 3 228 228 228
4 4 1252 1252 1252
4 5 6372 6372 6372
5 2 55 55 55
5 3 430 430 430
5 4 2930 2930 2930
5 5 18555 18555 18555
|
Posted by Charlie
on 2004-12-14 18:28:11 |