Tuesday, November 11, 2014

Lazy caterer's sequence

I searched the problem below online and I found out that it's called the lazy caterer's sequence.

The answer online is  p = \frac{n^2+n+2}{2}. 

So I assumed my solution was wrong until I expanded my solution of 1 + (n*(n+1)) / 2
= 1 + (n^2 + n) / 2             #algebra
= (n^2 + n + 2) / 2             #put the one in the fraction

So, YAY!

Unscholarly Sources:
http://en.wikipedia.org/wiki/Lazy_caterer's_sequence

No comments:

Post a Comment