n,x=input()i,f=0,[]while i<x:v=[sum(f[i-n:]),1][i<n];f.append(v);print v;i+=1
3,8
1 1 1 3 5 9 17 31
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!