返回题库

AIME 2006 I · 第 13 题

AIME 2006 I — Problem 13

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

For each even positive integer xx, let g(x)g(x) denote the greatest power of 2 that divides x.x. For example, g(20)=4g(20)=4 and g(16)=16.g(16)=16. For each positive integer n,n, let Sn=k=12n1g(2k).S_n=\sum_{k=1}^{2^{n-1}}g(2k). Find the greatest integer nn less than 1000 such that SnS_n is a perfect square.

解析

Solution 1

Given g:xmaxj:2jx2jg : x \mapsto \max_{j : 2^j | x} 2^j, consider Sn=g(2)++g(2n)S_n = g(2) + \cdots + g(2^n). Define S={2,4,,2n}S = \{2, 4, \ldots, 2^n\}. There are 202^0 elements of SS that are divisible by 2n2^n, 2120=202^1 - 2^0 = 2^0 elements of SS that are divisible by 2n12^{n-1} but not by 2n,,2^n, \ldots, and 2n12n2=2n22^{n-1}-2^{n-2} = 2^{n-2} elements of SS that are divisible by 212^1 but not by 222^2.

Thus

Sn=202n+202n1+212n2++2n221=2n+(n1)2n1=2n1(n+1).\begin{aligned} S_n &= 2^0\cdot2^n + 2^0\cdot2^{n-1} + 2^1\cdot2^{n-2} + \cdots + 2^{n-2}\cdot2^1\\ &= 2^n + (n-1)2^{n-1}\\ &= 2^{n-1}(n+1).\end{aligned} Let 2k2^k be the highest power of 22 that divides n+1n+1. Thus by the above formula, the highest power of 22 that divides SnS_n is 2k+n12^{k+n-1}. For SnS_n to be a perfect square, k+n1k+n-1 must be even. If kk is odd, then n+1n+1 is even, hence k+n1k+n-1 is odd, and SnS_n cannot be a perfect square. Hence kk must be even. In particular, as n<1000n<1000, we have five choices for kk, namely k=0,2,4,6,8k=0,2,4,6,8.

If k=0k=0, then n+1n+1 is odd, so k+n1k+n-1 is odd, hence the largest power of 22 dividing SnS_n has an odd exponent, so SnS_n is not a perfect square.

In the other cases, note that k+n1k+n-1 is even, so the highest power of 22 dividing SnS_n will be a perfect square. In particular, SnS_n will be a perfect square if and only if (n+1)/2k(n+1)/2^{k} is an odd perfect square.

If k=2k=2, then n<1000n<1000 implies that n+14250\frac{n+1}{4} \le 250, so we have n+1=4,432,,4132,43252n+1 = 4, 4 \cdot 3^2, \ldots, 4 \cdot 13^2, 4\cdot 3^2 \cdot 5^2.

If k=4k=4, then n<1000n<1000 implies that n+11662\frac{n+1}{16} \le 62, so n+1=16,1632,1652,1672n+1 = 16, 16 \cdot 3^2, 16 \cdot 5^2, 16 \cdot 7^2.

If k=6k=6, then n<1000n<1000 implies that n+16415\frac{n+1}{64}\le 15, so n+1=64,6432n+1=64,64\cdot 3^2.

If k=8k=8, then n<1000n<1000 implies that n+12563\frac{n+1}{256}\le 3, so n+1=256n+1=256.

Comparing the largest term in each case, we find that the maximum possible nn such that SnS_n is a perfect square is 432521=8994\cdot 3^2 \cdot 5^2 - 1 = \boxed{899}.

Solution 2

First note that g(k)=1g(k)=1 if kk is odd and 2g(k/2)2g(k/2) if kk is even. so Sn=k=12n1g(2k).=k=12n12g(k)=2k=12n1g(k)=2k=12n2g(2k1)+g(2k).S_n=\sum_{k=1}^{2^{n-1}}g(2k). = \sum_{k=1}^{2^{n-1}}2g(k) = 2\sum_{k=1}^{2^{n-1}}g(k) = 2\sum_{k=1}^{2^{n-2}} g(2k-1)+g(2k). 2k12k-1 must be odd so this reduces to 2k=12n21+g(2k)=2(2n2+k=12n2g(2k)).2\sum_{k=1}^{2^{n-2}}1+g(2k) = 2(2^{n-2}+\sum_{k=1}^{2^{n-2}}g(2k)). Thus Sn=2(2n2+Sn1)=2n1+2Sn1.S_n=2(2^{n-2}+S_{n-1})=2^{n-1}+2S_{n-1}. Further noting that S0=1S_0=1 we can see that Sn=2n1(n1)+2nS0=2n1(n1)+2n12=2n1(n+1).S_n=2^{n-1}\cdot (n-1)+2^n\cdot S_0=2^{n-1}\cdot (n-1)+2^{n-1}\cdot2=2^{n-1}\cdot (n+1). which is the same as above. To simplify the process of finding the largest square SnS_n we can note that if n1n-1 is odd then n+1n+1 must be exactly divisible by an odd power of 22. However, this means n+1n+1 is even but it cannot be. Thus n1n-1 is even and n+1n+1 is a large even square. The largest even square <1000< 1000 is 900900 so n+1=900=>n=899n+1= 900 => n= \boxed{899}

Solution 3 (Finding patterns and using recursion)

At first, this problem looks kind of daunting, but we can easily solve this problem by finding patterns, recursion and algebraic manipulations.

We first simplify all the messy notation in the SnS_n term. Note that the problem asks us to find the smallest value of n<1000n<1000 such that there exists an integer kk that satisfies

k2=g(2)+g(4)++g(2n)k^2 = g(2) + g(4) + \cdots + g(2^n) .

Since there is no obvious way to approach this problem, we start by experimenting with small values of nn to evaluate some SnS_n.

We play with these values:

S1=g(2)=2S_1 = g(2) = 2 S2=g(2)+g(4)=2+4=6S_2 = g(2) + g(4) = 2+4 = 6 S3=g(2)+g(4)+g(6)+g(8)=16S_3 = g(2) + g(4) + g(6) + g(8) = 16 S4=g(2)+g(4)+g(6)+g(8)+g(10)+g(12)+g(14)+g(16)=40S_4 = g(2) + g(4) + g(6) + g(8) + g(10) +g(12)+g(14)+g(16) = 40 We are certainly not going to expand all of this out... so let's look for patterns from these 44 values!

Using a little bit of ingenuity, we note that

S2=2+4=S1+4S_2 = 2+4 = S_1 + 4 S3=2+4+2+8=8+8=S2+S1+8S_3 = 2+4+2+8 = 8+8 = S_2 + S_1 + 8 S4=2+4+2+8+2+4+2+16=S3+S2+S1+16S_4 = 2+4+2+8+2+4+2+16 = S_3 + S_2 + S_1 + 16 Aha! We see powers of two in each of our terms! Therefore, we can say that

S2=S1+22S_2 = S_1 + 2^2 S3=S2+S1+23S_3 = S_2+S_1 + 2^3 S4=S3+S2+S1+24S_4 = S_3 + S_2 + S_1 + 2^4 Hooray! We have a recursion! Realistically, we would want to prove that the recursion works, but I currently don't know how to prove it.

On the actual AIME, go with whatever patterns you see, because most likely those are the patterns that the test-makers want the students to see.

So we may generalize a formula for SnS_n:

Sn=2n+Sn1+Sn2++S2+S1S_n = 2^n + S_{n-1} + S_{n-2} + \cdots + S_2 + S_1 Uh oh... this formula is not in closed form. Looks like we'll have to use our recursion to develop one manually. We do so by using our recursion for Sn1S_{n-1}:

Sn=2n+(2n1+Sn2+Sn3++S2+S1)+Sn2+Sn3++S2+S1S_n = 2^n + (2^{n-1} + S_{n-2} + S_{n-3} + \cdots + S_2 + S_1) + S_{n-2} + S_{n-3} + \cdots + S_2 + S_1 Sn=2n+2n1+2(Sn2+Sn3++S2+S1S_n = 2^n + 2^{n-1} + 2 (S_{n-2} + S_{n-3} + \cdots + S_2 + S_1 Let's simplify a bit further, where we use our recursion for Sn2S_{n-2}.

Sn=2n+2n1+(2Sn2)+2(Sn3+Sn4++S2+S1)S_n = 2^n + 2^{n-1} +(2S_{n-2}) + 2(S_{n-3} + S_{n-4} + \cdots + S_2 + S_1) Sn=2n+2n1+2(2n2)+2(Sn3+Sn4++S2+S1)+2(Sn3+Sn4++S2+S1)S_n = 2^n + 2^{n-1} + 2(2^{n-2}) + 2(S_{n-3} + S_{n-4} + \cdots + S_2 + S_1) + 2(S_{n-3} + S_{n-4} + \cdots + S_2 + S_1) Sn=2n+2n1+2n1+4(Sn3+Sn4++S2+S1)S_n = 2^n + 2^{n-1} + 2^{n-1} + 4(S_{n-3} + S_{n-4} + \cdots + S_2 + S_1) We now see a pattern! Using the exact same logic, we can condense this whole messy thing into a closed form:

Sn=2n+2n1n2+2n2(S1)S_n = 2^n + \underbrace{2^{n-1}}_{n-2} + 2^{n-2}(S_1) Sn=2n+2n1(n2)+2n1S_n = 2^n + 2^{n-1}(n-2) + 2^{n-1} Sn=2n+2n1(n1)S_n = 2^n + 2^{n-1}(n-1) Sn=2n1(2+(n1)S_n = 2^{n-1}(2 + (n-1) Sn=2n1(n+1)S_n = 2^{n-1}(n+1) We have our closed form, so now we can find the largest value of nn such that SnS_n is a perfect square.

In order for SnS_n to be a perfect square, we must have n1n-1 even and n+1n+1 be a perfect square.

Since n<1000n<1000, we have n+1<1001n+1 < 1001. We first try n+1=312=961n+1 = 31^2 = 961(since it is the smallest square below 10001000, which gives us n=960n=960. But n1n-1 isn't even, so we discard this value.

Next, we try the second smallest value, which is n=302=900n = 30^2 = 900, which tells us that n=899n=899. n1n-1 is indeed even, and n+1n+1 is a perfect square, so the largest value of nn such that SnS_n is a perfect square is 899899.

Our answer is 899\boxed{899}.

-FIREDRAGONMATH16

Solution 4

First, we set intervals. Say that a number NN falls strictly within [2k,2k+1][2^k, 2^{k+1}].

N<2k+1=2k+2kN<2^{k+1}=2^k+2^k

We can generalize this:

If a number is in the form N=2k+2RON=2^k+2^{R}O where OO is a positive odd number, $R:

N<2k+1=2k+2kO<2kRN<2^{k+1}=2^k+2^k\Longrightarrow O<2^{k-R} so there are 2kR12^{k-R-1} numbers that satisfy this form. For all numbers that satisfy this form, g(N)=2Rg(N)=2^R. The sum of g(N)g(N) for all NN in this form and interval is 2k12^{k-1}. RR can vary between 11 and k1k-1, so the total sum is 2k1+2k12k1k1=(k1)2k1\underbrace{2^{k-1}+2^{k-1}\cdots 2^{k-1}}_{k-1}=(k-1)2^{k-1}. The domain of the function we are trying to find is all even integers in the interval [21,2n][2^1, 2^n] so there are n1n-1 values of kk. Now we have the sum k=1n1(k1)2k1=i=1n2k2k\sum_{k=1}^{n-1}{(k-1)2^{k-1}}=\sum_{i=1}^{n-2}{k\cdot2^{k}}. However, we did not consider powers of two yet(since our interval was strictly between powers of 2), so we have to add k=1n2k\sum_{k=1}^{n}{2^k}. Note that i=1n2k2k=(21+222n2)+(22+232n2)+(2n3+2n2)+2n2=21(2n21)+22(2n31)+2n3(221)+2n2(211)=(n2)(2n1)k=1n22k=(n2)(2n1)2(2n21)=(n3)(2n1)+2\sum_{i=1}^{n-2}{k\cdot2^{k}}=(2^1+2^2\cdots 2^{n-2})+(2^2+2^3\cdots 2^{n-2})\cdots +(2^{n-3}+2^{n-2})+2^{n-2}=2^1(2^{n-2}-1)+2^2(2^{n-3}-1)\cdots +2^{n-3}(2^2-1)+2^{n-2}(2^1-1)=(n-2)(2^{n-1})-\sum_{k=1}^{n-2}{2^k}=(n-2)(2^{n-1})-2(2^{n-2}-1)=(n-3)(2^{n-1})+2. Adding k=1n2k=2(2n1)\sum_{k=1}^{n}{2^k}=2(2^n-1), we get (n+1)(2n1)(n+1)(2^{n-1}). If this sum is a perfect square, n≢0(mod2)n\not\equiv0\pmod2, since that would make 2n12^{n-1} not a perfect square, and n+1n+1 odd so it cannot contribute a factor of 2 to make the power of 2 a perfect square.

We want the least odd number less than 10001000 such that (n+1)(n+1) is an even perfect square. The greatest even square less than 10001000 is 302=90030^2=900 so n+1=900n=899n+1=900 \Longrightarrow n=\boxed{899}