mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2022-12-21, 21:59   #1
IamMusavaRibica
 
Nov 2022

1102 Posts
Default potential new algorithm for factoring semiprimes that are 5 mod 6

Hello, I wonder if i may get math related help in this forum, first i'll give an example and then my actual question at the end.

Let's take 7991 = 61*131 (but let it be p*q, unknown factors)

We know that if p is the smaller factor then p < sqrt(7991) < q
sqrt(7991) = 89.39..., let's just take 89 - D as the bound (and use D=0 for now, you'll see why I included D here).
And define:
p = 6a + 1
q = 6b + 5
Because p < 89, it follows that 6a + 1 < 89
6a < 88
a < 15
therefore b > 15

(6a+1)(6b+5) = 7991
36ab + 30a + 6b = 7986
6ab + 5a + b = 1331
We can substitute a = 15-c, b = 15+d, because of the above inequalities
6(15-c)(15+d) + 5(15-c) + (15+d) = 1331
6cd + 95c - 91d = 109
Notice that c and d must be different parity (one even, another odd)
so let's take c = 2m, d = 2n+1 (it doesn't really matter)
6*2m*(2n+1) + 95*2m - 91(2n+1) = 109
24mn + 202m - 182n = 200
12mn + 101m - 91n = 100 (divide by 2)
The coefficients near m and n are: 101 and -91. Adding up the absolute values yields 192, which is exactly the sum of our prime factors and gives the system of equations p*q = 7991, p+q = 192
If that wouldn't have happened, then substitute once again, but this time m and n must be the same parity, so m = 2t + 1, n = 2u + 1 or m = 2t, n = 2u, both would work.

Notice that this will happen if we (by mistake or by trial and error) define the smaller factor be 5 mod 6, and the larger one 1 mod 6 (in this case both c and d above would be negative).

You can also try this with any other semiprime, here are some numbers: 3713, 8633, 3977, this will still work the same.

However, this works efficiently when the difference of the two factors is very small. Here is where I'm stuck now. Remember the D i mentioned above? For example, when I tried 10476749 (which is 367*28547), I managed to get it working with D = -1868, -1867, 2950 and 2951. After some more testing it looks like it actually depends on the difference between two prime factors. My question is, would there exist any way to determine D based on any factors? With certain numbers, it would be very slow to bruteforce.

Last fiddled with by IamMusavaRibica on 2022-12-21 at 22:07
IamMusavaRibica is offline   Reply With Quote
Old 2022-12-22, 00:14   #2
SethTro
 
SethTro's Avatar
 
"Seth"
Apr 2019

2×3×83 Posts
Default

You might check out https://en.wikipedia.org/wiki/Fermat...ization_method which looks similar to what you are doing.
SethTro is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
factoring Semiprimes with Proximal factors a1call Miscellaneous Math 8 2022-06-25 02:25
Factoring semiprimes with restricted Rho method mgb Computer Science & Computational Number Theory 45 2019-08-05 20:02
New Factoring Algorithm GreasyScooby Factoring 4 2018-04-27 13:48
Semiprimes factoring. Is deterministic? What is computational complexity? Alberico Lepore Alberico Lepore 43 2017-06-10 15:42
Factoring semiprimes robert44444uk Math 34 2007-07-19 17:23

All times are UTC. The time now is 04:23.


Fri Jul 7 04:23:11 UTC 2023 up 323 days, 1:51, 0 users, load averages: 1.47, 1.62, 1.53

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔