返回题库

AIME 2005 I · 第 12 题

AIME 2005 I — Problem 12

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

For positive integers n,n, let τ(n)\tau (n) denote the number of positive integer divisors of n,n, including 1 and n.n. For example, τ(1)=1\tau (1)=1 and τ(6)=4.\tau(6) =4. Define S(n)S(n) by S(n)=τ(1)+τ(2)++τ(n).S(n)=\tau(1)+ \tau(2) + \cdots + \tau(n). Let aa denote the number of positive integers n2005n \leq 2005 with S(n)S(n) odd, and let bb denote the number of positive integers n2005n \leq 2005 with S(n)S(n) even. Find ab.|a-b|.

解析

Solution 1

It is well-known that τ(n)\tau(n) is odd if and only if nn is a perfect square. (Otherwise, we can group divisors into pairs whose product is nn.) Thus, S(n)S(n) is odd if and only if there are an odd number of perfect squares less than nn. So S(1),S(2)S(1), S(2) and S(3)S(3) are odd, while S(4),S(5),,S(8)S(4), S(5), \ldots, S(8) are even, and S(9),,S(15)S(9), \ldots, S(15) are odd, and so on.

So, for a given nn, if we choose the positive integer mm such that m2n<(m+1)2m^2 \leq n < (m + 1)^2 we see that S(n)S(n) has the same parity as mm.

It follows that the numbers between 121^2 and 222^2, between 323^2 and 424^2, and so on, all the way up to the numbers between 43243^2 and 442=193644^2 = 1936 have S(n)S(n) odd. These are the only such numbers less than 20052005 (because 452=2025>200545^2 = 2025 > 2005).

Solution 2

Notice that the difference between consecutive squares are consecutively increasing odd numbers. Thus, there are 33 numbers between 11 (inclusive) and 44 (exclusive), 55 numbers between 44 and 99, and so on. The number of numbers from n2n^2 to (n+1)2(n + 1)^2 is (n+1n)(n+1+n)=2n+1(n + 1 - n)(n + 1 + n) = 2n + 1. Whenever the lowest square beneath a number is odd, the parity will be odd, and the same for even. Thus, a=[2(1)+1]+[2(3)+1][2(43)+1]=3+7+1187a = [2(1) + 1] + [2(3) + 1] \ldots [2(43) + 1] = 3 + 7 + 11 \ldots 87. b=[2(2)+1]+[2(4)+1][2(42)+1]+70=5+985+70b = [2(2) + 1] + [2(4) + 1] \ldots [2(42) + 1] + 70 = 5 + 9 \ldots 85 + 70, the 7070 accounting for the difference between 20052005 and 442=193644^2 = 1936, inclusive. Notice that if we align the two and subtract, we get that each difference is equal to 22. Thus, the solution is ab=ba=221+7087=025|a - b| = |b - a| = |2 \cdot 21 + 70 - 87| = \boxed{025}.

Solution 3

Similarly, b=(3222)+(5242)++(452442)19b = (3^2 - 2^2) + (5^2 - 4^2) + \ldots + (45^2 - 44^2) - 19, where the 19-19 accounts for those numbers between 20052005 and 20242024.

Thus a=(2212)+(4232)++(442432)a = (2^2 - 1^2) + (4^2 - 3^2) + \ldots + (44^2 - 43^2).

Then, ab=2(22+42++442)2(12+32+52+432)+12452+19|a - b| = |2(2^2 + 4^2 + \ldots + 44^2) - 2(1^2 + 3^2 + 5^2 + \ldots 43^2) + 1^2 - 45^2 + 19|. We can apply the formula 12+22++n2=n(n+1)(2n+1)61^2 + 2^2 + \ldots + n^2 = \frac{n(n + 1)(2n + 1)}{6}. From this formula, it follows that 22+42++(2n)2=2n(n+1)(2n+1)32^2 + 4^2 + \ldots + (2n)^2 = \frac{2n(n + 1)(2n + 1)}{3} and so that

12+32++(2n+1)2=(12+22++(2n+1)2)(22+42++(2n)2)1^2 + 3^2 + \ldots +(2n + 1)^2 = (1^2 + 2^2 + \ldots +(2n + 1)^2) - (2^2 + 4^2 + \ldots + (2n)^2)

=(2n+1)(2n+2)(4n+3)62n(n+1)(2n+1)3=(n+1)(2n+1)(2n+3)3= \frac{(2n + 1)(2n + 2)(4n + 3)}{6} - \frac{2n(n + 1)(2n + 1)}{3} = \frac{(n + 1)(2n + 1)(2n + 3)}{3}. Thus,

ab=2442345322243453452+20=25=025|a - b| = \left| 2\cdot \frac{44\cdot23\cdot45}{3} - 2\cdot \frac{22 \cdot 43 \cdot 45}{3} - 45^2 + 20\right| = |-25| =\boxed{025}.

Solution 4

Let Δn\Delta n denote the sum 1+2+3++n1+n1+2+3+ \dots +n-1+n. We can easily see from the fact "It is well-known that τ(n)\tau(n) is odd if and only if nn is a perfect square.", that

a=(2212)+(4232)(442432)=(2+1)(21)+(4+3)(43)(44+43)(4443)=1+2+3...44=Δ44a = (2^2-1^2) + (4^2-3^2) \dots (44^2 - 43^2) = (2+1)(2-1)+(4+3)(4-3) \dots (44+43)(44-43) = 1+2+3...44 = \Delta 44.

b=3222+5242...2006442=(3+2)(32)(43+42)(4342)+1+(2005442)=Δ43+69b = 3^2-2^2+5^2-4^2...2006-44^2 = (3+2)(3-2) \dots (43+42)(43-42) + 1 + (2005 - 44^2) = \Delta 43 + 69.

ab=Δ44Δ4369=4469=25a-b = \Delta 44-\Delta 43-69 = 44-69 = -25. They ask for ab|a-b|, so our answer is 25=025|-25| = \boxed{025}

-Alexlikemath