about | help | code help+videos | done | prefs |
n_bonacci
The Fibonacci sequence (1, 1, 2, 3, 5, 8, 13, 21, 34...) can be called the 2bonacci sequence. The 3bonacci sequence is 1, 1, 1, 3, 5, 9, 17, 31, 57, 105, 193, 355, 653, 1201...and the 4bonacci sequence is 1, 1, 1, 1, 4, 7, 13, 25, 49, 94, 181, 349, 673... Complete the n_bonacci function that returns the n_bonacci number in position p of the sequence. The first number of the sequence is in position 0. n_bonacci(2, 5) → 8 n_bonacci(3, 3) → 3 n_bonacci(3, 9) → 105 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy