I tried to find a bijection between N and polynomials
I was reading and thinking about this answer:

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...

  • $\begingroup$ notice that 1 is the product of $p_k^0$, so it goes to the zero polynomial $\endgroup$ – Exodd Apr 24 at 9:12
  • $\begingroup$ @Exodd Oh thanks your right! But what about $0$? $\endgroup$ – program_craft Apr 24 at 9:15
  • 1
    $\begingroup$ 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... $\endgroup$ – Exodd Apr 24 at 9:18
  • 1
    $\begingroup$ 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. $\endgroup$ – John Douma Apr 24 at 9:28
  • $\begingroup$ Thank you all ! $\endgroup$ – program_craft Apr 24 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.