+ 1
Python recursion problem
Can anyone tell me the logic behind this series??? 0 1 1 1 2 2 3 4 5 7 9 12 16 21 28 37 49 65..... I have to construct a recursive function for this
2 Respuestas
+ 2
It is possibly starting with 5 initial numbers , 0 1 1 1 2 and then builds the rest of series by adding previous number 4 index away from current number to present number.
For example adding 0 to 2 will yield 2 and then adding 1 to 2 will give us 3
0
Yes I did it and found the logic... implemented using for loop
bt now thinking how can I do it using recursion.