-   Math (
-   -   Number of zero's in largest prime... (

Citrix 2006-03-27 00:29

[QUOTE=jinydu]For the first few Mersenne primes:

[CODE]Exponent Total number of zeroes
2 1
3 1
5 2

From there, it gets too tedious to manually ask Mathematica to write out the expansion for each individual base (in any case, Mathematica is unable to handle bases larger than 36).[/QUOTE]

Why is there a zero in base? Can anyone explain?

All numbers that are multiples of 2 can also be excluded.

Citrix 2006-03-27 00:46

[QUOTE=Citrix]Why is there a zero in base? Can anyone explain?


ignore this please. :ernst: :sad:

John Renze 2006-03-27 00:50

[QUOTE=jinydu]in any case, Mathematica is unable to handle bases larger than 36.[/QUOTE]

Mathematica can do this. Use IntegerDigits rather than BaseForm.

grandpascorpion 2006-03-27 00:56

That's not true, Citrix. Mersenne primes can have zeroes in even bases.

Why use Mathematica anyways? All you need is div and mod to get base values.

Citrix 2006-03-27 01:10

[QUOTE=grandpascorpion]That's not true, Citrix. Mersenne primes can have zeroes in even bases.

Can you give an example?

Aside from this, I leave it as a puzzle to find the largest base for all Mp that produces a zero. I have the answer to this one.

grandpascorpion 2006-03-27 01:44

Not handy. It will be a good exercise for you. Why do you make these silly sweeping statements without a little investigation?

Citrix 2006-03-27 03:30

Yes you are right:blush:
Consider numbers in base 10, which is even. I should think more before posting.

Another puzzle (I do not have the answer), which base has the largest number of zero's for M43?

grandpascorpion 2006-03-27 04:03

Chances are that it's three.

Uncwilly 2006-03-27 06:08

[QUOTE=patrik (with editing)]Then the number of digits in base i is about p log 2 / log i.

the distribution of digits for base 10 it looks like the digits are equally likely to occur.

Or we could start the summing at 3 since we know our assumption is wrong for base i=2. [/QUOTE]
What I did in this regards:

Assume that all bases will have a roughly even distribution of digits (by this I mean representational characters, e.g. for hexadecimal the 'digits' would be 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F). (Now this won't be true at the higher bases, as many will have a leading 1)
Calculate the length (l) of the exponent in base n. Divide l by n (to get an approximation of the number of zeros in the particular base), sum this number for all bases (starting at 3) to M43.

The result was: 1,529,591,493

A bit brute force and not exact.

[code] 10 Prime = 30402457 : Zeros=0
20 for Base = 3 to Prime
30 L_g = log( Prime ) / log( Base )
40 N_l = L_g * Prime
50 Digits = ( N_l / Base )
60 Zeros = Zeros + Digits
70 next Base
80 print Zeros[/code]

paulunderwood 2006-03-28 01:13

Your code is okay, except the loop for "base" should be up to 2^30402457-1 and not 30402457 :shock: . The loop should bail out when digits count became two and instead just add 1 to the count of zeroes -- the number 10_{base M43} because it is prime -- to save time on the loop :wink:

and you could have coded [QUOTE]50 Digits = ( N_l / Base )[/QUOTE] with "-1".

A mathematical approach is needed such as given by "patrik" above to get a realististic figure -- I haven't checked "patrik"'s claim but at least your brute force method's expected number of zeroes is less than "patrik"'s mathematically computed expected number of them. :smile:

paulunderwood 2006-03-28 01:42

And shouldn't [QUOTE]30 L_g = log( Prime ) / log( Base )[/QUOTE] be [QUOTE]30 L_g = log( 2 ) / log( Base )[/QUOTE] ? :unsure:

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

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