![]() |
A stupid factoring method
Let m=(a*b+d)(a*c+e).
Then, n= m-(d*e) =(a)[a*b*c+b*e+c*d] Example: m=24 =(139* 1+-137)*(139* -1+151) -> n= 20711 =(139)*[149] Great , not? JM Montolio |
How would you use this to factor anything?
If I started with, say, an 8-digit number n to be factored, how would I have any idea what m might be? |
[QUOTE=JM Montolio A;480955]Let m=(a*b+d)(a*c+e).
Then, n= m-(d*e) =(a)[a*b*c+b*e+c*d] Example: m=24 =(139* 1+-137)*(139* -1+151) -> n= 20711 =(139)*[149] Great , not? JM Montolio[/QUOTE]. So you're trying to use remainder math to factor another number. |
[QUOTE=VBCurtis;480969]How would you use this to factor anything?
If I started with, say, an 8-digit number n to be factored, how would I have any idea what m might be?[/QUOTE] Well, you could just loop through values until you find some that work. :smile: Here's a version which avoids picking the factor a directly: [code]montolio(n)=for(mx=1,n, for(b=1,mx, for(c=1,mx, for(d=1,mx, for(e=1,mx, my(s, p); if(issquare(c^2*d^2+b^2*e^2+2*b*c*(d*e+2*n),&s) && denominator(p=(c*d+b*e+s)/2/b/c)==1 && p>1 && p<n, if(n%p, error()); return(p)))))))[/code] It takes only 2 seconds to find the factor 2 of 1906. 10006 is not so easy, though, taking 1 minute, 32 seconds to find the same. But given the thread title I think that's fine. |
yes.
JM |
N 2047 ?
2112 =( 23* 2+-13)*( 23* 3+ -5) -> 2047 =( 23)*[ 89] |
[QUOTE=CRGreathouse;480975]But given the thread title I think that's fine.[/QUOTE]
:tu: You win the forum today, sir. |
[QUOTE=VBCurtis;480982]:tu:
You win the forum today, sir.[/QUOTE] Agreed, I laughed out loud just now after reading CRG's post. |
The inteligent search the truth.
The others only look for problems. JM M |
[QUOTE=JM Montolio A;481023]The inteligent search the truth.
The others only look for problems. JM M[/QUOTE] I think you'll find them being intellectual ... |
I think this is what user a1call uses on their work
on they work of factoring using (n+1)(n-1).
Is the same thing, i believe. Deep thinking of course. JM M |
| All times are UTC. The time now is 23:23. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.