Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Euler's Constant and the Harmonic Series.

4 views
Skip to first unread message

Patrick D. Rockwell

unread,
May 30, 2008, 5:39:02 PM5/30/08
to
Can someone give me an example of a probability formula that
uses Euler's Constant (Gamma) = .57721566490153286? The only
one that I know is


P((2^p)-1 is prime)=(e^gamma*log(a*p))/(p*log(2)) where

a=2 if p=3 mod 4, a=6 if p=1 mod 4, gamma=.57721566490153286

I found the above here.

http://primes.utm.edu/notes/faq/NextMersenne.html

Now I assume that in the above formula, p is a prime,
and that "p=1 mod 4" means "p mod 4=1" but what I can't
figure out is what a equals if p=2 because p Mod 4 =2
(not 1 or 3).


Euler's constant is not to be confused with Euler's
number=2.7182818284590452353602874713527

Euler's constant(gamma) can be calculated by

the limit as n goes to infinity of H(n)-ln(n). H(n) is the
Nth partial sum of the harmonic series

1 + (1/2) + (1/3) + ... (1/n)

Also, can someone please give me an example of a probability
formula which uses the harmonic series?

Thanks in advance.

Rainer Rosenthal

unread,
May 30, 2008, 6:15:18 PM5/30/08
to
Patrick D. Rockwell wrote:

> Now I assume ... that "p=1 mod 4" means "p mod 4=1"

You assume correctly.
In older texts you find the first expression as follows:

<ASCII-art ON - use fixed size font please>

/|
__ -- / | / \
|__) -- | | mod 4 |
| -- | \ /
|

<ASCII-art OFF - thank you>

This should be spelled: "p is congruent to 1, modulo 4".
A simplified version is often used

p = 1 (mod 4) (Version 1)

or even simpler:

p = 1 mod 4

since that congruent-sign is not as commonly available
as the equal-sign. The idea is: both p and 4 are the same
when viewed ohnly with repect to their remainder under
division by 4, i.e. they are "equivalent modulo 4".

When you write "p mod 4=1" you think of it as r = 1, where
r = p mod 4 will represent one of the numbers 0, 1, 2, 3.
This kind of writing things is quite common today, induced by
the use of computer languages, which most often provide an
operation "mod", yielding the remainder. I think you understand
"p mod K" as the remainder in the range 0 .. K-1. This is not
always the case with the implemented mod-operation, which for
p = -7 might return -3 instead of 1.

You seem to be fond of this mod-operation. If we compare the
two ideas, then we see them best described by the two lines
marked "Version 1" and "Version 2":

(p mod 4) = 1 (Version 2)


Cheers,
Rainer

Frederick Williams

unread,
May 31, 2008, 3:43:58 AM5/31/08
to
Rainer Rosenthal wrote:
>
> Patrick D. Rockwell wrote:
>
> > Now I assume ... that "p=1 mod 4" means "p mod 4=1"
>
> You assume correctly.

I beg to differ, here is a quote from
http://en.wikipedia.org/wiki/Modulo:

o (This usage is from Gauss's book.) Given the integers a, b and n, the
expression a = b (mod n) (pronounced "a is congruent to b modulo n")
means that a - b is a multiple of n. For more details, see modular
arithmetic.

o In computing, given two numbers (either integer or real), a and n, a
modulo n is the remainder after numerical division of a by n, under
certain constraints. See modulo operation.

--
Remove "antispam" and ".invalid" for e-mail address.

Rainer Rosenthal

unread,
May 31, 2008, 5:14:42 AM5/31/08
to
Frederick Williams schrieb:

Nicely put, but where is the difference?

Example:
Let p = 17.
Then it's true that "p=1 mod 4" or "p = 1 (mod 4)" since p - 1 is
a multiple of 4. Checking: p - 1 = 17 - 1 = 16 = 4*4.
And likewise is it true that "p mod 4=1" or "(p modulo 4)=1" because
the remainder of 17 is 1 after numerical division by 4.

So again: where exactly do you differ?

Cheers,
Rainer

Frederick Williams

unread,
May 31, 2008, 7:03:34 AM5/31/08
to

It seems to me (*) that

x = y mod z . . . . . . . (1)

is a ternary relation. While the left hand side of

x mod z = y . . . . . . . (2)

is a binary function. Note that one cannot "separate out" the right
hand side of (1) and evaluate y mod z with a view to seeing if it
equals x, but in the case of (2) one does evaluate the function x mod
z with a view to seeing if it equals y. I'm willing to bet that the
OP has come across "mod" in a computer programming language.

I confess the wikipedia quote did not precisely convey the reason for my
feeling of unease.

Consider this:

14 = 10 mod 4 . . . . . . (3)

is true. But

14 mod 4 = 10 . . . . . . (4)

is

2 = 10 . . . . . . (5)

which is false. If I could write (3) with a $\equiv$ then the
difference would be clear: (4, 5) are written with a "real" =.

In computing one can write (say)

cos(x mod z)

(I suppose really it would be cos(mod(x, z)), but never mind). What is
the mathematical equivalent?

Chip Eastham

unread,
May 31, 2008, 7:52:25 AM5/31/08
to
On May 31, 7:03 am, Frederick Williams <"Frederick

Although you're right that the "mod" operation in
computer implementations doesn't fully capture the
ternary semantics of Gauss's "mod" congruence
relation, in the special case having only the one
variable and two integer constants:

p = 1 mod 4 <==> (p mod 4) = 1

congruence vs. equality

seems pretty close to assured, "modulo" the possibility
of computer errors.


regards, chip

Rainer Rosenthal

unread,
May 31, 2008, 9:46:24 AM5/31/08
to
Frederick Williams wrote:
> Rainer Rosenthal:
>> This is OK: "p = 1 mod 4" means "p mod 4 = 1"

>> where exactly do you differ?
>
> It seems to me (*) that
>
> x = y mod z . . . . . . . (1)
>
> is a ternary relation. While the left hand side of
>
> x mod z = y . . . . . . . (2)
>
> is a binary function. Note that one cannot "separate out" the right
> hand side of (1) and evaluate y mod z with a view to seeing if it
> equals x, but in the case of (2) one does evaluate the function x mod
> z with a view to seeing if it equals y. I'm willing to bet that the
> OP has come across "mod" in a computer programming language.

Please keep in mind what I wrote to the OP:


I think you understand "p mod K" as the remainder in the range 0 .. K-1.

So there are restrictions on y in (2): 0 <= y < z for positive module z.
In the OP's question this restriction is valid. So I agreed on his proposition.

If he had said "p = 10 mod 4" means "p mod 4 = 10", I would have disagreed.

>
> I confess the wikipedia quote did not precisely convey the reason for my
> feeling of unease.
>
> Consider this:
>
> 14 = 10 mod 4 . . . . . . (3)
>
> is true. But
>
> 14 mod 4 = 10 . . . . . . (4)
>
> is
>
> 2 = 10 . . . . . . (5)
>
> which is false.

This is like saying "14 = 10 mod 4" and NOT "14 mod 4 = 10". You are right,
but this is something different from what the OP asked.

You feel obliged to generalize

"p = 1 mod 4" means "p mod 4 = 1" (i)

to

"p = q mod 4" means "p mod 4 = q" (ii)

and then from (ii) being false you disagree on (i). I understand that, but
I don't follow you. Version (i) is perfect.


> If I could write (3) with a $\equiv$ then the
> difference would be clear: (4, 5) are written with a "real" =.
>

I made it clear (see my lovely ASCII-art) in my first answer to the OP that
(3) is a simplified version for congruence (or equivalence).

> In computing one can write (say)
>
> cos(x mod z)
>
> (I suppose really it would be cos(mod(x, z)), but never mind). What is
> the mathematical equivalent?
>

Huh?

Cheers,
Rainer Rosenthal
r.ros...@web.de

Chip Eastham

unread,
May 31, 2008, 10:08:49 AM5/31/08
to
On May 30, 5:39 pm, "Patrick D. Rockwell" <prockw...@thegrid.net>
wrote:

> Can someone give me an example of a probability formula that
> uses Euler's Constant (Gamma) = .57721566490153286? The only
> one that I know is
>
> P((2^p)-1 is prime)=(e^gamma*log(a*p))/(p*log(2)) where
>
> a=2 if p=3 mod 4, a=6 if p=1 mod 4, gamma=.57721566490153286
>
> I found the above here.
>
> http://primes.utm.edu/notes/faq/NextMersenne.html
>
> Now I assume that in the above formula, p is a prime,
> and that "p=1 mod 4" means "p mod 4=1" but what I can't
> figure out is what a equals if p=2 because p Mod 4 =2
> (not 1 or 3).

Your thinking is a bit too literal here. The formula
is not an exact equality for particular primes p. In
any particular case, 2^p - 1 either is or is not prime,
so the talk of "probabilities" involves standing back
and taking a wider view.

The formula is saying that for large primes, which are
all odd, the likelihood that the corresponding Mersenne
number will be prime, 2^p - 1, is approximately:

(e^gamma*log(a*p))/(p*log(2))

where a depends on the residue of p mod 4. When p is
odd, the residue must be either 1 or 3.

So think about putting all the primes p between 10^10
and 10^10 + 10^6 into two baskets, one for primes
congruent to 1 mod 4 and one for primes congruent to 3
mod 4. The two baskets will have approximately the
same number of primes in them, but that is not the
issue as far as the formula you cited. The issue is
an estimate of the fraction of the corresponding
Mersenne numbers 2^p - 1 which are prime for each
basket separately. That's the reason a = 6 for primes
in the congruent to 1 mod 4 basket, while a = 2 for
primes in the other basket.

We don't have or need a basket for primes congruent to
2 mod 4. There only one! No prize for guessing whether
the corresponding Mersenne number will turn out prime.

regards, chip

Frederick Williams

unread,
May 31, 2008, 10:09:12 AM5/31/08
to

Perhaps I shouldn't have generalized.

> "p = 1 mod 4" means "p mod 4 = 1" (i)
>
> to
>
> "p = q mod 4" means "p mod 4 = q" (ii)
>
> and then from (ii) being false you disagree on (i). I understand that, but
> I don't follow you. Version (i) is perfect.
>
> > If I could write (3) with a $\equiv$ then the
> > difference would be clear: (4, 5) are written with a "real" =.
> >
>
> I made it clear (see my lovely ASCII-art) in my first answer to the OP that
> (3) is a simplified version for congruence (or equivalence).
>
> > In computing one can write (say)
> >
> > cos(x mod z)
> >
> > (I suppose really it would be cos(mod(x, z)), but never mind). What is
> > the mathematical equivalent?
> >
>
> Huh?

I'm not sure now what I meant, but I don't suppose it matters.

Rainer Rosenthal

unread,
May 31, 2008, 10:14:53 AM5/31/08
to
Frederick Williams schrieb:

> Perhaps I shouldn't have generalized.

:-)

Cheers,
Rainer

Virgil

unread,
May 31, 2008, 2:09:04 PM5/31/08
to
In article <6acj7kF...@mid.individual.net>,
Rainer Rosenthal <r.ros...@web.de> wrote:

> Frederick Williams schrieb:
> > Rainer Rosenthal wrote:
> >> Patrick D. Rockwell wrote:
> >>
> >>> Now I assume ... that "p=1 mod 4" means "p mod 4=1"
> >> You assume correctly.
> >
> > I beg to differ, here is a quote from
> > http://en.wikipedia.org/wiki/Modulo:
> >
> > o (This usage is from Gauss's book.) Given the integers a, b and n, the
> > expression a = b (mod n) (pronounced "a is congruent to b modulo n")
> > means that a - b is a multiple of n. For more details, see modular
> > arithmetic.
> >
> > o In computing, given two numbers (either integer or real), a and n, a
> > modulo n is the remainder after numerical division of a by n, under
> > certain constraints. See modulo operation.
> >
>
> Nicely put, but where is the difference?


The first represents a statement, the second a number.

Rainer Rosenthal

unread,
May 31, 2008, 7:55:18 PM5/31/08
to
Virgil schrieb:

I beg to differ. The second is a statement as well. Read "p mod 4 = 1"
as "r = 1, where r = 0, 1, 2 or 3 depending on the outcome of the division
by 4". Why on earth should "x=y" be interpreted as a number instead of
a statement? This is absurd - or can you please explain?

Cheers,
Rainer Rosenthal
r.ros...@web.de


Rainer Rosenthal

unread,
Jun 1, 2008, 3:36:14 AM6/1/08
to
Rainer Rosenthal wrote:

(commenting on)
#
# "p=1 mod 4" means "p mod 4=1" (*)
#

> Why on earth ... This is absurd ...

As usual, these words indicate lack of math, sorry.
Define function MOD(z,n) for integer numbers z and
natural numbers n > 1 as follows: r = MOD(z,n) is
the unique number 0 <= r < n such that z - r
is divisible by n.

"p = 1 mod 4" means "MOD(p,4) = MOD(1,4)"
"p mod 4 = 1" means "MOD(p,4) = 1"

Since MOD(1,4) = 1, proposition (*) is true.

Considering Frederick's example, with 10 instead of 1,
we see:
"14 = 10 mod 4" means "MOD(14,4) = MOD(10,4)", which is true.
"14 mod 4 = 10" means "MOD(14,4) = 10", which is false.

Cheers,
Rainer Rosenthal
r.ros...@web.de

Norbert Marrek

unread,
Jun 1, 2008, 7:14:23 AM6/1/08
to
Rainer Rosenthal schrieb:

> Virgil schrieb:
>> In article <6acj7kF...@mid.individual.net>,
>> Rainer Rosenthal <r.ros...@web.de> wrote:
>>
>>> Frederick Williams schrieb:
>>>> Rainer Rosenthal wrote:
>>>>> Patrick D. Rockwell wrote:
>>>>>
>>>>>> Now I assume ... that "p=1 mod 4" means "p mod 4=1"
>>>>> You assume correctly.
>>>> I beg to differ, here is a quote from
>>>> http://en.wikipedia.org/wiki/Modulo:
>>>>
>>>> o (This usage is from Gauss's book.) Given the integers a, b and n, the
>>>> expression a = b (mod n) (pronounced "a is congruent to b modulo n")
>>>> means that a - b is a multiple of n. For more details, see modular
>>>> arithmetic.
>>>>
>>>> o In computing, given two numbers (either integer or real), a and n, a
>>>> modulo n is the remainder after numerical division of a by n, under
>>>> certain constraints. See modulo operation.
>>>>
>>> Nicely put, but where is the difference?
>>
>> The first represents a statement, the second a number.
>
> I beg to differ. The second is a statement as well. Read "p mod 4 = 1"
> as "r = 1, where r = 0, 1, 2 or 3 depending on the outcome of the division

So as you say: p mod 4 is a number.
Again:
a = b (mod n) is a statement, whereas
a mod n is a number.

Got it?


> by 4". Why on earth should "x=y" be interpreted as a number instead of
> a statement? This is absurd - or can you please explain?

x=y is not interpreted as a number, but a mod n is.

>
> Cheers,
> Rainer Rosenthal
> r.ros...@web.de
>
>

Aloha,
Norbert

Rainer Rosenthal

unread,
Jun 1, 2008, 7:54:36 AM6/1/08
to
Norbert Marrek wrote:

(regarding)


>>>>>>> "p=1 mod 4" means "p mod 4=1"
>

> So as you say: p mod 4 is a number.
> Again:
> a = b (mod n) is a statement, whereas
> a mod n is a number.
>
> Got it?
>

Did I ever say the opposite?
Both "..." are statements. Trying to overhear
the unfriendly "got it?" I refer you to my
clarification today.

Got that?
Aloha,
Rainer

Norbert Marrek

unread,
Jun 1, 2008, 9:04:30 AM6/1/08
to
Rainer Rosenthal schrieb:

> Norbert Marrek wrote:
>
> (regarding)
>>>>>>>> "p=1 mod 4" means "p mod 4=1"
>> So as you say: p mod 4 is a number.
>> Again:
>> a = b (mod n) is a statement, whereas
>> a mod n is a number.
>>
>> Got it?
>>
>
> Did I ever say the opposite?
I think so. How should I interprete your answer in
article <6ae6qnF...@mid.individual.net>

Rainer Rosenthal schrieb:
> Virgil schrieb:
>> In article <6acj7kF...@mid.individual.net>,
>> Rainer Rosenthal <r.ros...@web.de> wrote:
>>
>>> Frederick Williams schrieb:
>>>> Rainer Rosenthal wrote:
>>>>> Patrick D. Rockwell wrote:
>>>>>
>>>>>> Now I assume ... that "p=1 mod 4" means "p mod 4=1"
>>>>> You assume correctly.
>>>> I beg to differ, here is a quote from
>>>> http://en.wikipedia.org/wiki/Modulo:
>>>>
>>>> o (This usage is from Gauss's book.) Given the integers a, b and
n, the
>>>> expression a = b (mod n) (pronounced "a is congruent to b modulo n")
>>>> means that a - b is a multiple of n. For more details, see modular
>>>> arithmetic.
>>>>
>>>> o In computing, given two numbers (either integer or real), a and n, a
>>>> modulo n is the remainder after numerical division of a by n, under
>>>> certain constraints. See modulo operation.
>>>>
>>> Nicely put, but where is the difference?
>>
>> The first represents a statement, the second a number.
>
> I beg to differ. The second is a statement as well.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ?

I understood the response of Frederick Williams, that
"The first" refers to the statement "a = b (mod n)", but
"the second" refers to the number "a modulo n".

> Both "..." are statements. Trying to overhear
> the unfriendly "got it?"

Sorry, it wasn't meant unfriendly. I did not know, that
the phrase is unfriendly.

I refer you to my
> clarification today.
>
> Got that?

"Trying to overhear the unfriendly 'got it?'" did not work, I guess ;-)
> Aloha,
> Rainer

Aloha,
Norbert

Rainer Rosenthal

unread,
Jun 1, 2008, 10:50:18 AM6/1/08
to
Norbert Marrek wrote:

> Rainer Rosenthal wrote:
>
>> I refer you to my
>> clarification today.
>>
>> Got that?
> "Trying to overhear the unfriendly 'got it?'" did not work, I guess ;-)

What a pity that you love to trodd along the flame path
instead of addressing the mathematically relevant clarificaton.

Gute Besserung,
Rainer

Norbert Marrek

unread,
Jun 1, 2008, 12:02:41 PM6/1/08
to
Rainer Rosenthal schrieb:

Hmm. Seems that you misinterprete everything I write as a
personal insult.

So dear Rainer: May I kindly ask that you - please - answer this question :

Am I right, that you do not see a difference between
"a = b mod n" and "a mod n", as both are - according to
your previous posts - statements and not that the first
represents a statement and the second represents a number?

> Gute Besserung,
> Rainer

Aloha,
Norbert

Rainer Rosenthal

unread,
Jun 1, 2008, 1:05:15 PM6/1/08
to
Norbert Marrek wrote:

> So dear Rainer: May I kindly ask that you - please - answer this question :
>
> Am I right, that you do not see a difference between
> "a = b mod n" and "a mod n", as both are - according to
> your previous posts - statements and not that the first
> represents a statement and the second represents a number?

???
I said that "p mod 4 = 1" is a statement. I really don't
know how you come to think otherwise. I tried to bring
the OP's question into a clear form and succeeded, as
far as I can see. Let me repeat it:
===========================================================


Define function MOD(z,n) for integer numbers z and
natural numbers n > 1 as follows: r = MOD(z,n) is
the unique number 0 <= r < n such that z - r
is divisible by n.

"p = 1 mod 4" means "MOD(p,4) = MOD(1,4)"
"p mod 4 = 1" means "MOD(p,4) = 1"

Since MOD(1,4) = 1, proposition (*) is true.

Considering Frederick's example, with 10 instead of 1,
we see:
"14 = 10 mod 4" means "MOD(14,4) = MOD(10,4)", which is true.
"14 mod 4 = 10" means "MOD(14,4) = 10", which is false.

===========================================================

Any misunderstanding is due to the informal bla-bla like
Virgils "The first represents a statement, the second a number."

You may ask as kindly as you like - real kindness looks different.

Cheers,
Rainer

Norbert Marrek

unread,
Jun 1, 2008, 4:46:47 PM6/1/08
to
Rainer Rosenthal schrieb:

> Norbert Marrek wrote:
>
>> So dear Rainer: May I kindly ask that you - please - answer this question :
>>
>> Am I right, that you do not see a difference between
>> "a = b mod n" and "a mod n", as both are - according to
>> your previous posts - statements and not that the first
>> represents a statement and the second represents a number?
>
> ???
"a = b mod n" is a statement (being true or false),

"a mod n" is a number.
I don't know how to write it in a
different fashion to answer your "???".

> I said that "p mod 4 = 1" is a statement. I really don't
> know how you come to think otherwise. I tried to bring
> the OP's question into a clear form and succeeded, as
> far as I can see. Let me repeat it:

OK. Somehow I must have missed the following.


> ===========================================================
> Define function MOD(z,n) for integer numbers z and
> natural numbers n > 1 as follows: r = MOD(z,n) is
> the unique number 0 <= r < n such that z - r
> is divisible by n.
>
> "p = 1 mod 4" means "MOD(p,4) = MOD(1,4)"
> "p mod 4 = 1" means "MOD(p,4) = 1"
>
> Since MOD(1,4) = 1, proposition (*) is true.
>
> Considering Frederick's example, with 10 instead of 1,
> we see:
> "14 = 10 mod 4" means "MOD(14,4) = MOD(10,4)", which is true.
> "14 mod 4 = 10" means "MOD(14,4) = 10", which is false.
> ===========================================================
>
> Any misunderstanding is due to the informal bla-bla like
> Virgils "The first represents a statement, the second a number."
>
> You may ask as kindly as you like - real kindness looks different.
>

??? Kindness is in the eye of the beholder. What would be your
rules of kindly questioning?

> Cheers,
> Rainer

Aloha,
Norbert

Rainer Rosenthal

unread,
Jun 1, 2008, 5:05:24 PM6/1/08
to
Norbert Marrek wrote:

> ??? Kindness is in the eye of the beholder. What would be your
> rules of kindly questioning?

No rules - this is a matter of heart and feeling :-)

Cheers,
Rainer

0 new messages