# Prime numbers series

Given the series of $g_n$ functions which have the multiples of $n$ as roots : $$g_n(x) = \sin \left( {\pi \over n} x \right) ; n \in \mathbb N^*$$

And the series of $f_n$ functions which have the non multiples of $n$ as roots : $$f_n(x) = \begin{cases} {g_1(x)}\over{g_n(x)} & ; x\ne kn & (k\in\mathbb Z)\\ n(-1)^{(n-1)k} & ; x = kn & (k\in\mathbb Z)\end{cases}$$

The $f_n$ are continuous at all $x=kn$ ($k\in\mathbb Z$) because of $$\lim_{x\rightarrow kn} \frac{g_1(x)}{g_n(x)} = \lim_{x\rightarrow kn} \frac{\sin(\pi x)}{\sin\left( {\pi \over n} x \right)} = \lim_{x\rightarrow kn} \frac{\pi\cos(\pi x)}{\frac{\pi}{n} \cos\left(\tfrac {\pi}{n}x\right)} = \frac {(-1)^{nk}}{\tfrac 1n (-1)^{k}} = n(-1)^{(n-1)k}$$ Thanks to Tampis who answered me here.

These $f_n$ functions cross the x axis except when they reach a multiple of $n$ where they jump to a local maximum or minimum.

We're constructing the series $U$ with $u_1=2$ and $u_n$ is the lowest number greter than $u_{n-1}$ that is solution of the following system : $$\begin{cases} |f_2(x)|=2 \\ \\ ... \\ \\ |f_n(x)|=n \end{cases}$$

$u_1=2$ is prime. And the way I've described $u_n$ should give the the integer following $u_{n-1}$ which is not a multiple of all the $u_k ; k \in \lbrace 1 , ... , n-1 \rbrace$ and therefore is also prime.

My question is : does $U$ correctly and completly describe the prime number series? Or did I fail?