Factor Factory

318
0
Published 2013-05-13
Computes the prime factors of any No. up to 9 ( 10 ?) places.

I Think, on Java its works only up to 7, maybe 9 or 10 places

If you see an 2.8865 e8 or something expression, stop it, integer format is too hight (unless seen in variable a)

Downloaded, its works for random numbers up to 9 places, for numbers a = pxq, (p,q = primnumbers, 5 places) up to 10 places.

The Programm works in 3 steps:

1) Trivial division with primes 2,3,5,7,11,13,17 (MUST NOT BE, but fasten it )

2) Primarity test on the rest, if not prime:

3) Something like the 'POLLARD RHO' test, using a random based "kangoroo algorithm" testing greatest common divisor of the generated pseudorandom-No.
Here I'm looking for easy to find factors, which must not be prime factors.
The steps done to solulotion of the algorithm is shown by the variable "run", its almost about sqroot of steps needed using a prime no table/ test division.

Step 2 is based on my BIG PRIME project, Step 3 is based on my GCD (Steiner algorithm) project.

Unfortunatly, the restriction to 9 (10 ?) places is given by the SCRATCH INTEGER limit format, and occurs by simple dividing 2 or 3 ...

For my BIG PRIME GENERATOR project works up to 15 places (avoiding SCRATH limits by using an original binary code), i'm looking for binary codes for dividing or substraction.

Downloaded, my favorite factorisation is:
12 = 34721(prime)x34729(prime),
it takes 10-20 sec on a 1,1 Ghz netbook and in average 180 steps on the random-kangoroo.

I think, the highest possible factorisation under the the constrictions of scratch might be in this programm: 9120 = 99989 x 99991, using the scratch-math processing.

Note, i'm working on a real binary method beeing absolut indepdent from the math algs of the program as of the processor.

Computing-tmes for the same factorisation will be more or less unique due to the random alg.

BY THE WAY: USE TURBO!