返回题库

AIME 2014 I · 第 8 题

AIME 2014 I — Problem 8

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem 8

The positive integers NN and N2N^2 both end in the same sequence of four digits abcdabcd when written in base 1010, where digit aa is not zero. Find the three-digit number abcabc.

解析

Solution 1 (similar to Solution 3)

We have that N2N=N(N1)0mod10000N^2 - N = N(N - 1)\equiv 0\mod{10000}

Thus, N(N1)N(N-1) must be divisible by both 545^4 and 242^4. Note, however, that if either NN or N1N-1 has both a 55 and a 22 in its factorization, the other must end in either 11 or 99, which is impossible for a number that is divisible by either 22 or 55. Thus, one of them is divisible by 24=162^4 = 16, and the other is divisible by 54=6255^4 = 625. Noting that 6251mod16625 \equiv 1\mod{16}, we see that 625625 would work for NN, except the thousands digit is 00. The other possibility is that NN is a multiple of 1616 and N1N-1 is a multiple of 625625. In order for this to happen,

N11(mod16).N-1 \equiv -1 \pmod {16}. Since 6251(mod16)625 \equiv 1 \pmod{16}, we know that 15625=9375151mod1615 \cdot 625 = 9375 \equiv 15 \equiv -1 \mod{16}. Thus, N1=9375N-1 = 9375, so N=9376N = 9376, and our answer is 937\boxed{937}.

Solution 2 (bashing)

let N=10000t+1000a+100b+10c+dN= 10000t+1000a+100b+10c+d for positive integer values t,a,b,c,dt,a,b,c,d. When we square NN we get that

N2=(10000t+1000a+100b+10c+d)2=108t2+106a2+104b2+102c2+d2+2(107ta+106tb+105tc+104td+105ab+104ac+103bc+10ad+102bd+10cd)\begin{aligned} N^2 &=(10000t+1000a+100b+10c+d)^2\\ &=10^8t^2+10^6a^2+10^4b^2+10^2c^2+d^2+2(10^7ta+10^6tb+10^5tc+10^4td+10^5ab+10^4ac+10^3bc+10^ad+10^2bd+10cd) \end{aligned} However, we don't have to deal with this whole expression but only with its last 4 digits so it is suffices to consider only:

2000ad+2000bc+100c2+200bd+20cd+d2.2000ad+2000bc+100c^2+200bd+20cd+d^2. Now we need to compare each decimal digit with 1000a+100b+10c+d1000a+100b+10c+d and see whether the digits are congruent in base 10. we first consider the ones digits:

d2d(mod10).d^2\equiv d \pmod{10}.

This can happen for only 3 values : 1, 5 and 6.

We can try to solve each case:

  • Case 1 (d=1)(d=1)

Considering the tenths place, we have that:

20cd=20c10c(mod100)20cd=20c\equiv 10c \pmod {100} so c=0c= 0.

Considering the hundreds place we have that

200bd+100c2=200b100b(mod1000)200bd+100c^2= 200b \equiv 100b \pmod{1000} so again b=0b=0

now considering the thousands place we have that

2000ad+2000bc=2000a1000a(mod10000)2000ad+2000bc = 2000a \equiv 1000a \pmod {10000} so we get a=0a=0 but aa cannot be equal to 00 so we consider d=5.d=5.

  • Case 2 (d=5)(d=5)

considering the tenths place we have that:

20cd+20=100c+202010cmod10020cd+20=100c+20\equiv 20 \equiv 10c \mod {100} ( the extra 2020 is carried from d2d^2 which is equal to 2525) so c=2c=2

considering the hundreds place we have that

200bd+100c2+100c=1000b+600600100b(mod1000)200bd+100c^2+100c= 1000b+600 \equiv600\equiv 100b \pmod{1000} ( the extra 100c100c is carried from the tenths place) so b=6b=6

now considering the thousands place we have that

2000ad+2000bc+1000b=10000a+24000+600001000a(mod10000)2000ad+2000bc +1000b= 10000a+24000+ 6000\equiv0\equiv 1000a \pmod {10000} ( the extra 1000b1000b is carried from the hundreds place) so a is equal 0 again

  • Case 3(d=6)(d=6)

considering the tenths place we have that:

20cd+30=120c+3030+20c10c(mod100)20cd+30=120c+30\equiv 30+20c \equiv 10c \pmod {100} ( the extra 2020 is carried from d2d^2 which is equal to 2525) if c=7c=7 then we have

30+20770710(mod100)30+20 \cdot 7 \equiv 70\equiv7 \cdot 10 \pmod{100}

so c=7c=7

considering the hundreds place we have that

200bd+100c2+100c+100=1200b+4900+800200b+700100b(mod1000)200bd+100c^2+100c+100= 1200b+4900+800 \equiv200b+700\equiv 100b \pmod{1000} ( the extra 100c+100100c+100 is carried from the tenths place)

if b=3b=3 then we have

700+20033003100(mod1000)700+200 \cdot 3 \equiv 300\equiv3 \cdot 100 \pmod {1000}

so b=3b=3

now considering the thousands place we have that

2000ad+2000bc+1000b+5000+1000=12000a+42000+3000+600002000a+10001000a(mod10000)2000ad+2000bc +1000b+5000+1000= 12000a+42000+ 3000+6000\equiv0\equiv 2000a+1000\equiv 1000a \pmod {10000} ( the extra 1000b+60001000b+6000 is carried from the hundreds place)

if a=9a=9 then we have

20009+1000900091000(mod1000)2000 \cdot 9+1000 \equiv 9000\equiv9 \cdot 1000 \pmod {1000}

so a=9a=9

so we have that the last 4 digits of NN are 93769376 and abcabc is equal to 937\boxed{937}

Solution 3 (general)

By the Chinese Remainder Theorem, the equation N(N1)0(mod10000)N(N-1)\equiv 0\pmod{10000} is equivalent to the two equations:

N(N1)0(mod16),N(N1)0(mod625).\begin{aligned} N(N-1)&\equiv 0\pmod{16},\\ N(N-1)&\equiv 0\pmod{625}. \end{aligned} Since NN and N1N-1 are coprime, the only solutions are when (Nmod16,Nmod625){(0,0),(0,1),(1,0),(1,1)}(N\mod{16},N\mod{625})\in\{(0,0),(0,1),(1,0),(1,1)\}.

Let

φ:Z/10000ZZ/16Z×Z/625Z,\varphi:\mathbb Z/10000\mathbb Z\to\mathbb Z/16\mathbb Z\times\mathbb Z/625\mathbb Z, x(xmod16,xmod625).x\mapsto (x\mod{16},x\mod{625}). The statement of the Chinese Remainder theorem is that φ\varphi is an isomorphism between the two rings. In this language, the solutions are φ1(0,0)\varphi^{-1}(0,0), φ1(0,1)\varphi^{-1}(0,1), φ1(1,0)\varphi^{-1}(1,0), and φ1(1,1)\varphi^{-1}(1,1). Now we easily see that

φ1(0,0)=0\varphi^{-1}(0,0)=0 and

φ1(1,1)=1.\varphi^{-1}(1,1)=1. Noting that 6251(mod16)625\equiv 1\pmod{16}, it follows that

φ1(1,0)=625.\varphi^{-1}(1,0)=625. To compute φ1(0,1)\varphi^{-1}(0,1), note that

(0,1)=15(1,0)+(1,1)(0,1)=15(1,0)+(1,1) in

Z/16Z×Z/625Z,\mathbb Z/16\mathbb Z\times\mathbb Z/625\mathbb Z, so since φ1\varphi^{-1} is linear in its arguments (by virtue of being an isomorphism),

φ1(0,1)=15φ1(1,0)+φ1(1,1)=15×625+1=9376.\varphi^{-1}(0,1)=15\varphi^{-1}(1,0)+\varphi^{-1}(1,1)=15\times 625+1=9376. The four candidate digit strings abcdabcd are then 0000,0001,0625,93760000,0001,0625,9376. Of those, only 93769376 has nonzero first digit, and therefore the answer is 937\boxed{937}.

Solution 4 (semi-bashing)

  • Note - abcd\overline{abcd} means the number formed when the digits represented by aa, bb, cc, and dd are substituted in. abcda×b×c×d\overline{abcd}\ne a\times b\times c\times d.

WLOG, we can assume that NN is a 4-digit integer abcd\overline{abcd}. Note that the only dd that will satisfy NN will also satisfy d2d(mod10)d^2\equiv d\pmod{10}, as the units digit of abcd2\overline{abcd}^2 is affected only by dd, regardless of aa, bb, or cc.

By checking the numbers 0-9, we see that the only possible values of dd are d=0,1,5,6d=0, 1, 5, 6.

Now, we seek to find cc. Note that the only cd\overline{cd} that will satisfy NN will also satisfy cd2cd(mod100)\overline{cd}^2 \equiv \overline{cd}\pmod{100}, by the same reasoning as above - the last two digits of abcd2\overline{abcd}^2 are only affected by cc and dd. As we already have narrowed choices for dd, we start reasoning out.

First, we note that if d=0d=0, then c=0c=0, as a number ending in 0, and therefore divisible by 10, is squared, the result is divisible by 100, meaning it ends in two 0's. However, if NN ends in 0000, then recursively, aa and bb must be 00, as a number divisible by 100 squared ends in four zeros. As aa cannot be 0, we throw out this possibility, as the only solution in this case is 00.

Now, let's assume that d=1d=1. cd\overline{cd} is equal to 10c+d=10c+110c + d = 10c + 1. Squaring this gives 100c2+20c+1100c^2 + 20c + 1, and when modulo 100 is taken, it must equal 10c+110c + 1. As cc is an integer, 100c2100c^2 must be divisible by 100, so 100c2+20c+120c+1(mod100)100c^2+20c+1 \equiv 20c + 1\pmod{100}, which must be equivalent to 10c+110c + 1. Note that this is really (2c)1\overline{(2c)1} and c1\overline{c1}, and comparing the 10's digits. So really, we're just looking for when the units digit of 2c2c and cc are equal, and a quick check reveals that this is only true when c=0c=0.However, if we extend this process to find bb and aa, we'd find that they are also 0. The only solution in this case is 11, and since a=0a=0 here, this is not our solution. Therefore, there are no valid solutions in this case.

Let's assume that d=5d=5. Note that (10c+5)2=100c2+100c+25(10c + 5)^2 = 100c^2 + 100c + 25, and when modulo 100100 is taken, 2525 is the remainder. So all cases here have squares that end in 25, so cd=25\overline{cd}=25 is our only case here. A quick check reveals that 252=62525^2=625, which works for now.

Now, let d=6d=6. Note that (10c+6)2=100c2+120c+36(10c + 6)^2 = 100c^2 + 120c + 36. Taking modulo 100, this reduces to 20c+3620c+36, which must be equivalent to 10c+610c+6. Again, this is similar to (2c+3)6\overline{(2c+3)6} and c6\overline{c6}, so we see when the units digits of 2c+32c+3 and cc are equal. To make checking faster, note that 2c2c is necessarily even, so 2c+32c+3 is necessarily odd, so cc must be odd. Checking all the odds reveals that only c=3c=3 works, so this case gives 7676. Checking quickly 762=577676^2 = 5776, which works for now.

Now, we find bb, given two possibilities for cd\overline{cd}.

Start with cd=25\overline{cd} = 25. bcd=100b+cd=100b+25.\overline{bcd} = 100b + \overline{cd} = 100b + 25. Note that if we square this, we get 10000b2+5000b+62510000b^2 + 5000b + 625, which should be equivalent to 100b+25100b + 25 modulo 1000. Note that, since bb is an integer, 10000b2+5000+62510000b^2 + 5000 + 625 simplifies modulo 1000 to 625625. Therefore, the only bcd\overline{bcd} that works here is 625625. 6252=390625625^2 = 390625.

Now, assume that cd=76\overline{cd}=76. We have 100b+76100b + 76, and when squared, becomes 10000b2+15200b+577610000b^2 + 15200b + 5776, which, modulo 1000, should be equivalent to 100b+76100b+76. Reducing 10000b2+15200b+577610000b^2 + 15200b + 5776 modulo 10001000 gives 200b+776200b + 776. Using the same technique as before, we must equate the hundreds digit of (2b+7)76\overline{(2b+7)76} to b76\overline{b76}, or equate the units digit of 2b+72b+7 and bb. Since 2b+72b+7 is necessarily odd, any possible bb's must be odd. A quick check reveals that b=3b=3 is the only solution, so we get a solution of 376376. 3762=141376376^2 = 141376.

Finally, we solve for aa. Start with bcd=625\overline{bcd}=625. We have 1000a+6251000a + 625, which, squared, gives

1000000a2+1250000a+390625,1000000a^2 + 1250000a + 390625, and reducing modulo 10000 gives simply 625. So abcd=625\overline{abcd}=625. However, that makes a=0a=0. Therefore, no solutions exist in this case.

We turn to our last case, bcd=376\overline{bcd}=376. We have

1000a+3762=1000000a2+752000a+141376,1000a + 376^2 = 1000000a^2 + 752000a + 141376, and reducing modulo 1000010000 gives 2000a+13762000a + 1376, which must be equivalent to 1000a+3761000a + 376. So we must have (2a+1)376\overline{(2a+1)376} being equivalent to a376\overline{a376} modulo 1000. So, the units digit of 2a+12a+1 must be equal to aa. Since 2a+12a+1 is odd, aa must be odd. Lo and behold, the only possibility for aa is a=3a=3. Therefore, abcd=9376\overline{abcd}=9376, so our answer is 937\boxed{937}.

Solution 5 (easy observations)

We are given that abcd2abcd^2 ends in abcdabcd, which means that d2d^2 ends in dd. The only possible values for which this works is d=0,1,5,6d=0,1,5,6. Notice that if we set d=0d=0, we will have c=0,b=0,a=0c=0, b=0, a=0, which is not valid since a0a\neq0. Furthermore, we can see that d1d\neq1 by quickly going over 112,122,...,19211^2, 12^2, ..., 19^2 and seeing that none of those numbers work. From number sense, we know that B252B25^2 ends in ...625...625 regardless of BB. So, in this case, b=6b=6. However, notice that 76276^2 ends in ...76...76, and we can quickly find that 3762=141376376^2=141376. Going back to A6252A625^2, we notice that no matter what AA is, A6252=...0625A625^2=...0625. Since A0A\neq0, this case is not valid (write out A6252A625^2 and multiply to see that the thousands digit is 5a+3+2+5+5a=10a+105a+3+2+5+5a=10a+10 which always ends in 00). We turn our focus to A3762A376^2. Write out 3762376^2 and multiply it out to see that the thousands digit is 6a+2+6+2+6a+1=12a+16a+2+6+2+6a+1=12a+1. There is an extra 11 due to carry over. Quickly testing numbers, the only possible value for AA is 99. So, abcd=9376abcd=9376 and our answer is abc=937abc=\boxed{937}.

~hwan

Solution 6 (Exact same as 3 but with less fancy words)

The problem statement is equivalent to N2N(mod10000)N^2 \equiv N\pmod{10000}, and subtracting NN from both sides and factoring yields N(N1)0(mod10000)N(N-1) \equiv 0\pmod{10000}. By the Chinese Remainder Theorem, the equation N(N1)0(mod10000)N(N-1)\equiv 0\pmod{10000} is equivalent to the two equations:

N(N1)0(mod16),N(N1)0(mod625).\begin{aligned} N(N-1)&\equiv 0\pmod{16},\\ N(N-1)&\equiv 0\pmod{625}. \end{aligned} So,

N0,1(mod16),N0,1(mod625).\begin{aligned} N&\equiv 0, 1\pmod{16},\\ N&\equiv 0, 1\pmod{625}. \end{aligned} If N0(mod16)N\equiv 0\pmod{16} and N0(mod625)N\equiv 0\pmod{625}, then N0(mod10000)N\equiv 0\pmod{10000}, but this contradicts a0a \neq 0.

If N1(mod16)N\equiv 1\pmod{16} and N1(mod625)N\equiv 1\pmod{625}, then N1(mod10000)N\equiv 1\pmod{10000}, but this contradicts a0a \neq 0.

If N1(mod16)N\equiv 1\pmod{16} and N0(mod625)N\equiv 0\pmod{625}, then N625(mod10000)N\equiv 625\pmod{10000}, but this contradicts a0a \neq 0.

If N0(mod16)N\equiv 0\pmod{16} and N1(mod625)N\equiv 1\pmod{625}, then N9376(mod10000)N\equiv 9376\pmod{10000}. We can square this to check: 93762=879093769376^2=87909376. Our answer is 937\boxed{937}.

Video Solution by OmegaLearn

https://youtu.be/gP5pejfcUl8?t=483

~ pi_is_3.14