Prime factorization algorithm: How to make it faster?

I have a program that finds the prime factors of a given number. The algorithm works in the way described below.1) While n is divisible by 2, print 2 and divide n by 2.2) After step 1, n must be odd. Now start a loop from i = 3 to square root of n. While i divides n, print i and divide n by i, increment i by 2 and continue.3) If n is a prime number and is greater than 2, then n will not become 1 by above two steps. So print n if it is greater than 2.Is there a way to make it faster?...Read more

ti basic - Prime factorization program (TI-84+)

I'm making a prime factorization program on my calculator. It works fine for smaller numbers, but it's showing strange behavior for 2^n, n≥47. It'll do fine for a while, but then at some point the program breaks down and after spitting out the prime numbers 17 and 353, keeps running forever.With my extremely limited knowledge in programming, I'm suspecting that the calculator can't handle such a large number accurately and messes up the program.Here's the code: (variables explained below; outputs prime factors in the form of A+Bi for a prime fa...Read more

prime factoring - Why some Large number (around 100 digit) can factor out very fast?

I am new to number theory, I am trying to prime factor large numbers in around 100 digit numbers. like my program factor out a 93 digit number in 30min while a 116 digit number that took computer few days. however, there is a 104 digit number i work on 13270693758489295980223043261833153409168505210538146384653262578584663296471619841442958585315929292397the result come out instantly I wonder why this number able to factor out so fast. what condition it must satisfy to able to factor out very fast and easy....Read more

Automatic integer factoring for 310-digit decimal numbers

Is here some software, which is capable of factoring a 310-digit decimal integer number into primes? There was msieve, which I successfully used for 120-digit factoring, but 310 digit is greater than max allowed number of 308-digit for msieve.PS: the number to factor have 2 prime factors, and p-1,p+1 and other easy and fast factoring methods are likely to fail.UPDATE: Seems only GGNFS will work and there are some python scripts to automate factoring....Read more