The problem to solve is a simple add the consecutive integers from 1 to that number given a positive integer input So an example would be. Int x 5. The user enters a number indicating how many numbers to add and the n numbers.
For i in range start end 1.
This program adds n numbers that a user inputs. To make the math easier you can simplify to 7 15 105. Then take a value of 7 which is three consecutive bits set and test it at the possible bit positions in that word to see if you have three consecutive bits set anywhere in the word. If Sum N this means consecutive.