>FromPrimeNumbersown" <miltbrown@...>

I was thinking more in these lines for the barhavioral science problem.

>Reply-To: <miltbrown@...>

>To: "'cino hilliard'" <hillcino368@...>,

><primenumbers@yahoogroups.com>

>CC: <miltbrown@...>

>Subject: RE: [PrimeNumbers] odd being prime in a bar

>Date: Thu, 29 Jan 2004 21:23:39 -0800

>

>There are infinitely many more odd primes than even primes!

>

There are 4 primes < 10 so if

the group picks numbers less than= 10 they will on average pick 4 prime

numbers. So the odds of

picking a prime is 4/10. Then the odds of picking 10 primes is (4/10)^10 =

.000105. The odds of

10 primes for numbers < 100 = (25/100)^10 = 0.00000095367431. For numvers <

1000 odds =

0.000000017909885 etc.

The Pari program verifies this.

\\n = number persons asked, maxpow10 = max pow 10 they will write, trials =

number of

\\times we ask different sets of n persons. So probability is

\\total number of primes found / total writes = primesfound/(trials*n)

oddsprime(n,maxpow10,trials) =

{

default(realprecision,14);

for(p=1,maxpow10,

primesfound=0;

for(j=1,trials,

c=0;

for(x=1,n,

y=random(10^p);

if(isprime(y),primesfound++)

);

);

print(n" 10^"p" "primesfound" "primesfound/trials/n+.0"

"pi(10^p))

);

default(realprecision,28);

}

pi(n) =

{

c=0;

forprime(x=2,n,c++);

return(c)

}

Some output

10 10^1 801197 0.40059850000000 4

10 10^2 500063 0.25003150000000 25

10 10^3 335655 0.16782750000000 168

10 10^4 245158 0.12257900000000 1229

10 10^5 191652 0.095826000000000 9592

10 10^6 157038 0.078519000000000 78498

10 10^7 132894 0.066447000000000 664579

So the odds of getting 10 primes are (pi(max num to write)/(max no to

write))^10

So if we assume the group will pick numbers up to 10^22 then

the odds of hitting 10 primes is (201467286689315906290/10^22)^10 =

1.101654404308712330002053882 E-17

For larger numbers we could use the logrithmic integral Li(x) =

-eint1(log(1/x)) in pari.

In this example Li(10^22) = 201467286691248261498.1505283 the odds =

(Li(10^22)/10^22)^10 = 1.101654404414376513047443655 E-17 this differs from

the pi(x)

calculation by 1.0566418304538977300 E-27.

Now that is an unreasonable assumption for a group of bar folks. My

reasonable guess would be

these folks will stay in the less than= 100 range for a

0.00000095367431640625 prob.

Indeed (Li(10^100)/10^100)^10 = 2.493611096381172592960013489 E-24

It is doubtful we will ever find pi(10^100) so Li(10^100) =

4.361971987140703159099509112 E97

will have to suffice. Maybe an indistructable computer that starts today and

a time machine? We go into the future a few 10^n years, get the answer and

come back with it.

Cino

"Behavior is not for the pursuit of survival but because of it."

>-----Original Message-----

_________________________________________________________________

>From: cino hilliard [mailto:hillcino368@...]

>Sent: Thursday, January 29, 2004 8:57 PM

>To: primenumbers@yahoogroups.com

>Subject: Re: [PrimeNumbers] odd being prime in a bar

>

>Hi,

>This may at first seem as "unsolvable" but what would be a reasonable

>solution.

>

>Ten people in a bar are asked to write down a number. What are the odds

>that

>all ten

>will pick a prime number?

>

>How about Twenty people? Does reasonableness improve as the number of

>people

>increase?

>

>I think this can be solved analytically within reason of course.

>

>Cino

>

There are now three new levels of MSN Hotmail Extra Storage! Learn more.

http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1