Jonathan. Frech’s WebBlog

Fac­tor­i­za­tion (#116)

Jonathan Frech,

Playing around with prime numbers, I created this simple fac­tor­i­za­tion pro­gram.
The interesting thing about prime factors is that they are unique. There can on­ly be one way to multiply prime numbers to get 𝑛 where $n\in\mathbb{N}$$n\in\mathbb{N}$$n\in\mathbb{N}$ and $n\geq 2$$n\geq 2$$n\geq 2$ (excluding the com­mu­ta­tive prop­er­ty).For example, $2\cdot 3\cdot 7=42$$2\cdot 3\cdot 7=42$$2\cdot 3\cdot 7=42$ and that is the on­ly way to multiply prime numbers to get to 42.

Source code: fac­tor­i­za­tion.py