 mersenneforum.org Formubla-bla-bla to calculate the sum of two Prime numbers just by knowing the product
 Register FAQ Search Today's Posts Mark Forums Read  2016-07-11, 23:57   #23
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts Quote:
 Originally Posted by a1call How do you get the 8 to use in the formula, when 8 is the unknown that you are trying to find?
because he got 8 for the maximum ( technically that's only if converted to whole values you get 8.21.... otherwise) so plugging the maximum in got the minimum as 6.

Last fiddled with by science_man_88 on 2016-07-11 at 23:58   2016-07-11, 23:58 #24 firejuggler   Apr 2010 Over the rainbow 1001100000102 Posts he substract 9.. (9 repating until number of digit product-1) . technically that would give 5.19, so 5... but well...   2016-07-12, 00:01 #25 Godzilla   May 2016 16110 Posts no no I say the same number of digits and little difference example 2111*2399   2016-07-12, 00:05   #26
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts Quote:
 Originally Posted by Godzilla no no I say the same number of digits and little difference example 2111*2399
if you mean the factors then we'd have to factor the product and then sum if we know the factors we can just sum.   2016-07-12, 00:08 #27 firejuggler   Apr 2010 Over the rainbow 2×1,217 Posts One factor HAVE to be close to sqrt(product) otherwise it won't work. wich we could assume to work with RSA-100 Last fiddled with by firejuggler on 2016-07-12 at 00:22   2016-07-12, 00:16 #28 a1call   "Rashid Naimi" Oct 2015 Remote to Here/There 23×241 Posts Thank you science man To maximize the sum the primes should be as far apart as possible. Ignoring the 2, let's work with 3 and 101. The product is 303. The sum is 104. Substituting the product in the formula for the maximum sum we get: Sqrt(2178*303)/22=36.9 37 is a maximum well below the actual sum of 104. Last fiddled with by a1call on 2016-07-12 at 00:20   2016-07-12, 03:33 #29 LaurV Romulan Interpreter   Jun 2011 Thailand 22·3·739 Posts How close? as in "pollard rho" close? in that case we won't need a new method... baby step, giant step, blah blah, repeat, we found the factors.... If you are able to find the sum of the factors, knowing the product, then you are able to factor any number instantly, using the quadratic equation and Vieta's formula. (sometime we miss RDS. Seriously!)   2016-07-12, 06:10   #30
R. Gerbicz

"Robert Gerbicz"
Oct 2005
Hungary

26028 Posts Quote:
 Originally Posted by LaurV How close? as in "pollard rho" close? in that case we won't need a new method (sometime we miss RDS. Seriously!)
If abs(p-q) is small then we have https://en.wikipedia.org/wiki/Fermat...ization_method. For typical rsa numbers we see max(p/q,q/p)<10, but this doesn't help too much for Fermat.

Quote:
 Originally Posted by LaurV If you are able to find the sum of the factors, knowing the product, then you are able to factor any number instantly, using the quadratic equation and Vieta's formula.
This is very known, for an improved version of this see my own coding task made for high school students: http://www.spoj.com/problems/HS08CODE/.   2016-07-12, 06:18 #31 retina Undefined   "The unspeakable one" Jun 2006 My evil lair 10110101011112 Posts So in summary this method/formula is totally useless. Not only doesn't it provide any useful information when it does work, it is also not guaranteed to give the correct bounds anyway. -1   2016-07-12, 07:50   #32
Godzilla

May 2016

7×23 Posts Quote:
 Originally Posted by firejuggler ok, and now, what is the next step? once you have 376 and 432? Since you don't know the 408. there is 11 solution for 376, 22 for 378, 13 for 380, 9 for 382, etc... lets say an 12 for each *value* , so 672 multiplication just for thhhis small number? lets take 2111*98773 = 208509803 sum is =100884 sqrt(2178*208509803)/ 22=30632 sqrt(2178*108509804)/ 22=21790 it won't work.
Now i show you because i have choose 2178 and 6534 , this is my program c++
Why 6534 ? test the program .

lets take

sqrt(2178*6534*208509803)/ 22 = 2476048 / 22 = 112547 there is a big interval but near
sqrt(2178*6534*108509804)/ 22 = 1786200 / 22 = 81190 there is a big interval but near

or take 101*3

sqrt(2178*6534*303) / 22= 2984 / 22 = 135
sqrt(2178*6534*(303-99)) / 22= 2449 / 22 = 111 is near but over the sum 104

what does it mean .

#include<cstring>
#include<iostream>
using namespace std;

long long int inversione(long long int numero)
{
long long int ris = 0;

while(numero)
{
ris = ris * 10 + numero % 10;
numero /= 10;
}

return ris;
}

int main ()

{
long long int aa = 0;
long long int ii = 0;
long long int num1 = 0;
long long int a = 0;
long long int primo = 0;
long long int num = 0;
while (aa == 0)
{
cout<<"Inserire numero superiore a 99 : ";
cin >>primo;
num = primo;
while (num != num1)
{

if (ii == 0 )

{
// num = (6534 * (inversione(num ) - num ) ) / 22; // produce serie di numeri che si annullano o ritornano , con qualsiasi numero , test this
//num = ((15657 * (inversione(num ) - num ) ))/22;
// num = (2178 * (inversione(num ) - num ) ) /22; // produce 2178 o 21....9....78 e l'opposto 6534 o 65...9...34 con qualsiasi numero , test this

num = (2178 * ( num ) )/22;
ii++;

cout<<"Numero invertito : "<<num;
if (num < 0)

{
num = num * -1;
cout<<num;
}

}

if (ii > 0)
{
num = inversione(num) - num ;
cout<<"\n"<<"Numero invertito : ";

if (num < 0)

{
num = num * -1;
cout<<num;
}
else cout<<num;

}
}

cin>>a;
}
}

Last fiddled with by Godzilla on 2016-07-12 at 07:51   2016-07-12, 08:51   #33
retina
Undefined

"The unspeakable one"
Jun 2006
My evil lair

132578 Posts Quote:
 Originally Posted by Godzilla what does it mean .
It means you've got no mathematics here, just numbers that don't give any meaningful results. It has already been shown to fail with counter examples so that should've been the end of the discussion.   Thread Tools Show Printable Version Email this Page Similar Threads Thread Thread Starter Forum Replies Last Post Ale Miscellaneous Math 38 2015-11-29 23:27 only_human Puzzles 9 2015-06-26 10:30 Citrix Lounge 5 2010-04-05 21:34 roemer2201 PrimeNet 2 2008-12-20 16:12 Unregistered Miscellaneous Math 8 2008-11-09 07:45

All times are UTC. The time now is 02:35.

Sun Oct 25 02:35:33 UTC 2020 up 44 days, 23:46, 0 users, load averages: 1.60, 1.62, 1.71