is a closed form solution possible?

116 Views Asked by At

I have a facination with prime numbers and unsolved problems, and i ended up creating a formula that returns the index of any prime number. The main problem is I don't know if the summations if its possible to remove the summations, as the further away an inputted number is from 0, the more addition you need to do for the summations. it's also possible to use modulo instead of gcd, though i don't know the effect it would have. the equation in question: $$ f\left(n\right) = \begin{cases} \left( \sum\limits_{l = 1}^{\lceil\sqrt{n}\rceil} \begin{cases} 1, \mbox{if}\ \sum\limits_{i = 1}^{\lceil\sqrt{l}\rceil} \operatorname{gcd}\left(n,i\right) = \lceil\sqrt{l}\rceil \\[2mm] 0 \mbox{ otherwise}\ \end{cases} \right), \mbox{if}\ \sum\limits_{i=1}^{\lceil\sqrt{n}\rceil} \operatorname{gcd} \left( n,i \right) = \lceil \sqrt{n} \rceil \\[2mm] 0 \mbox{ otherwise}\ \end{cases} $$

if the equation doesn't work, if i'm wrong, if you need clarification, etc. just let me know, I'd be happy to answer