For positive integer values of N, let boxed(N) be equal to:
boxed(N) = 2+4+6+8+...+N if N is even,
and
boxed(N) = 1+3+5+7+...+N if N is odd.
What is the value of boxed(2009) minus boxed(2008)?
boxed(2009) - boxed(2008) = (1 + 3 + 5 + ... + 2009) - (2 + 4 + ... + 2008) = 504.
For positive integer values of N, let boxed(N) be equal to:
boxed(N) = 2+4+6+8+...+N if N is even,
and
boxed(N) = 1+3+5+7+...+N if N is odd.
What is the value of boxed(2009) minus boxed(2008)?
\(\begin{array}{|rcll|} \hline s &=& boxed(2009) \quad minus \quad boxed(2008) \\ s &=& (1 + 3 + 5 + ... + 2009) - (2 + 4 + ... + 2008) \\ s &=& 1 - 2 + 3 - 4 + \dots + 2007 - 2008 + 2009 \\ \hline \end{array}\)
\(\begin{array}{|rcll|} \hline s &=& 1 - 2 + 3 - 4 + \dots + 2007 - 2008 + 2009 \\ s &=& 2009 - 2008 +2007-2006 + \dots +3-2+1 \\ \hline 2s &=& 2010-2010+2010-2010 + \dots + 2010-2010+2010 \\ 2s &=& 0+0+ \dots +0+2010 \\ 2s &=& 2010 \quad | \quad : 2\\ s &=& 1005 \\ \hline \end{array}\)
boxed(2009) minus boxed(2008) = \( \mathbf{1005}\)