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

Home > Numbers > Sequences
Consecutive Conclusion II (Posted on 2022-05-25) Difficulty: 3 of 5
The sum of a sequence of N consecutive integers is 2022, where N is greater than 2.

Determine all possible values of N, and the valid sequence for each value of N.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 3 |
clearvars  
for N=3:800000
   b=2022/N - (N-1)/2;
   if b==round(b)
     fprintf('%7d   %d - %d\n',N,b,b+N-1);
   end
end

finds

      3    673 - 675
      4    504 - 507
     12    163 - 174
    337   -162 - 174
   1011   -503 - 507
   1348   -672 - 675
   4044  -2021 - 2022
   
where each is N followed by the range.

  Posted by Charlie on 2022-05-25 11:41: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 (12)
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