I'm just a normal "civilian" here, but a little while ago I was playing around with some numbers and noticed this little pattern that worked for $13$ numbers. I tried to google it to get more information, but I couldn't find anything, so I decided appeal to the greater interweb for insight.
So here it is: If you take the numbers $\{1, 9, 25, 49, \dots, 625\}$ (i.e. the squares of odd numbers, but ONLY up to 625) and plug them into $$f(n) =\frac{n+12\sqrt{n}-13}{8}$$ the outputs are the same as the outputs of the prime counting function, $\pi(n)$, at those values. It's not completely exact, since $f(225)$ and $f(289)$ differ from the respective $\pi(225)$ and $\pi(289)$ by $1$, but otherwise $f(n)$ gives the same values.
So I was just curious as to why this happens. Are there other numbers or algebraic formulas that coicide with $\pi(n)$ like this, or is this just coincidence?
Any insight would be appreciated. Thank you in advance for your consideration. Have a wonderful day!