Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If a number is a product of unique prime numbers, are the factors of this number the used unique prime numbers ONLY? Example: 6 = 2 x 3, 15 = 3 x 5. But I don't know for large numbers. I will be using this in my code to speed up my checking on uniqueness of data. Thanks! :D


I will be considering all unique PRIME factors only. For example, I will not generate 9 because it's factors are both 3 (I don't consider 1 here), And also 24 (= 2 x 2 x 2 x 3). I want to know if it is TRUE if unique PRIME numbers are multiplied, the product's PRIME factors are only those PRIME factors that we multiplied in the first place. Sorry for not clarifying it earlier.

share|cite|improve this question
for any $n\in\mathbb{N}$, there is a unique representation of $n$ as a product of (positive integer) primes: if $n=p_1^{a_1}\cdot...p_m^{a_m}=q_1^{b_1}\cdot...q_n^{b_n}$ then $n=m$ and for each $i$, there is a unique $j(i)$ such that $p_i=q_{j(i)}$ and $a_i=b_{j(i)}$. this is sometimes referred to as the fundamental theorem of arithmetic – yoyo May 4 '11 at 12:57
up vote 4 down vote accepted

If I understand you correctly (which I realize I didn't), the answer is no. Take the number $30=2\cdot 3 \cdot 5$ for example. $6$, $10$, and $15$ are also factors of $30$. $$30 = 2 \cdot 3 \cdot 5 = (2 \cdot 3) \cdot 5 = 6 \cdot 5 = 2 \cdot (3 \cdot 5) = 2 \cdot 15 = (2\cdot 5) \cdot 3 = 10 \cdot 3$$

Edit: After your clarification, I will change my answer to yes. See the fundamental theorem of arithmetic. It "states that any integer greater than 1 can be written as a unique product (up to ordering of the factors) of prime numbers." - Wikipedia.

share|cite|improve this answer
I edited my question. Please read it again. Thanks! – Jairo May 4 '11 at 12:17
+ exaclty what I need! Thanks a lot! – Jairo May 4 '11 at 12:36

It is not quite clear what you are asking.

A prime number has two factors: itself and $1$. E.g. $3$ has the factors $3$ and $1$.

The product of two distinct prime numbers has four factors: itself, the two prime numbers and $1$. E.g. $6$ has the factors $6$, $3$, $2$ and $1$. You may not be interested in the first and last of these.

The product of three distinct prime numbers has eight factors: itself, itself divided by one of the three prime numbers, the three prime numbers, and $1$. E.g. $30$ has the factors $30$, $15$, $10$, $6$, $5$, $3$, $2$ and $1$.

You may also be interested in the fundamental theorem of arithmetic

share|cite|improve this answer
I edited my question. Please read it again. Thanks! – Jairo May 4 '11 at 12:17
You now seem to be asking if the fundamental theorem of arithmetic (linked in my original answer) is true. Yes it is. – Henry May 4 '11 at 13:58

Yes, the unique factorization of squarefree integers is simply a special case of the unique factorization of integers. More generally, in any integral domain, the same proof as for integers shows that prime factorizations are necessarily unique. However, generally an element needn't have a prime factorization since generally an irreducible element $\rm\:p\:$ needn't be prime, i.e. $\rm\:p\ |\ a\:b\ \Rightarrow\ p\ | a\:$ or $\rm\:p\ |\ b\ $ may not be true for all irreducible elements $\rm\:p\:.$ Additionally, the existence of factorizations into irreducibles may fail, e.g. there are no irreducible elements (hence no primes) in the domain of all algebraic integers since $\rm\ \ a\ =\ \sqrt{a}\ \sqrt{a}\:.$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.