text: Pell Number | Pell Number Series using Recursion in C ; calculate nth pell number ; driver function
code: #include <stdio.h> NEW_LINE int pell ( int n ) { if ( n <= 2 ) return n ; return 2 * pell ( n - 1 ) + pell ( n - 2 ) ; } int main ( ) { int n = 4 ; printf ( " % d " , pell ( n ) ) ; return 0 ; }