text: Pell Number | Pell Number Series using Recursion in C ++ ; calculate nth pell number ; Driver Code
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; int pell ( int n ) { if ( n <= 2 ) return n ; return 2 * pell ( n - 1 ) + pell ( n - 2 ) ; } int main ( ) { int n = 4 ; cout << " ▁ " << pell ( n ) ; return 0 ; }