AMC 10 Step by Step

2005 AMC 10A Problem 24

P21-25~5 minPrint

For each positive integer m>1m > 1 , let P(m)P(m) denote the greatest prime factor of mm . For how many positive integers nn is it true that both P(n)=nP(n) = \sqrt{n} and P(n+48)=n+48P(n+48) = \sqrt{n+48} ?

Log in to save your progress.
Show solution without answering

Key insight

The largest prime factor equals the square root only for a prime squared. So look for two prime squares 48 apart: 121 and 169.

Solution

First decode the strange condition P(m)=mP(m) = \sqrt{m}.

1. What does the condition mean? P(m)P(m) is a prime, so m\sqrt{m} must be a prime pp, and then m=p2m = p^2. And for m=p2m = p^2 the only prime factor is pp, so the condition holds. For example, P(49)=7=49P(49) = 7 = \sqrt{49}, but P(36)=3P(36) = 3 while 36=6\sqrt{36} = 6. So the condition just says: mm is the square of a prime.
2. Restate the problem. We need primes pp and qq with n=p2n = p^2 and n+48=q2n + 48 = q^2. So
q2−p2=48.q^2 - p^2 = 48.
3. Factor. q2−p2=(q−p)(q+p)q^2 - p^2 = (q - p)(q + p), so 4848 must be split as (small factor) ×\times (big factor) with small =q−p= q - p and big =q+p= q + p.
4. Both factors are even. The two factors differ by 2p2p, which is even, so they are both even or both odd. Their product 4848 is even, so both are even. The even pairs for 4848 are 2×242 \times 24, 4×124 \times 12, 6×86 \times 8.
5. Solve each pair. qq is half the sum and pp is half the difference:

pairqqppboth prime?
2×242 \times 2413131111yes
4×124 \times 128844no
6×86 \times 87711no
  1. Answer. Only n=112=121n = 11^2 = 121 works, and 121+48=169=132121 + 48 = 169 = 13^2.

The answer is (B) 1\boxed{\textbf{(B)}\ 1}.

Why this works

The fancy notation hides a simple idea: "largest prime factor equals the square root" means "square of a prime." Two squares with a fixed difference are handled by factoring the difference of squares, and the both-even rule cuts the list of factor pairs down to three.

Alternative approach

Check small primes. If p<qp < q are primes, the gap q2−p2q^2 - p^2 grows as the primes grow. For odd pp, the next possible prime is at least p+2p + 2, and (p+2)2−p2=4p+4(p + 2)^2 - p^2 = 4p + 4. That is more than 4848 once pp is bigger than 1111. So test only p=2,3,5,7,11p = 2, 3, 5, 7, 11: adding 4848 to 4,9,25,49,1214, 9, 25, 49, 121 gives 52,57,73,97,16952, 57, 73, 97, 169. Only 169=132169 = 13^2 is a prime squared.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Decode the condition. If P(m)=mP(m) = \sqrt{m}, then m\sqrt{m} is an integer and is prime, say m=p\sqrt{m} = p, so m=p2m = p^2. Conversely P(p2)=p=p2P(p^2) = p = \sqrt{p^2}. Thus the condition says exactly that mm is the square of a prime.

So we need primes p,qp, q with n=p2n = p^2 and n+48=q2n + 48 = q^2, i.e.
q2−p2=(q−p)(q+p)=48.q^2 - p^2 = (q - p)(q + p) = 48.

The factors q−pq - p and q+pq + p differ by 2p2p, an even number, so they have the same parity; since their product is even, both are even. The factor pairs of 4848 with both entries even are (2,24)(2, 24), (4,12)(4, 12), (6,8)(6, 8). Solving q=sum2q = \frac{\text{sum}}{2}, p=difference2p = \frac{\text{difference}}{2}:

  • (2,24)(2, 24): q=13q = 13, p=11p = 11, both prime.
  • (4,12)(4, 12): q=8q = 8, not prime.
  • (6,8)(6, 8): q=7q = 7, p=1p = 1, not prime.

Only n=112=121n = 11^2 = 121 works (and indeed 121+48=169=132121 + 48 = 169 = 13^2).

The answer is (B) 1\boxed{\textbf{(B)}\ 1}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.