float P(n){return n<4?1:P(n-3)+P(n-2)/P(n-1);}main(i){for(;i<10;)printf("%f\n",P(i++));}
Standard input is empty
1.000000 1.000000 1.000000 2.000000 1.500000 2.333333 2.642857 2.382883 3.442434
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!