Factoring Method: Learn How to Use It

  • Context: Graduate 
  • Thread starter Thread starter Jopus
  • Start date Start date
  • Tags Tags
    Factoring Method
Click For Summary
SUMMARY

The forum discussion centers on a proposed original factoring method that utilizes a congruence of squares approach. The user provides examples of factorization for numbers such as 77, 8791, and 30,436,307,070,163, demonstrating the method's application and limitations. Feedback from other users highlights potential inaccuracies in the calculations and suggests that the method resembles established techniques like Fermat's factoring method and Dixon's method. The discussion also emphasizes the need for testing the method on larger integers, recommending programming languages such as Python for implementation due to its support for arbitrary precision integers.

PREREQUISITES
  • Understanding of factorization techniques, specifically congruence of squares.
  • Familiarity with Fermat's factoring method and Dixon's method.
  • Basic programming skills in Python or C for implementing the factoring method.
  • Knowledge of integer limits in computational tools like Excel.
NEXT STEPS
  • Research Python's arbitrary precision integers and how to implement them for factorization.
  • Explore the differences between Fermat's method and the proposed factoring technique.
  • Investigate Dixon's method and its applications in integer factorization.
  • Test the proposed method on larger integers using C or Java's BigInteger type.
USEFUL FOR

Mathematicians, computer scientists, and students interested in number theory and factorization methods, particularly those looking to develop or analyze original algorithms for large integer factorization.

Jopus
Messages
1
Reaction score
0
Hello,

I'm currently learning all about factorization techniques for a college project. I know that most of the advanced techniques are based around a congruence of squares. As part of our research we've been asked to think up an original factoring method. It doesn't matter how slow or fast it is as long as its original, and we get bonus points for this if we can prove it's original. I have thought of a method, although I don't think it is original, but I'm not sure, so I've come on here to check.

I'll give the method with some examples which I've been working through in excel. Tbh I've been working through many examples, and I've hit the number limit with excel which is above 10 digits or something.

Anyway, here goes:

Example (1): Factorize the number 77.

Method: 77 = 8^2 + 13
13-8 = 5, 5^2 + 4.13 = 77

Now we have that 77 = 8^2 + 1.13 ...(1)
and 77 = 5^2 + 4.13 ...(2)

Now multiply (1) by 2^2, giving 308 = 16^2 + 4.13 ...(3)

Then subtract (2) from (3) giving 231 = 16^2 - 5^2

Then factorise 77 as gcd(77, 16-5)*gcd(77,16+5) i.e. 77 = 11 * 7

Example (2): Factorize the number 8791.

Unlike with 77, which worked on the first attempt, this only works at the third attempt. Each attempt multiply the number in question by 1,2,3,4,5...

So attempts 1 and 2 didn't result in a square being generated, but attempt 3 does:

3*8791 = 26373 = 162^2 + 129

Now do Abs(129 - 162) = 33

33^2 + 196.129 = 26373

So we have that: 162^2 + 1.129 = 26373 ...(1)
33^2 + 196.129 = 26373 ...(2)

Now multiply 1 by 14^2 (=196) to give: 2268^2 + 196.129 = 196.26373 ...(3)
And: 33^2 + 196.129 = 26373

Subtracting (2) from (3) gives: 2268^2 -33^2 = 195.26373

Thus 8791 = gcd(2268-33, 8791)*gcd(2268+33,8791) = 149 * 59

Example (3): Factorize 8414786257.

A square was found in excel at the 1496th attempt.

1496*8414786257 = 3548030^2 + 3359572 = 188458^2 + 3736489.3359572

i.e. 1496*8414786257 = 3548030^2 + 3359572 = 188458^2 + (1933^2).3359572

Thus gcd(1933.3548030-188458, 8414786257) = 104297
and gcd(1933.3548030+188458, 8414786257) = 80681 Q.E.D.

I hope someone will be able to give me some feedback on this. As I say, I don't think this method can possibly be fully original, but I may get partial credit for any original element? Thanks for your help in this. :D

I'm running into a bit of a problem with excel, because of floating point integers and the limits with representation. I'd like to test out this method on larger integers, maybe using C. I'm a bit rusty on it at the moment, so if anyone could implement it fairly quickly and let me know how the results shape up I'd be grateful. I've reached the limit with what can be done with excel. This is the largest number I've been able to factorize thus far: 30,436,307,070,163. It's only 14 digits long. I want to test this method with semiprime numbers up to 20 or 30 decimal digits at least. 30,436,307,070,163 was factorized as follows.

At the 10,560th attempt a square was found:

10,560*30,436,307,070,163 = 566,928,040^2 + 122,679,680 = 444,248,360^2 + (31,799^2)*122,679,680

Thus gcd(31,799*566,928,040-444,248,360; 30,436,307,070,163) = 8,589,337.
The other factor is gcd(31,799*566,928,040+444,248,360; 30,436,307,070,163) = 3,543,499

From previous posts on this site, I've seen somewhere that a method must be tested for numbers greater than 2^64 to see if it is truly effective, and this falls well short of that, which is about 20 decimal digits, although this last factorization is much better than trial division, since sqrt(30,436,307,070,163) = 5,516,911 and there are about 382,000 primes below this number, hence 10,560 attempts is not bad at this stage. However I think this will be insufficient as the numbers grow larger, but I have no idea as I lack the ability to test this out on C at the moment. If anyone could quickly check this out by seeing how it performs with two 15 digit primes, spaced not too close together, I would be very grateful to them.
 
Physics news on Phys.org
you write:
5^2 + 4.13 =77
that's wrong. 5^2 + 4.13 =25+4.13 =29.13

same thing with your equations 1 and 2. How can 77 be equal to 8^2 + 1.13 ?

and what exactly do you mean by ... in equation 1 and 2?
 
epsi00 said:
you write:
5^2 + 4.13 =77
that's wrong. 5^2 + 4.13 =25+4.13 =29.13

same thing with your equations 1 and 2. How can 77 be equal to 8^2 + 1.13 ?

and what exactly do you mean by ... in equation 1 and 2?
Its pretty obvious that the period stands for the multiplication sign. You can take that approach when you have a given that you are not working with decimals. However, I think that the op could have used the more conventional * to make it more clear.
 
I havn't seen this method of factoring before. However, proving it original may be a problem. You may try the wolfram site to work math problems with large numbers.
 
Last edited:
It seems to me that it is a modified form of Fermat factoring. A^2 - B^2 Is the next to the last step.
 
coolul007 said:
It seems to me that it is a modified form of Fermat factoring. A^2 - B^2 Is the next to the last step.
It's a precursor to Dixon's method.

Jopus said:
I'd like to test out this method on larger integers, maybe using C.
Python is probably a better choice; it has arbitrary precision integers built-in, and is generally easier to program in.
 
C as well as JAVA have the BigInterger type, fairly easy to use.
 

Similar threads

Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 39 ·
2
Replies
39
Views
4K
  • · Replies 7 ·
Replies
7
Views
6K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 2 ·
Replies
2
Views
13K
  • · Replies 16 ·
Replies
16
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K