A Notorious Number Theory Problem

Let a a and b b be positive integers such that the number b 2 + ( b + 1 ) 2 + ( b + 2 ) 2 + + ( b + a ) 2 3 b^2+(b+1)^2+(b+2)^2+\cdots+(b+a)^2-3 is a multiple of 5 5 and a + b a+b is odd. What is the units digit of the number a + b a+b written in decimal notation?


The answer is 3.

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.

5 solutions

Chris Lewis
Mar 27, 2020

Using the formula k = 1 n k 2 = 1 6 n ( n + 1 ) ( 2 n + 1 ) \sum_{k=1}^n k^2 = \frac16 n(n+1)(2n+1) we require 1 6 ( c ( c + 1 ) ( 2 c + 1 ) ( b 1 ) b ( 2 b 1 ) ) 3 ( m o d 5 ) \frac16 \left( c(c+1)(2c+1)-(b-1)b(2b-1) \right) \equiv 3 \pmod5

where c = a + b c=a+b . Since 5 5 and 6 6 are coprime, we can just multiply over to get c ( c + 1 ) ( 2 c + 1 ) ( b 1 ) b ( 2 b 1 ) 18 3 c(c+1)(2c+1)-(b-1)b(2b-1) \equiv 18 \equiv 3

Since both terms have the same form, the easiest approach here is just to check cases, as per the table below:

n n n ( n + 1 ) ( 2 n + 1 ) n(n+1)(2n+1)
0 0
1 1
2 0
3 4
4 0

where the results are taken modulo 5 5 . It's clear that the only way we can get a difference of 3 3 is by taking b 1 1 b-1 \equiv 1 and c 3 c \equiv 3 . So the units digit of c c is either 3 3 or 8 8 ; we're told that c c is odd, so this leaves 3 \boxed3 as the answer.

Chew-Seong Cheong
Mar 27, 2020

Define s ( b , a ) = k = b b + a k 2 s(b,a) = \displaystyle \sum_{k=b}^{b+a} k^2 and consider modulo 5 5 of s ( b , a ) s(b,a) .

s ( 1 , a ) 1 + 4 + 9 + 16 + 25 + 36 + 49 + 64 + 81 + 100 + + ( 1 + a ) 2 (mod 5) 1 + 4 + 4 + 1 + 0 + 1 + 4 + 4 + 1 + 0 + + ( 1 + a ) 2 (mod 5) \begin{aligned} s(1,a) & \equiv 1 + 4 + 9 + 16+25 + 36 + 49+64+81+100 + \cdots + (1+a)^2 \text{ (mod 5)} \\ & \equiv 1 + 4 + 4 + 1+ 0 + 1 + 4 + 4+ 1+0 + \cdots + (1+a)^2 \text{ (mod 5)} \end{aligned}

We note, for b m o d 5 = 1 b \bmod 5 = 1 , s ( b 1 , a ) m o d 5 = { 1 if a m o d 5 = 0 4 if a m o d 5 = 2 0 otherwise s(b_1,a) \bmod 5 = \begin{cases} 1 & \text{if }a \bmod 5 = 0 \\ 4 & \text{if }a \bmod 5 = 2 \\ 0 & \text{otherwise} \end{cases} and ( s ( b 1 , a ) 3 ) m o d 5 0 (s(b_1,a) - 3) \bmod 5 \ne 0 . So we have no solution for b m o d 5 = 1 b \bmod 5 = 1 .

Now consider b m o d 5 = 2 b \bmod 5 = 2 . Then s ( b 2 , a ) 4 + 4 + 1 + 0 + 1 + (mod 5) s(b_2,a) \equiv 4+4+1+0+1+\cdots \text{ (mod 5)} . s ( b 2 , a ) m o d 5 = { 0 if a m o d 5 = 0 3 if a m o d 5 = 1 4 otherwise \implies s(b_2,a) \bmod 5 = \begin{cases} 0 & \text{if }a \bmod 5 = 0 \\ 3 & \text{if }a \bmod 5 = 1 \\ 4 & \text{otherwise} \end{cases} .

Therefore ( s ( b , a ) 3 ) m o d 5 = 0 (s(b,a) - 3) \bmod 5 = 0 and solutions exist when b m o d 5 = 2 b \bmod 5 = 2 and a m o d 5 = 1 a \bmod 5 = 1 . Then a a and b b are of the form a = 5 m + 1 a=5m+1 and b = 5 n + 2 b=5n+2 , where m m and n n are integers. a + b a+b is odd when both m m and n n are odd or both are even and the units digit is 3 \boxed 3 .

Let a + b = 2 c + 1 b = 2 c + 1 a a+b=2c+1\implies b=2c+1-a , where c c is a positive integer. Then total number of terms in the series is a + 1 , i t h a+1, i^{th} term of the series is ( b 1 ) 2 + 2 ( b 1 ) i + i 2 = ( 2 c a ) 2 + 2 ( 2 c a ) i + i 2 S 3 = ( a + 1 ) ( 2 c a ) 2 + ( a + 1 ) ( a + 2 ) ( 2 c a ) + ( a + 1 ) ( a + 2 ) ( 2 a + 3 ) 6 3 = a + 1 6 ( 24 c 2 12 c a + 2 a 2 + 24 c 5 a + 6 ) 3 (b-1)^2+2(b-1)i+i^2=(2c-a)^2+2(2c-a)i+i^2\implies S-3=(a+1)(2c-a)^2+(a+1)(a+2)(2c-a)+\dfrac{(a+1)(a+2)(2a+3)}{6}-3=\dfrac{a+1}{6}(24c^2-12ca+2a^2+24c-5a+6)-3 , where S S is the sum of the series. For a = 1 a=1 , S 3 = 8 c 2 + 4 c 2 = 2 [ 2 c ( 2 c + 1 ) 1 ] S-3=8c^2+4c-2=2[2c(2c+1)-1] . Since 2 c ( 2 c + 1 ) 2c(2c+1) is even, therefore unit's place digit of 2 c ( 2 c + 1 ) 2c(2c+1) must be 6 6 and hence that of c ( 2 c + 1 ) c(2c+1) must be 3 3 or 8 8 . By direct inspection we see that c = 1 c=1 is a feasible candidate. So a = 1 , a + b = 2 c + 1 = 3 a=1, a+b=2c+1=\boxed 3

Cantdo Math
Apr 11, 2020

We notice that,square numbers modulo 5 follow this pattern:0,1,-1,-1,1.We need to only consider at most last 4 terms,since other terms cancel out. And the consecutive squares have to sum equal to 3 mod 5.The only way that can happen is when a+b is 3 modulo 5 (follows from the pattern) hence 3 modulo 10 .

Prabhnoor Singh
Mar 28, 2020

I did it by Hit and Trial :-

I observed that [ 7 2 + ( 7 + 1 ) 2 + ( 7 + 2 ) 2 + . . . + ( 7 + 6 ) 2 ] 3 [7^2+(7+1)^2+(7+2)^2+...+(7+6)^2]-3 is divisible by 5

a + b = 13 a+b=13

Hence unit digit came out to be 3 \boxed{3}

I did it the same way. One of the first cases I tried was a=1, b=2. This gave 4+9-3=10 (which is divisible by 5) and a+b=3. This way of solving it does miss out on the chance to use the beautiful formula for the sum of squares.

Justin Travers - 1 year, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...