mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Miscellaneous Math (https://www.mersenneforum.org/forumdisplay.php?f=56)
-   -   A stupid factoring method (https://www.mersenneforum.org/showthread.php?t=23095)

JM Montolio A 2018-02-26 17:27

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

VBCurtis 2018-02-26 18:29

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?

science_man_88 2018-02-26 18:58

[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.

CRGreathouse 2018-02-26 19:02

[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.

JM Montolio A 2018-02-26 19:11

yes.
JM

JM Montolio A 2018-02-26 19:57

N 2047 ?

2112 =( 23* 2+-13)*( 23* 3+ -5) -> 2047 =( 23)*[ 89]

VBCurtis 2018-02-26 20:31

[QUOTE=CRGreathouse;480975]But given the thread title I think that's fine.[/QUOTE]

:tu:

You win the forum today, sir.

bsquared 2018-02-26 21:05

[QUOTE=VBCurtis;480982]:tu:

You win the forum today, sir.[/QUOTE]

Agreed, I laughed out loud just now after reading CRG's post.

JM Montolio A 2018-02-27 12:38

The inteligent search the truth.
The others only look for problems.

JM M

science_man_88 2018-02-27 18:10

[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 ...

JM Montolio A 2018-02-27 20:03

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.