$f(n)= \overbrace{(n\!-\!4)^2+13\cdot \color{c00}n}^{\textstyle a^2\ +\,\ p\cdot \color{c00}b\!\!\!\!\!\!\!\!\!\!\!}\,$ $\overset{\rm \color{darkorange}L}\Longrightarrow 13^2\mid f(n)\!\iff\! 13\mid n\!-\!4,\,\color{c00}n\!\iff\! \color{#0a0}{13\mid 4},n$
Lemma $\rm \color{darkorange}L\ \ $ If $\,p\,$ is $\rm\color{#c00}{prime}$ then $\,p^2\,|\, a^2\!+pb\!\iff\! p\,|\, a,b $
Proof $\ \ \ (\Leftarrow)\ $ Obvious. $\, \ \ (\Rightarrow)\ $ $\,\ p^2\,|\, a^2\! + pb\Rightarrow p\,|\, a^2\color{#c00}{\Rightarrow} p\,|\, a$ $\Rightarrow p^2\,|\, a^2\Rightarrow p^2\,|\,pb\Rightarrow p\,|\, b$
Generally the Lemma also holds true for for ${\rm\color{#c00}{squarefree}}\,p\,$ since they are precisely those integers that satisfy the above middle inference, namely $\ p\mid a^2\color{#c00}\Rightarrow\,p\mid a,\,$ for all integers $\,a.$