double foo( unsigned n, double x ) { if( n == 0) return 1; if( n == 1) return x; return ( (2*n-1)*x - foo(n-1,x) - (n-1)*foo(n-2,x) )/n; }