For each positive integer , let denote the greatest prime factor of . For how many positive integers is it true that both and ?
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
P(m) = sqrt(m) forces m to be the square of a prime, so q^2 - p^2 = 48 with p, q prime; factor as (q-p)(q+p) with both factors even.
Solution
Decode the condition. If , then is an integer and is prime, say , so . Conversely . Thus the condition says exactly that is the square of a prime.
So we need primes with and , i.e.
The factors and differ by , an even number, so they have the same parity; since their product is even, both are even. The factor pairs of with both entries even are , , . Solving , :
- : , , both prime.
- : , not prime.
- : , , not prime.
Only works (and indeed ).
The answer is .
Why this works
The disguised statement "" is just " is a prime squared." Two squares with a fixed difference are handled by the difference-of-squares factoring, and the parity of the two factors cuts the factor pairs of from five to three. This factor-pair method is the standard attack on .
Alternative approach
Bound and check: consecutive odd primes have , which exceeds once . So only need testing; gives , and only is a prime square.
The trap
Missing that the two factors must have the same parity, and then wasting time on pairs like 1 x 48 or 3 x 16, or accepting q = 8 or p = 1 as prime.
Common mistakes
- Missing that the two factors must have the same parity, and then wasting time on pairs like 1 x 48 or 3 x 16, or accepting q = 8 or p = 1 as prime.
- Reading as " is a perfect square" and counting all square pairs differing by ( and , and , and ), giving .
Techniques
Apply an identity: SFFT, sum of squares, difference of cubes, Vieta · Use an invariant, parity, or coloring argument