# Prime factorization for large numbers

1. Aug 22, 2011

### aalireza

I need to factorize large numbers (some of them have about 200 decimal digits). Wolfram alpha is a dead end and programming with python is not working for me too. Any suggestions?

2. Aug 23, 2011

### phyzguy

3. Aug 23, 2011

### aalireza

Oops. Sorry! I did miss a REALLY important thing(!!): they are really so simple/silly! They are full of zeros, for example one of them is 909091 with 150 zeros after it, so the only problem would be factorizing 909091 and that's not a big deal. so the answer of the given number will be 909091*2^150*5^150. There is a list of them (523 numbers) and they are between 100 and 200 digits and most of them are really simple to solve ... But my problem is that I don't want to factorize them myself.

+ I think If I eliminate zeros and then factorize it with current codes, it can be done. but It's a new thing for me and I don't know how to do it properly!

4. Aug 23, 2011

### phyzguy

Factoring small numbers like that is really just a process of searching through the possible prime factors up to the square root of the number. You can write a code to do it or use existing codes. Why didn't Wolfram Alpha work for you? It did for me. The example you listed is prime. See this link:

http://www.wolframalpha.com/input/?i=factor[909091]

5. Aug 23, 2011

### Bill Simpson

6. Aug 23, 2011

### aalireza

I did the damn thing, I just entered the non-zero part in Wolfram and factorize the rest of them myself.

---
@Bill Simpson & @phyzguy:
Of course, if you enter :
http://www.wolframalpha.com/input/?i=factor(987654320987654321*2^180*5^180

It will give you the answer, but The numbers weren't in this form and there is not enough room for all the zeros to be entered in Wolfram:
http://www.wolframalpha.com/input/?...000000000000000000000000000000000000000000000

, and second, there was 523 of them and That's why I said I want to eliminate all zeros and write a code for them... Because It was a nightmare to enter them one by one, I wanted to give the .ods to that program and get the answers as fast as possible.... anyways, It's done now! :-)

7. Aug 24, 2011

### mathwonk

if you ever have a real challenge to factor large numbers, write Carl Pomerance and ask him.