• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Computing the Prime Factors of an Integer

 
RabiDas Sharma
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
RabiDas Sharma
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic