Difference between revisions of "2021 WSMO Team Round/Problem 2"

(Created page with "== Problem == Bobby has some pencils. When he tries to split them into 5 equal groups, he has 2 left over. When he tries to split them into groups of 8, he has 6 left over. Wh...")
 
 
Line 9: Line 9:
 
<math>x=5n+2=8m+6\implies 8m+4=5n</math>
 
<math>x=5n+2=8m+6\implies 8m+4=5n</math>
 
Taking both sides <math>\pmod{5}</math>, we have a linear congruence <math>3m\equiv1\pmod{5}</math>. Since <math>3*2\equiv6\pmod1\pmod{5}</math>, <math>3^{-1}\equiv2\pmod{5}</math>. Then <math>m\equiv2\pmod{5}</math>. We have that <math>m=5j+2</math> from this. Plugging this into the original equation, we get that <math>x=40j+22</math>. The smallest possible value of <math>x</math> occurs when <math>j=0</math>, so the second smallest occurs when <math>j=1</math>, or <math>x=\boxed{62}</math>.
 
Taking both sides <math>\pmod{5}</math>, we have a linear congruence <math>3m\equiv1\pmod{5}</math>. Since <math>3*2\equiv6\pmod1\pmod{5}</math>, <math>3^{-1}\equiv2\pmod{5}</math>. Then <math>m\equiv2\pmod{5}</math>. We have that <math>m=5j+2</math> from this. Plugging this into the original equation, we get that <math>x=40j+22</math>. The smallest possible value of <math>x</math> occurs when <math>j=0</math>, so the second smallest occurs when <math>j=1</math>, or <math>x=\boxed{62}</math>.
~programmeruser
 

Latest revision as of 13:45, 6 July 2023

Problem

Bobby has some pencils. When he tries to split them into 5 equal groups, he has 2 left over. When he tries to split them into groups of 8, he has 6 left over. What is the second smallest number of pencils that Bobby could have?

Proposed by pinkpig

Solution

From the problem statement, we have that: $x\equiv2\pmod{5} \\ x\equiv6\pmod{8}$ We can translate this into its parametric form: $x=5n+2=8m+6\implies 8m+4=5n$ Taking both sides $\pmod{5}$, we have a linear congruence $3m\equiv1\pmod{5}$. Since $3*2\equiv6\pmod1\pmod{5}$, $3^{-1}\equiv2\pmod{5}$. Then $m\equiv2\pmod{5}$. We have that $m=5j+2$ from this. Plugging this into the original equation, we get that $x=40j+22$. The smallest possible value of $x$ occurs when $j=0$, so the second smallest occurs when $j=1$, or $x=\boxed{62}$.