Question: Please do the solution in RAPTOR if possible Develop an algorithm, in the form of a Raptor flowchart, to generate and display the sequence of

Please do the solution in RAPTOR if possible

Develop an algorithm, in the form of a Raptor flowchart, to generate and display the sequence of numbers from 1 to M such that each number in the sequence, other than the first three, is equal to the sum of its three predecessors. The first three numbers in the sequence are 1, 1 and 1. The number M is a positive integer to be provided as input to the algorithm. Note that M may not always be part of the sequence. The following are three examples of the expected input/output behaviour of the algorithm:

M = 127 Output: 1, 1, 1, 3, 5, 9, 17, 31, 57, 105

M = 200 Output: 1, 1, 1, 3, 5, 9, 17, 31, 57, 105, 193

M = 1000 Output: 1, 1, 1, 3, 5, 9, 17, 31, 57, 105, 193, 355, 653

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!