Let $f:\mathbb{N} \rightarrow \mathbb{N},$ $f(n)=n^2-69n+2250$ be a function. Find the prime number $p$, for which the sum of the digits of the number $f(p^2+32)$ is as small as possible.
Source: Moldova TST 2022
Tags: number theory
Let $f:\mathbb{N} \rightarrow \mathbb{N},$ $f(n)=n^2-69n+2250$ be a function. Find the prime number $p$, for which the sum of the digits of the number $f(p^2+32)$ is as small as possible.