Question 884963
First, I looked at the numbers starting with 3
that ARE divisible by 3:
3, 6, 9, 12, 15, . . .
----------------------
I noticed that:
3 = 1 + 2
6 = 2 + 4 
9 = 3 + 6 
12 = 4 + 8
 . . .
-------------
And then:
3 = 1 + 1 + 1
6 = 2 + 2 + 2
9 = 3 + 3 + 3
12 = 4 + 4 + 4
 . . .
----------------
How MANY numbers less than 2010
are divisible by 3?
That would be {{{ 2010 / 3 = 670 - 1 = 669 }}}
------------------------------------------
I know how to find the sum 1 + 2 + 3 + 4 + 5 + . . . + n
It is {{{ ( n*( n + 1 ) ) / 2 }}}
In the case of {{{ n = 5 }}}, it is:
{{{ ( 5*6 ) / 2 = 15 }}}
---------------------------
So, it looks like I need to find
{{{ ( n[1]*( n[1] + 1 ) ) / 2 }}} where {{{ n[1] = 2009 }}}
Then I need to subtract:
{{{ 3*(( n[2]*( n[2] + 1 ) ) / 2) }}} where {{{ n[2] = 669 }}}
----------------------------------------------
{{{ ( 2009*2010 ) / 2 - (3/2)*( 669*610 ) }}}
{{{ 4038090 / 2 - ( 3/2 )*408090 }}}
{{{ 2019045 - 612135 = 1406910 }}}
I get 1,406,910 for the sum
---------------------------
Maybe there is an easier way to do this, though
================================
Checking it for less than 1 through 20, you have
1 + 2 + 4 + 5 + 7 + 8 + 10 + 11 + 13 + 14 + 16 + 17 + 19
{{{ 127 }}} total
----------------
Using the formula:
{{{ 19/3 = 6 }}} ( nearest whole number )
{{{ ( n[1]*( n[1] + 1 ) ) / 2 }}}
{{{ ( 19*20 ) / 2 = 190 }}}
and
{{{ 3*(( n[2]*( n[2] + 1 ) ) / 2) }}}
{{{ ( 3/2)*( 6*7 ) = 63 }}}
{{{ 190 - 63 = 127 }}}
seems to work