f=lambda x:reduce(int.__mul__,[2]+[f(y)for y in range(x-1)])+1 for i in range(6): print i, f(i)
Standard input is empty
0 3 1 3 2 7 3 19 4 127 5 2395
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!