During AMC testing, the AoPS Wiki is in read-only mode and no edits can be made.

Euc20205/Sub-Problem 1

Problem

(a) For each positive real number x, define $f(x)$ to be the number of prime numbers $p$ that satisfy $x \le p \le x + 10$. What is the value of $f(f(20))$?

Solution

Because $20$ is a relatively small number, we can just bash this out. We first need to calculate $f(20)$, so the numbers in this interval are $20$ to $30$. The only prime numbers in this range are $23$ and $29$, so $f(20)=2$. Then, we need to find $f(2)$. The range we have is $2$ to $12$, and the prime numbers that are in this interval are $2$, $3$, $5$, $7$, and $11$, so $f(2)=\boxed{5}$.

~Baihly2024