A while ago, I came up with this formula:
$$\sum_{n=2}^{\lfloor\sqrt{x}\rfloor}\left\lfloor\frac{x}{n}-n+1\right\rfloor$$
Which, for the given value of $x$, returns the number of factor pairs that have a product below x (not counting multiples of 1). If you graph it as an equation, you'll notice that the equation doesn't climb at a prime number. This is because, of course, prime numbers don't have any factor pairs except for 1 and itself, which aren't shown.
Which means if I say the above formula is equal to $f(x)$ then I can do this:
$$p(x)=f(x)-f(x-1)$$
And if $p(x)$ returns 0, that means that $x$ is prime.
A few questions I have:
Can I further simplify $p(x)$ and if so, by how much?
Is it possible to convert this equation to something without summation, or another repetitive operator? Is there a proof that it can't be?
This is my first post on StackExcange, so apologies if I messed anything up.