$$f\left(m\right)=\sum_{i=0}^{m^{2}}⌊cos\left(⌊ \frac{\sum_{o=1}^{i}\left(\prod_{n=2}^{⌊\sqrt{o}⌋}\left(1-⌊\cos\left(\pi\frac{o}{n}\right)^{2}⌋\right)\right)}{m+1}⌋\right)^{2}⌋$$
I was watching a video about how a formula for finding the nth prime, Willan's formula, and how it did that.
What this function does is similar, and can be broken down into a few different parts.
Part 1
$$g\left(o\right)=\prod_{n=2}^{⌊\sqrt{o}⌋}\left(1-⌊\cos\left(\pi\frac{o}{n}\right)^{2}⌋\right)$$
This section of the function is a primality detector. If a number is prime, It outputs a $1$, but if it is composite, It outputs a $0$.
Part 2
$$h\left(i\right)=\sum_{o=1}^{i}\left(\prod_{n=2}^{⌊\sqrt{o}⌋}\left(1-⌊\cos\left(\pi\frac{o}{n}\right)^{2}⌋\right)\right)$$
This part of the function uses the primality detector to find the number of primes before a given number $i$.
Part 3
$$k\left(i,m\right)=⌊cos\left(⌊ \frac{\sum_{o=1}^{i}\left(\prod_{n=2}^{⌊\sqrt{o}⌋}\left(1-⌊\cos\left(\pi\frac{o}{n}\right)^{2}⌋\right)\right)}{m+1}⌋\right)^{2}⌋$$
This part of the function finds if the number of primes before $i$ is greater than $m+1$. If i>m+1, it outputs 0, if i<m+1, it outputs a 1
This means that this whole equation is saying that, for every number between 0 and m^2, checks to see if the number of the primes below that number is less than m+1, and adds together all of the outputs.