返回题库

AIME 2023 II · 第 15 题

AIME 2023 II — Problem 15

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

For each positive integer nn let ana_n be the least positive integer multiple of 2323 such that an1(mod2n).a_n \equiv 1 \pmod{2^n}. Find the number of positive integers nn less than or equal to 10001000 that satisfy an=an+1.a_n = a_{n+1}.

解析

Solution 1

Denote an=23bna_n = 23 b_n. Thus, for each nn, we need to find smallest positive integer knk_n, such that

23bn=2nkn+1.23 b_n = 2^n k_n + 1 . Thus, we need to find smallest knk_n, such that

2nkn1(mod23).2^n k_n \equiv - 1 \pmod{23} . Now, we find the smallest mm, such that 2m1(mod23)2^m \equiv 1 \pmod{23}. By Fermat's Theorem, we must have mϕ(23)m | \phi \left( 23 \right). That is, m22m | 22. We find m=11m = 11.

Therefore, for each nn, we need to find smallest knk_n, such that

2Rem(n,11)kn1(mod23).2^{{\rm Rem} \left( n , 11 \right)} k_n \equiv - 1 \pmod{23} . We have the following results:

If Rem(n,11)=0{\rm Rem} \left( n , 11 \right) = 0, then kn=22k_n = 22 and bn=1b_n = 1.

If Rem(n,11)=1{\rm Rem} \left( n , 11 \right) = 1, then kn=11k_n = 11 and bn=1b_n = 1.

If Rem(n,11)=2{\rm Rem} \left( n , 11 \right) = 2, then kn=17k_n = 17 and bn=3b_n = 3.

If Rem(n,11)=3{\rm Rem} \left( n , 11 \right) = 3, then kn=20k_n = 20 and bn=7b_n = 7.

If Rem(n,11)=4{\rm Rem} \left( n , 11 \right) = 4, then kn=10k_n = 10 and bn=7b_n = 7.

If Rem(n,11)=5{\rm Rem} \left( n , 11 \right) = 5, then kn=5k_n = 5 and bn=7b_n = 7.

If Rem(n,11)=6{\rm Rem} \left( n , 11 \right) = 6, then kn=14k_n = 14 and bn=39b_n = 39.

If Rem(n,11)=7{\rm Rem} \left( n , 11 \right) = 7, then kn=7k_n = 7 and bn=39b_n = 39.

If Rem(n,11)=8{\rm Rem} \left( n , 11 \right) = 8, then kn=15k_n = 15 and bn=167b_n = 167.

If Rem(n,11)=9{\rm Rem} \left( n , 11 \right) = 9, then kn=19k_n = 19 and bn=423b_n = 423.

If Rem(n,11)=10{\rm Rem} \left( n , 11 \right) = 10, then kn=21k_n = 21 and bn=935b_n = 935.

Therefore, in each cycle, n{11l,11l+1,,11l+10}n \in \left\{ 11 l , 11l + 1 , \cdots , 11l + 10 \right\}, we have n=11ln = 11l, 11l+311l + 3, 11l+411l + 4, 11l+611l + 6, such that bn=bn+1b_n = b_{n+1}. That is, an=an+1a_n = a_{n+1}. At the boundary of two consecutive cycles, b11L+10b11(l+1)b_{11L + 10} \neq b_{11 \left(l + 1 \right)}.

We have 1000=9011+101000 = 90 \cdot 11 + 10. Therefore, the number of feasible nn is 9141=(363) 91 \cdot 4 - 1 = \boxed{\textbf{(363) }}.

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

Solution 2

Observe that if an11a_{n-1} - 1 is divisible by 2n2^n, an=an1a_n = a_{n-1}. If not, an=an1+232n1a_n = a_{n-1} + 23 \cdot 2^{n-1}.

This encourages us to let bn=an12nb_n = \frac{a_n - 1}{2^n}. Rewriting the above equations, we have

bn={bn12if 2  bn1bn1+232if 2∤ bn1b_n = \begin{cases} \frac{b_{n-1}}{2} & \text{if } 2 \text{ } \vert \text{ } b_{n-1} \\ \frac{b_{n-1}+23}{2} &\text{if } 2 \not\vert \text{ } b_{n-1} \end{cases} The first few values of bnb_n are 11,17,20,10,5,14,7,15,19,21,11, 17, 20, 10, 5, 14, 7, 15, 19, 21, and 2222. We notice that b12=b1=11b_{12} = b_1 = 11, and thus the sequence is periodic with period 1111.

Note that an=an+1a_n = a_{n+1} if and only if bnb_n is even. This occurs when nn is congruent to 0,3,40, 3, 4 or 66 mod 1111, giving four solutions for each period.

From 11 to 10011001 (which is 91×1191 \times 11), there are 91×4=36491 \times 4 = 364 values of nn. We subtract 11 from the total since 10011001 satisfies the criteria but is greater than 10001000 to get a final answer of 363\fbox{363} . ~Bxiao31415

(small changes by bobjoebilly and IraeVid13)

Solution 3 (Similar to solution 2 but more explanation)

Let an=23bna_n = 23b_n. Note that if

23bn+11(mod2n+1)23 b_{n+1} \equiv 1 \pmod{2^{n+1}} Then

23bn+11(mod2n)23 b_{n+1} \equiv 1 \pmod{2^{n}} Also

23bn1(mod2n)23 b_n \equiv 1 \pmod{2^n} Therefore

bnbn+1231(mod2n)b_n \equiv b_{n+1} \equiv 23^{-1} \pmod{2^n} Then

bn+1bn,bn+2n(mod2n+1)b_{n+1} \equiv b_n, b_n + 2^n \pmod{2^{n+1}} So

bn+1=bn,bn+2nb_{n+1} = b_n, b_n + 2^n Since 0bn<2n0 \le b_n < 2^n and 0bn+1<2n+10 \le b_{n+1} < 2^{n+1} as ana_n is the least positive integer multiple of 23.

Now suppose bn+1=bnb_{n+1} = b_n. Define qnq_n to be the quotient of 23bn23b_n divided by 2n2^n. Then

23bn=2nqn+1 and 23bn+1=23bn=2n+1qn+1+1=2nqn+1    qn+1=qn223b_n = 2^n q_n + 1 \text{ and } 23b_{n+1} = 23b_n = 2^{n+1} q_{n+1} + 1 = 2^n q_n + 1 \implies q_{n+1} = \frac{q_n}{2} Furthermore if quotient qnq_n is even then

23bn=2nqn+1=2n+1qn2+123b_n = 2^n q_n +1 = 2^{n+1} \frac{q_n}{2} +1 Therefore bn+1=bnb_{n+1} = b_n if and only if qnq_n is even. And, if this is true, then qn+1=qn2q_{n+1} = \frac{q_n}{2}. Next, if qnq_n is odd, we must have bn+1=bn+2nb_{n+1} = b_n + 2^n. Solving for qn+1q_{n+1}, we have

23bn+1=2n+1qn+1+1    23bn+232n=2n+1qn+1+1    2nqn+1+23=2n+1qn+1+1    qn+1=qn+12+1123b_{n+1} = 2^{n+1} q_{n+1} + 1 \implies 23b_n + 23 \cdot 2^n = 2^{n+1} q_{n+1} + 1 \implies 2^n q_n + 1 + 23 = 2^{n+1} q_{n+1} + 1 \implies q_{n+1} = \frac{q_n + 1}{2} + 11 Therefore, if qnq_n is odd, qn+1=qn+12+11q_{n+1} = \frac{q_n + 1}{2} + 11. In sum, our recursion is

qn={qn12if 2  qn1qn1+12+11if 2∤ qn1q_n = \begin{cases} \frac{q_{n-1}}{2} & \text{if } 2 \text{ } \vert \text{ } q_{n-1} \\ \frac{q_{n-1}+1}{2} + 11 &\text{if } 2 \not\vert \text{ } q_{n-1} \end{cases} Finally, let us list out qnq_n to find a pattern. Because a1=23a_1 = 23, q1=11q_1 = 11. Through our recursion, we continue like so:

q1=11,q2=17,q2=20,q3=10,q4=5,q6=14,q7=7,q8=15,q9=19,q10=21,q11=22,q12=11,q_1 = 11, q_2 = 17, q_2 = 20, q_3 = 10, q_4 = 5, q_6 = 14, q_7 = 7, q_8 = 15, q_9 = 19, q_{10} = 21, q_{11} = 22, q_{12} = 11, \dots Therefore qnq_n repeats with cycle length 1111. Since an+1=ana_{n+1} = a_n if and only if qnq_n is even, in each cycle, we have 4 satisfactory values of nn. There are 10001011=90\frac{1000 - 10}{11} = 90 complete cycles. There are 3 extra values in the last incomplete cycle. Therefore we obtain 904+3=36390 \cdot 4 + 3 = \fbox{363}.

~CrazyVideoGamez

Solution 4 (Binary Interpretation, Computer Scientists' Playground)

We first check that gcd(23,2n)=1\gcd(23, 2^n) = 1 hence we are always seeking a unique modular inverse of 2323, bnb_n, such that an23bn1mod2na_n \equiv 23b_n \equiv 1 \mod{2^n}.

Now that we know that bnb_n is unique, we proceed to recast this problem in binary. This is convenient because xmod2nx \mod{2^n} is simply the last nn-bits of xx in binary, and if x1mod2nx \equiv 1 \mod{2^n}, it means that of the last nn bits of xx, only the rightmost bit (henceforth 00th bit) is 11.

Also, multiplication in binary can be thought of as adding shifted copies of the multiplicand. For example:

101112×10112=101112×(10002+102+12)=101110002+1011102+101112=111111012\begin{aligned} 10111_2 \times 1011_2 &= 10111_2 \times (1000_2 + 10_2 + 1_2) \\ &= 10111000_2 + 101110_2 + 10111_2 \\ &= 11111101_2 \end{aligned} Now note 23=10111223 = 10111_2, and recall that our objective is to progressively zero out the nn leftmost bits of an=101112×bna_n = 10111_2 \times b_n except for the 00th bit.

Write bn=cn1c2c1c02b_n = \underline{c_{n-1}\cdots c_2c_1c_0}_2, we note that c0c_0 uniquely defines the 00th bit of ana_n, and once we determine c0c_0, c1c_1 uniquely determines the 11st bit of ana_n, so on and so forth.

For example, c0=1c_0 = 1 satisfies a1101112×121mod102a_1 \equiv10111_2 \times 1_2 \equiv 1 \mod{10_2} Next, we note that the second bit of a1a_1 is 11, so we must also have c1=1c_1 = 1 in order to zero it out, giving

a2101112×1121011102+a110001012012mod1002a_2 \equiv 10111_2 \times 11_2 \equiv 101110_2 + a_1 \equiv 1000101_2 \equiv 01_2 \mod{100_2} an+1=ana_{n+1} = a_{n} happens precisely when cn=0c_n = 0. In fact we can see this in action by working out a3a_3. Note that a2a_2 has 1 on the 22nd bit, so we must choose c2=1c_2 = 1. This gives

a3101112×111210111002+a21010000120012mod10002a_3 \equiv 10111_2 \times 111_2 \equiv 1011100_2 + a_2 \equiv 10100001_2 \equiv 001_2 \mod{1000_2} Note that since the 33rd and 44th bit are 00, c3=c4=0c_3 = c_4 = 0, and this gives a3=a4=a5a_3 = a_4 = a_5.

It may seem that this process will take forever, but note that 23=10111223 = 10111_2 has 44 bits behind the leading digit, and in the worst case, the leading digits of ana_n will have a cycle length of at most 1616. In fact, we find that the cycle length is 1111, and in the process found that a3=a4=a5a_3 = a_4 = a_5, a6=a7a_6 = a_7, and a11=a12a_{11} = a_{12}.

Since we have 9090 complete cycles of length 1111, and the last partial cycle yields a993=a994=a995a_{993} = a_{994} = a_{995} and a996=a997a_{996} = a_{997}, we have a total of 90×4+3=36390 \times 4 + 3 = \boxed{363} values of n1000n \le 1000 such that an=an+1a_n = a_{n+1}

~ cocoa @ https://www.corgillogical.com

Video Solution

https://youtu.be/ujP-V170vvI

~MathProblemSolvingSkills.com