Question: Using Python 3.6.0 Consider the following sequence of numbers 1,1,1,3,5,9,17,31,57.. the first 3 numbers are 1 1 and 1 . Every subsequent number is the

Using Python 3.6.0
Consider the following sequence of numbers
1,1,1,3,5,9,17,31,57..
the first 3 numbers are 1 1 and 1 . Every subsequent number is the sum of the previous 3 numbers . This the 4th number is the sum of 1,1,1 = 3 . The fifth number is the sum of. 1,1,3 thus 5. The sixth number is the sum of. 1,3,5 thus 9 and so on and so forth.
q2.
given two numbers a and b output all numbers in the sequence between a and b (inclusive)
sample output
enter a : 2
enter b: 30
3 5 9 17

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!