2005 AIME I Problem 12

Attempt Problem 12 of the 2005 AIME I below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2005 AIME I solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

12.

For positive integers n,n, let τ(n)\tau(n) denote the number of positive integer divisors of n,n, including 11 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 \le 2005 with S(n)S(n) odd, and let bb denote the number of positive integers n2005n \le 2005 with S(n)S(n) even. Find ab.|a - b|.

Answer: 25
Concepts:parityperfect squarefactor counting
Difficulty rating: 2760
Solution:

Divisors of nn pair up as dd and nd,\frac{n}{d}, so τ(n)\tau(n) is odd exactly when nn is a perfect square. Hence S(n)S(n) changes parity exactly at the squares, which means S(n)S(n) is odd exactly when the number of squares up to n,n, namely n,\lfloor\sqrt{n}\rfloor, is odd.

For each k,k, there are 2k+12k + 1 integers nn with n=k,\lfloor\sqrt{n}\rfloor = k, namely k2nk2+2k.k^2 \le n \le k^2 + 2k. Since 442=193644^2 = 1936 2005\le 2005 <2025=452,\lt 2025 = 45^2, the odd values k=1,3,,43k = 1, 3, \ldots, 43 all have their full blocks within range, so a=k odd,k43(2k+1)=2(1+3++43)+22=2484+22=990. \begin{aligned} a &= \sum_{k \text{ odd},\, k \le 43} (2k + 1) \\ &= 2(1 + 3 + \cdots + 43) + 22 \\ &= 2 \cdot 484 + 22 \\ &= 990. \end{aligned}

Then b=2005990=1015,b = 2005 - 990 = 1015, and ab=25.|a - b| = 25.

← Problem 11#11
Full Exam

Problem 12 in Other Years