mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Riesel Prime Search (https://www.mersenneforum.org/forumdisplay.php?f=59)
-   -   Question about these fascinating primes (https://www.mersenneforum.org/showthread.php?t=25145)

VBCurtis 2020-04-20 15:57

Sure, it's the same form- but look at where you wrote the equals sign. You wrote that 405 * 2 ^ (10+1) - 1 = 263,167. That's not true.

storm5510 2020-04-20 17:58

[QUOTE=VBCurtis;543253]Sure, it's the same form- but look at where you wrote the equals sign. You wrote that 405 * 2 ^ (10+1) - 1 = 263,167. That's not true.[/QUOTE]

Of course it is not true. That result is for the entire sequence, both sides:

The left side:

405*2^10-1
405*1024-1
414720-1
414719

The right side:

405*2^(10+1)-1
405*2^11-1
405*2048-1
829440-1
829439

414719 [U]AND[/U] 829439 = 263167.

VBCurtis 2020-04-20 18:12

[QUOTE=storm5510;543270]

414719 [U]AND[/U] 829439 = 263167.[/QUOTE]

What does this even mean? What definition of "=" do you have in mind here?

Edit: Or, I guess, what definition of "and"? You capitalized and underlined it, so maybe that is the word in question.

kar_bon 2020-04-20 20:53

Your AND you meant as a logical and-operation of both numbers, but that's not what the definition of a SG is and the example I gave.
Please read this [url='https://en.wikipedia.org/wiki/Sophie_Germain_prime']article[/url] to understand.
Your calculation seems correct so far, but you misinterpreted the 'and' and so used a false algorithm to calculate the result.

storm5510 2020-04-21 14:43

Yes, it is a logical And.

At [B]kar_bon's[/B] suggestion, I ran a sample [I]PFGW[/I] ABC2 which he provided. I received the same results. I took the & in his example to mean a logical and. Thus, the confusion on my part. [I]PFGW[/I] uses && to indicate a logical and. After reading more of the documentation, the & or | indicates multiple expressions on the same line. Each is evaluated separately. I found the below in Wikipedia:

[QUOTE]In number theory, a prime number [I]p[/I] is a [B]Sophie Germain prime[/B] if 2[I]p[/I] + 1 is also prime.[/QUOTE]
It could not be more simple than this.

xilman 2020-04-21 15:19

[QUOTE=storm5510;543360]Yes, it is a logical And.

At [B]kar_bon's[/B] suggestion, I ran a sample [I]PFGW[/I] ABC2 which he provided. I received the same results. I took the & in his example to mean a logical and. Thus, the confusion on my part. [I]PFGW[/I] uses && to indicate a logical and. After reading more of the documentation, the & or | indicates multiple expressions on the same line. Each is evaluated separately. I found the below in Wikipedia:


It could not be more simple than this.[/QUOTE]Now I'm confused.

A logical [B]and[/B] to me states that the two Boolean quantities to each side of the operator must both be simultaneously TRUE for the whole to be TRUE. This is exactly what is stated in the Wikipedia definition.

A bitwise [B]and[/B] when applied to two ordered lists of Boolean quantities of equal size yields another ordered list of Booleans with the same size where each element of the resulting list is TRUE if and only if each corresponding element of the two initial lists are simultaneously TRUE. It is common, though not universal, for a list of Booleans to be represented by the binary representation of an integer. It is also common, though not universal, for a TRUE value to be represented by a 1 and a FALSE value by zero. In hardware circuitry TRUE may be represented either by a high voltage or high current, or a low voltage or low current so careful attention to context is required.

storm5510 2020-04-21 17:04

[QUOTE=xilman;543363]Now I'm confused.

A logical [B]and[/B] to me states that the two Boolean quantities to each side of the operator must both be simultaneously TRUE for the whole to be TRUE. This is exactly what is stated in the Wikipedia definition.

A bitwise [B]and[/B] when applied to two ordered lists of Boolean quantities of equal size yields another ordered list of Booleans with the same size where each element of the resulting list is TRUE if and only if each corresponding element of the two initial lists are simultaneously TRUE. It is common, though not universal, for a list of Booleans to be represented by the binary representation of an integer. It is also common, though not universal, for a TRUE value to be represented by a 1 and a FALSE value by zero. In hardware circuitry TRUE may be represented either by a high voltage or high current, or a low voltage or low current so careful attention to context is required.[/QUOTE]

It can be confusing...

11001001 is decimal 201
10110101 is decimal 181
-------------
10000001 is decimal 129

201 [B]and[/B] 181 is 129. I did this in decimal, after doing the binary above, but the determination is done in binary at the machine level. What would appear to be different, on the surface, is actually not.


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

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