0
/ 10
Description
In mathematics, the Pell Numbers follow a familiar recursive structure:
P(n) = 2 * P(n - 1) + P(n - 2) for n > 2
with...
In mathematics, the Pell Numbers follow a familiar recursive structure:
P(n) = 2 * P(n - 1) + P(n - 2) for n > 2
with initial values
P(0) = 0P(1) = 1Define a recursive function that gives the nth term in the Pell Number sequence.
Examples:
pellNumber(0) -> 0
pellNumber(1) -> 1
pellNumber(2) -> 2
pellNumber(3) -> 5
Your feedback will appear here when you check your answer.