File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes General Computing and the fly likes  Computing the Prime Factors of an Integer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark " Computing the Prime Factors of an Integer" Watch " Computing the Prime Factors of an Integer" New topic
Author

Computing the Prime Factors of an Integer

RabiDas Sharma
Ranch Hand

Joined: Nov 18, 2013
Posts: 69
Hello everyone

Computing the Prime Factors of an Integer

I can't understand this algorithm to compute prime factors of a integer.
please explain... if possible with example

with regards
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Where are you stuck? It is hard to explain something like that without simply repeating it unless we understand the parts and concepts you are having trouble with. So anything specific you have a question about?


Steve
RabiDas Sharma
Ranch Hand

Joined: Nov 18, 2013
Posts: 69
Hi Steve
please tell me math needed to understand this code
i.e, math needed to compute prime factors of a Integer.



thanks in advance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42929
    
  68
There isn't much to it if you know what prime number are. Start with http://www.vogella.com/articles/JavaAlgorithmsPrimeFactorization/article.html (which was the first result I got by searching for "calculating prime factors java").

If this kind of stuff interests you then Concrete Mathematics is an awesome book.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Computing the Prime Factors of an Integer