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

Home > Numbers > Sequences
Ducks in a row (Posted on 2003-08-04) Difficulty: 3 of 5
Given an integer n (n≠0), there are a finite number of sequences of consecutive integers whose terms add up to n (If n=25, then 3+4+5+6+7=25 is one such sequence with 5 terms).

a. Find an equation for the number of terms of the longest such sequence for any positive integer n.

b. Find equations for the bounds (the first and last terms) of the longest such sequence for any positive integer n.

Hint: Once you have an equation for the number of terms, and for the first term of the sequence, the last term is simply one less than their sum.

Hint 2: Ducks have absolutely nothing to do with the problem.

See The Solution Submitted by DJ    
Rating: 4.4167 (12 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Hints/Tips Some hints | Comment 5 of 7 |
If a number can be factored as p times q, and p is odd, then

n = (q-(p-1)/2) + ... + (q-1) + q + (q+1) + ... + (q+(p-1)/2)

Should the first term be negative, the first terms would cancel each other (as in 5=-1+0+1+2+3) and you would have

n = (-q+(p+1)/2) + ... + (q-1) + q + (q+1) + ... + (q+(p-1)/2)

The longest sequence could be the largest odd factor of n.

The last term would the the largest value of (q+(p-1)/2), as seen above.

As a remark, you can deduce which numbers do *not* allow such a sequence...

PS. If p is odd and q is even, you can also write

n = (p-q+1)/2 + .... (p-1)/2 + (p+1)/2 + ... + (p+q-1)/2

Some of the negative terms (if present) could cancel out some positive terms. The length of this sequence is q, and the maximum term, (p+q-1)/2.
  Posted by Federico Kereki on 2003-08-04 10:00:49
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
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