Removed......
Have you checked your answers for the first 20 by hand? I suggest drawing them out on paper (or using lego - my personal favourite)
output for first twenty is...
1 0 2 1 3 1 4 2 5 2 6 2 7 2 8 3 9 3 10 3 11 3 12 3 13 4 14 4 15 4 16 4 17 4 18 4 19 5 20 5
is anywhere wrong??????and what is lego??????
Yes you are wrong in that range. Have you hand checked your answers?
LEGO:en.m.wikipedia.org/wiki/Lego#section_1