0 1 2 3 4 5 ----------- 0 1 1 0 2 2 2 0 3 2 4 1 1 0 4 4 4 1 4 0
a,i=[],0 while len(a)<1000:print(d:=a.count(i));a+=[d];i=(i+1)*(d>0)