All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
The sum of a sequence (Posted on 2004-12-14) Difficulty: 4 of 5
Find the sum of the sequence: x, 2x2, 3x3, 4x4, 5x5, ... , nxn.

See The Solution Submitted by Mohammad    
Rating: 3.4286 (7 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 3 of 10 |

This is a general finite case of the infinite sequence evaluated in the solution to Many Heads:  1/2 + 2/4 + 3/8 + 4/16 + ..., where x is 1/2 and n infinite.

Let y = x + 2x + 3x^3 + ... + nx^n

Dividing by x,
y/x = 1 + 2x + 3x^2 + ... + nx^(n-1)

Subtracting,
y/x - y = 1 + x + x^2 + ... + x^(n-1) - nx^n

Multiplying by x,
y - xy = x + x^2 + x^3 + x^4 + ... + x^n - nx^(n+1)

Subtracting,
y/x - 2y + xy = 1 - (n+1)x^n + nx^(n+1)

y(x - 2 + 1/x) = 1 - (n+1)x^n + nx^(n+1)

y = (1 - (n+1)x^n + nx^(n+1)) / (x - 2 + 1/x)

This can be verified with various x and n using the following program:

INPUT "x and n:", x, n
term = x: t = term
FOR termNo = 2 TO n
 term = term * x
 t = t + termNo * term
NEXT termNo
PRINT t
PRINT (1 - (n + 1) * x ^ n + n * x ^ (n + 1)) / (x - 2 + 1 / x)

Also, when x is equated to 1/2 and n allowed to increase without limit, the limiting value of the formula is indeed 2 as in the solution to Many Heads.

Edited on December 14, 2004, 6:39 pm
  Posted by Charlie on 2004-12-14 18:08:42

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information