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

Home > Numbers
Arranging numbers in a row (Posted on 2008-11-20) Difficulty: 2 of 5
How many numbers, from 1 to 50 (both included) can you arrange in a row (one of each) so that each one, except the first and the last, is the sum or difference of its two neighbours?

Example: 3, 10, 7, 17, 24, 41.

10 = 3+7, 7 = 17-10, 17 = 24-7, 24 = 41-17.

See The Solution Submitted by pcbouhid    
Rating: 2.3333 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Re Charlie's | Comment 4 of 12 |
After posting I looked at Charlie's and found that we came to the same unique solution.  I used 13 imbedded loops (after starting with smaller sets) varying each variable from 1 to 50, in each testing that the variable had not been used already, and then testing that all numbers from the second thru the second to last were equal to the absolute value of either the sum or the difference of the surrounding values.  Since I worked from left to right, each solution set contained a sequence and its reverse.  The logic was easy to expand by adding and testing an additional variable.  Congrats, on beating me to it again!
  Posted by ed bottemiller on 2008-11-20 18:10:48
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 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information