Finding the least sum of digits possible for an outcome of a function in prime numbers. Let $f(n)=p^4-5p^2+13$ simplified as $f(n)=(p^2-{5\over2})^2+{27\over4}$ where $p$ is an odd prime.
Find the least possible sum of digit of $f(n)$.  
My findings:
After putting $p=(3n,3n+1,3n+2)$ in $p(n)$ and dividing $p(n)$ by $3$. I found that $p(n)$ is always divisible by $3$ except for $p=3$.
So the possible sum of digits is either divisible by $3$ or $13$.  $\rightarrow$ (We get $p(3)=49$ $\Rightarrow$ $4+9=13$)

Let $p \not = 5$, then by using Fermat's Little Theorem we get that $p^4 - 5p^2 + 13 \equiv 1 + 3 \equiv 4 \pmod 5$. So the last digit is either $4$ or $9$. However $f(p)$ is always odd number, so the last digit must be $9$. Thus the sum of digits of $f(p)$ for $p \not = 5$ is at least $9$. On the other side we have that $f(5) = 513$, whose digit sum is $9$.
In conclusion $9$ is the smallest sum of digits of $f(p)$ for an odd prime $p$.
REMARK: Note that the minimum occurs only for $p=5$. This is true as for $p \not = 5$ we get that the last digit is $9$ and as $f(p) \not = 9$, there must be another non-zero digit. 
