Difference between revisions of "2024 AIME II Problems/Problem 7"

Line 80: Line 80:
 
{{AIME box|year=2024|num-b=6|num-a=8|n=II}}
 
{{AIME box|year=2024|num-b=6|num-a=8|n=II}}
  
[[Category:]]
+
[[Category:Intermediate Number Theory Problems]]
 
{{MAA Notice}}
 
{{MAA Notice}}

Revision as of 20:39, 9 February 2024

Problem

Let $N$ be the greatest four-digit positive integer with the property that whenever one of its digits is changed to $1$, the resulting number is divisible by $7$. Let $Q$ and $R$ be the quotient and remainder, respectively, when $N$ is divided by $1000$. Find $Q+R$.

Solution 1

We note that by changing a digit to $1$ for the number $\overline{abcd}$, we are subtracting the number by either $1000(a-1)$, $100(b-1)$, $10(c-1)$, or $d-1$. Thus, $1000a + 100b + 10c + d \equiv 1000(a-1) \equiv 100(b-1) \equiv 10(c-1) \equiv d-1 \pmod{7}$. We can casework on $a$ backwards, finding the maximum value.

(Note that computing $1000 \equiv 6 \pmod{7}, 100 \equiv 2 \pmod{7}, 10 \equiv 3 \pmod{7}$ greatly simplifies computation).

Applying casework on $a$, we can eventually obtain a working value of $\overline{abcd} = 5694 \implies \boxed{699}$. ~akliu

Solution 2

Let our four digit number be $abcd$. Replacing digits with 1, we get the following equations:

$1000+100b+10c+d \equiv 0 \pmod{7}$

$1000a+100+10c+d \equiv 0 \pmod{7}$

$1000a+100b+10+d \equiv 0 \pmod{7}$

$1000a+100b+10c+1 \equiv 0 \pmod{7}$

Reducing, we get

$6+2b+3c+d \equiv 0 \pmod{7}$ $(1)$

$6a+2+3c+d \equiv 0 \pmod{7}$ $(2)$

$6a+2b+3+d \equiv 0 \pmod{7}$ $(3)$

$6a+2b+3c+1 \equiv 0 \pmod{7}$ $(4)$

Subtracting $(2)-(1), (3)-(2), (4)-(3), (4)-(1)$, we get:

$3a-b \equiv 2 \pmod{7}$

$2b-3c \equiv 6 \pmod{7}$

$3c-d \equiv 2 \pmod{7}$

$6a-d \equiv 5 \pmod{7}$

For the largest 4 digit number, we test values for a starting with 9. When a is 9, b is 4, c is 3, and d is 7. However, when switching the digits with 1, we quickly notice this doesnt work. Once we get to a=5, we get b=6,c=9,and d=4. Adding 694 with 5, we get $\boxed{699}$ -westwoodmonster

Solution 3

Let our four digit number be $abcd$. Replacing digits with 1, we get the following equations:

$1000+100b+10c+d \equiv 0 \pmod{7}$

$1000a+100+10c+d \equiv 0 \pmod{7}$

$1000a+100b+10+d \equiv 0 \pmod{7}$

$1000a+100b+10c+1 \equiv 0 \pmod{7}$

Add the equations together, we get:

$3000a+300b+30c+3d+1111 \equiv 0 \pmod{7}$

And since the remainder of 1111 divided by 7 is 5, we get:

$3abcd \equiv 2 \pmod{7}$

Which gives us:

$abcd \equiv 3 \pmod{7}$

And since we know that changing each digit into 1 will make abcd divisible by 7, we get that $d-1$, $10c-10$, $100b-100$, and $1000a-1000$ all have a remainder of 3 when divided by 7. Thus, we get $a=5$, $b=6$, $c=9$, and $d=4$. Thus, we get 5694 as abcd, and the answer is $694+5=\boxed{699}$.

~Callisto531

Video Solution

https://youtu.be/DxBjaFJneBs

~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)

See also

2024 AIME II (ProblemsAnswer KeyResources)
Preceded by
Problem 6
Followed by
Problem 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
All AIME Problems and Solutions

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. AMC logo.png