mersenneforum.org "New" primality test/check
 Register FAQ Search Today's Posts Mark Forums Read

2017-12-31, 19:25   #122
10metreh

Nov 2008

2·33·43 Posts

Quote:
 Originally Posted by gophne Hi science_man_88 Your math is incorrect; LHS of == sign 2^n-1....let n=5 Then LHS result is 31 RHS of == sign (n+1)/2 mod (n+2).......substitute for n=5 (5+1)/2 mod (5+2) RHS result is =3
"mod" isn't an operator. You can't just apply it to one side of an equation. It isn't the same as the "%" operator in many programming languages, though it is somewhat similar.

When we say that a ≡ b (mod n), what we mean is that n divides a-b exactly (or, equivalently, that a and b leave the same remainder on division by n). So, for example, 1 ≡ 11 (mod 5), because 5 divides 1-11 = -10 exactly.

When n=5, indeed 2^n-1 = 31 and (n+1)/2 = 3.
These are not equal, but 2^n-1 ≡ (n+1)/2 (mod n+2) is still true, because 7 divides 31-3 = 28 exactly, and 31 ≡ 3 (mod 7).

The "%" operator gives the remainder you get when you divide one number by another.
Note that if b = a%n, then a = kn+b for some integer k: that's what we mean by a remainder. Then a-b = kn, so a ≡ b (mod n). This is how "mod" and "%" are related.
For positive integers, a ≡ b (mod n) is equivalent to a%n = b%n. (You need to be careful with negative numbers because programming languages may define a%n to have the same sign as a.)

Last fiddled with by 10metreh on 2017-12-31 at 19:38

2017-12-31, 19:36   #123
CRGreathouse

Aug 2006

5,923 Posts

Quote:
 Originally Posted by gophne Could you please run the two algorithms, the one I posted (on gophne thread #73 I think) and the one that awmayer "reduced" a bit further on in the thread. If you could that present to all your results. If the two algorithms gives the same result/s then I will accept that the two algorithms are indeed the same.
I can’t take on unpaid projects at this time, sorry.

2017-12-31, 19:41   #124
gophne

Feb 2017

A516 Posts

Quote:
 Originally Posted by 10metreh "mod" isn't an operator. You can't just apply it to one side of an equation. It isn't the same as the "%" operator in many programming languages, though it is somewhat similar. When we say that a ≡ b (mod n), what we mean is that n divides a-b exactly (or, equivalently, that a and b leave the same remainder on division by n). So, for example, 1 ≡ 11 (mod 5), because 5 divides 1-11 = -10 exactly. When n=5, indeed 2^n-1 = 31 and (n+1)/2 = 3. These are not equal, but 2^n-1 ≡ (n+1)/2 (mod n+2) is still true, because 7 divides 31-3 = 28 exactly, and 31 ≡ 3 (mod 7). The "%" operator gives the remainder you get when you divide one number by another. Note that if b = a%n, then a = kn+b for some integer k: that's what we mean by a remainder. Then a-b = kn, so a ≡ b (mod n). This is how "mod" and "%" are related. For positive integers, a ≡ b (mod n) is equivalent to a%n = b%n. (You need to be careful with negative numbers because programming languages may define a%n to have the same sign as a.)
Hi 10metreh

No disagreement here: 31 mod 7 ≡ 3

However the logical == determinant means IS IDENTICAL. 31<>3

Consider the following:

x==31 and x==31 mod 7....THEY ARE NOT THE SAME

2017-12-31, 19:45   #125
gophne

Feb 2017

3·5·11 Posts

Quote:
 Originally Posted by CRGreathouse I can’t take on unpaid projects at this time, sorry.
Hi CRGreathouse

You seem to have no problem with gratis comments :)

I know I am dumb, but please help me to understand and stop me from being a nuisance by posting the results for all to see and to analyse the outcomes. Ppl wil have a lot of faith in your results.

2017-12-31, 20:06   #126
CRGreathouse

Aug 2006

5,923 Posts

Quote:
 Originally Posted by gophne You seem to have no problem with gratis comments :) I know I am dumb, but please help me to understand and stop me from being a nuisance by posting the results for all to see and to analyse the outcomes. Ppl wil have a lot of faith in your results.
In fact I may have to cut back the gratis comments to make time for other commitments. But for the moment I can spare a bit of time.

I’ll be happy to carry out the analysis however you like, and write whatever supporting code is needed, as soon as the check clears in my bank account. Until then I recommend further study which will (in addition to enhancing your life) make it easier for you to understand the equivalence. If interested, forum members are usually more than happy to recommend resources.

2017-12-31, 20:35   #127
gophne

Feb 2017

3·5·11 Posts

Quote:
 Originally Posted by CRGreathouse In fact I may have to cut back the gratis comments to make time for other commitments. But for the moment I can spare a bit of time. I’ll be happy to carry out the analysis however you like, and write whatever supporting code is needed, as soon as the check clears in my bank account. Until then I recommend further study which will (in addition to enhancing your life) make it easier for you to understand the equivalence. If interested, forum members are usually more than happy to recommend resources.
Hi CRGreathouse

I respect that you have other tasks on the Site, it is just that I had thought that if you had done the analysis, that would have been much more authoritative.

2017-12-31, 20:41   #128
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts

Quote:
 Originally Posted by gophne Hi CRGreathouse I respect that you have other tasks on the Site, it is just that I had thought that if you had done the analysis, that would have been much more authoritative. When I dream the first 100 million digit mersenne prime, I will hire your services :) Thanx for interactions and advice.
Look up proof by authority...

Last fiddled with by science_man_88 on 2017-12-31 at 20:47

2017-12-31, 22:25   #129
VBCurtis

"Curtis"
Feb 2005
Riverside, CA

103328 Posts

Quote:
 Originally Posted by chalsall That doesn't surprise me at all.

 2017-12-31, 22:39 #130 George M   Dec 2017 2·52 Posts X!=Y means X does not equal Y.... right? I read the title on a mathematical symbols keyboard. Wait, I am not replying to the right post, am I? If so, then just ignore this. Last fiddled with by George M on 2017-12-31 at 22:40 Reason: I wasn’t replying to the right post.
 2017-12-31, 23:00 #131 gophne   Feb 2017 3×5×11 Posts Hi George M != does mean "not equal to" in some computer code.
 2018-01-01, 06:54 #132 gophne   Feb 2017 3×5×11 Posts RETRACTION Hi Everybody I acknowledge that "my" algorithm is a "clone" of Fermat, after the answer to runs of the two algorithms by 10metreh, post #22, in the OMG, I cannot spam anymore in the forum Feedback where my question was answered!!!!!!!!!!111111 The results posted prove conclusively that "my" algorithm is a clone/copy of Fermat's. I apologise for not being to graps this earlier. Egg all over my face and many frustrated contributers. All I can do now is to provide the background work that I had used to derive "my" algorithm, if anybody might be interested. I did not use Fermat. Oh my gosh!!!

 Similar Threads Thread Thread Starter Forum Replies Last Post preda GpuOwl 2471 2020-09-21 23:29 Chair Zhuang Miscellaneous Math 21 2018-03-26 22:33 wildrabbitt Miscellaneous Math 11 2015-03-06 08:17 ewmayer Math 11 2007-04-23 19:07 James Heinrich Software 2 2005-03-19 21:58

All times are UTC. The time now is 03:39.

Wed Sep 23 03:39:20 UTC 2020 up 13 days, 50 mins, 0 users, load averages: 1.18, 1.32, 1.44