{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}”No results found for “{{searchWords}}”× back to contents
The second factor is greater than $1$, so we need $n^2-8n+8=1$, i.e.\ $n=1$ or $n=7$ (otherwise $f(n)$ is negative or a product of two factors greater than $1$).
$f(1)=17$ and $f(7)=1\cdot113=113$, both prime. The sum is $\boxed{130}$.