# Understanding bijection between polynomials and N

I tried to find a bijection between N and polynomials

Given any polynomial $$f(x) \in \mathbb{Z}[x]$$, write $$f(x) = a_1 + a_2 x + a_3 x^2 + \cdots + a_{n+1} x^n$$.

Let $$p(n)$$ denote the $$n$$th prime.

Then we can map $$f(x)$$ to $$\prod_{k = 1}^{n+1} {p_k}^{a_k} \in \mathbb{N}$$.

You can also see how the reverse mapping would work.

For example, the natural number $$63 = 3^2 \cdot 7^1$$ would map to the polynomial $$g(x) = 2x + x^3$$.

So you could find a mapping from each natural number to a polynomial, then compute that polynomial's roots, then list them. Then repeat the process for the next natural number, tossing out any repeats of roots. This will give you a list of all the algebraic numbers.

This function is neat and amazing but where " $$0 "$$ from naturals maps to?

Is this statement contained in that function or we must Improve that?
Because prime numbers start from 2...

• notice that 1 is the product of $p_k^0$, so it goes to the zero polynomial – Exodd Apr 24 at 9:12
• @Exodd Oh thanks your right! But what about $0$? – program_craft Apr 24 at 9:15
• Half of the world doesn't consider $0$ a natural number. By the way, that answer is also wrong in the sense that $a_k$ must be nonnegative for it to work... – Exodd Apr 24 at 9:18
• First map the naturals without zero to the polynomials and then compose that map with the one that maps the naturals with zero to the naturals without zero. – John Douma Apr 24 at 9:28
• Thank you all ! – program_craft Apr 24 at 14:47