If $a$ is a positive integer, then $3a^2+19a+30$ and $a^2+6a+9$ are also positive integers. We define the function $f$ such that $f(a)$ is the greatest common divisor of $3a^2+19a+30$ and $a^2+6a+9$. Find the maximum possible value of $f(a)- a$.
3a2 + 19a + 30 factors as (3a + 10)(a + 3)
a2 + 6a + 9 factors as (a+3)2
The greatest common factor is therefore f(a) = (a + 3), which means that f(a) - a = 3 for all a.
.