How many product?

1 × 2 , 2 × 3 , 3 × 4 , , n × ( n + 1 ) \large 1 \times 2,2 \times 3,3 \times 4, \ldots , n \times (n+1)

For some integer n n , if the sum of the last digits of all of the numbers given above equals to 2010, find the sum of all the possible values of n n .


The answer is 3012.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

James Moors
Jul 14, 2015

Since we need to sum the last digits, we should check what they are. For this, we can use modulo arithmetic; specifically, we'll take everything to mod 10.

(I would write 4 × 5 10 0 4 \times 5 \equiv_{10} 0 , but I'll drop all the subscripts). 1 × 2 2 , 2 × 3 6 , 3 × 4 2 , 4 × 5 0 , 5 × 6 0 , 6 × 7 2 , 7 × 8 6 , 8 × 9 2 , 9 × 10 0 , 10 × 11 0 1 \times 2 \equiv 2, 2 \times 3 \equiv 6, 3 \times 4 \equiv 2, 4 \times 5 \equiv 0, 5 \times 6 \equiv 0,\\6 \times 7 \equiv 2, 7 \times 8 \equiv 6, 8 \times 9 \equiv 2, 9 \times 10 \equiv 0, 10 \times 11 \equiv 0 \\\cdots Now, it looks like this pattern repeats with a period of 5 5 and an easy check yields this: ( n + 5 ) ( n + 6 ) = n 2 + 11 n + 30 = n 2 + n + 10 ( n + 3 ) n 2 + n = n ( n + 1 ) (n+5)(n+6) = n^2+11n+30 = n^2 + n + 10(n+3)\\ \equiv n^2 + n = n(n+1) We, next, consider the sum of the last digits for each period of 5 5 : 2 + 6 + 2 + 0 + 0 = 10 2+6+2+0+0 = 10 Dividing 2010 2010 by 10 10 gives the number of complete periods it would take to sum to 2010 2010 . 2010 10 = 201 \frac{2010}{10} = 201 And each period is of length 5 5 , so a valid value of n n is: 201 × 5 = 1005 201 \times 5 = 1005 But... The last two values of n n per period contributes nothing to the sum, so we could have stopped at n = 1003 n=1003 or n = 1004 n=1004 and the sum would have remained unchanged. Clearly, n = 1006 n=1006 takes our sum to 2012 2012 and stopping at n = 1002 n=1002 would only give us a sum of 2008 2008 , so the possible values for n n are { 1003 , 1004 , 1005 } \{1003, 1004, 1005\} , the sum of which is 3012 \boxed{3012} .

well done my friend :)

Abdeslem Smahi - 5 years, 11 months ago
Brock Brown
Jul 14, 2015

Python 3.3:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
n = 1
total = 0
solved = False
while not solved:
    total += int(str(n * (n + 1))[-1])
    if total == 2010:
        answer = 0
        while total == 2010:
            answer += n
            n += 1
            total += int(str(n * (n + 1))[-1])
        solved = True
    n += 1
print("Answer:", answer)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...