I should print 0, 1, 3, 6, 11, 19...

I'm told

"where a1=0, a2=1, a3=(1+a1)+ (1+a2)

and

a(n)=(1+a(n-2))+(1+a(n-1))

I seriously haven't any idea how to do this.

I'm told

"where a1=0, a2=1, a3=(1+a1)+ (1+a2)

and

a(n)=(1+a(n-2))+(1+a(n-1))

I seriously haven't any idea how to do this.

Topic archived. No new replies allowed.