answersLogoWhite

0


Best Answer

Here's an algorithm in java:

import java.util.Scanner;

import java.util.ArrayList;

public class PrimeFactorization

{

public static void main(String[] args)

{

String response;

Scanner scan=new Scanner(System.in);

double num=0;

boolean read=false,run=true;

timer.start();

while(run)

{

System.out.println("Enter a number");

while(!read)

{

response=scan.next();

try

{

num=Double.parseDouble(response);

read=true;

}

catch(NumberFormatException exception)

{

System.out.println("Incorrect Format");

}

}

read=false;

TimerListener.resetT();

ArrayList<Double> list=getPrimeFactorization(num);

System.out.println("Prime Factorization:");

for(int count=0;count<list.size()-1;count++)

{

System.out.print(list.get(count)+", ");

}

System.out.println(list.get(list.size()-1));

System.out.println("Time: "+TimerListener.getT()+"s\n\n");

}

}

public static ArrayList<Double> getPrimeFactorization(double num)

{

ArrayList<Double> list=new ArrayList<Double>();

boolean run=true;

double index;

while (run)

{

list.add(index=getFirstFactor(num));

num=num/index;

if (num==1) run=false;

}

return list;

}

private static double getFirstFactor(double num)

{

for(int count=2;count<=Math.sqrt(num)+1;count++)

{

if ((double)num/(double)count%1==0)return count;

}

return num;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

All composite numbers can be expressed as unique products of prime numbers. This is accomplished by dividing the original number and its factors by prime numbers until all the factors are prime. A factor tree can help you visualize this.
Example: 210

210 Divide by two.
105,2 Divide by three.
35,3,2 Divide by five.
7,5,3,2 Stop. All the factors are prime.

2 x 3 x 5 x 7 = 210
That's the prime factorization of 210.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

In number theory, the prime factors of a positive integer are the prime numbers that divide that integer exactly, without leaving a remainder. The process of finding these numbers is called integer factorization, or prime factorization.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

All composite numbers can be expressed as unique products of prime numbers. This is accomplished by dividing the original number and its factors by prime numbers until all the factors are prime. A factor tree can help you visualize this.
Example: 210

210 Divide by two.
105,2 Divide by three.
35,3,2 Divide by five.
7,5,3,2 Stop. All the factors are prime.

2 x 3 x 5 x 7 = 210
That's the prime factorization of 210.
210 has sixteen factors.
Now that you know that 1, 2, 3, 5 and 7 are factors of 210, you need three more.
2 x 3 = 6
2 x 5 = 10
2 x 7 = 14
Divide all of those into 210 to get the other half.
1, 2, 3, 5, 6, 7, 10, 14, 15, 21, 30, 35, 42, 70, 105, 210

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

There's really only one way to find a prime factorization; divide prime numbers into a given number and its factors until all the factors are prime. There are numerous ways to notate that process. A quick glance through this website reveals continuous division, quotients of 1, Euclidean method, division ladders and the various factor trees, fireworks, rainbows, etc.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

There are factor trees and ladders and rainbows and fireworks and they're all pretty much the same thing: ways to notate the process of finding the prime factorization of a given number. They differ in where they write the number and where the factors end up. In a factor tree, write the original number at the top and the bottommost branch will be the prime factorization. In a factor rainbow, write the original number at the bottom and the prime factorization will be the uppermost arc.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

All composite numbers can be expressed as unique products of prime numbers. This is accomplished by dividing the original number and its factors by prime numbers until all the factors are prime. A factor tree can help you visualize this.

Example: 210

210 Divide by two.

105,2 Divide by three.

35,3,2 Divide by five.

7,5,3,2 Stop. All the factors are prime.

2 x 3 x 5 x 7 = 210

That's the prime factorization of 210.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

Factor trees, rainbows, fireworks, ladders

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you find the prime factorization of a number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you find procedure prime factorization 81?

find the prime factorization to the number 81


Find the prime factorization for 153?

The prime factorization of 15332 &bull; 17153 is not a prime number


Find the prime factorization of a number?

The prime factorization of 6 is 2 x 3.


How do you find the number with prime factorization 23?

Only 23 has prime factorization of 23.


Find the prime factorization of 5?

Since 5 is a prime number, the prime factorization of 5 is simply 5.


What is prime factorizasion?

Prime factorization is when you find all the prime factors of a number.


Find the prime factorization of the numbers 33?

The prime factorization of the number 33 is: 3 x 11


What does find the number for each factorization mean?

prime factorization each number is a part of the whole


How would you find the prime factorization of 29?

29 is a prime number


Find the prime factorization of 37?

None. 37 is a prime number.


Find the prime factorization of the number 30?

2x3x5


What is the prime factorization to find the LCM of 4?

The prime factorization of 4 is 2 x 2. It is not possible to find the LCM of a single number.