mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2006-03-27, 00:29   #34
Citrix
 
Citrix's Avatar
 
Jun 2003

3·5·107 Posts
Default

Quote:
Originally Posted by 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).
Why is there a zero in base? Can anyone explain?

All numbers that are multiples of 2 can also be excluded.
Citrix is online now   Reply With Quote
Old 2006-03-27, 00:46   #35
Citrix
 
Citrix's Avatar
 
Jun 2003

3·5·107 Posts
Default

Quote:
Originally Posted by Citrix
Why is there a zero in base? Can anyone explain?

ignore this please.
Citrix is online now   Reply With Quote
Old 2006-03-27, 00:50   #36
John Renze
 
John Renze's Avatar
 
Nov 2005

24·3 Posts
Default

Quote:
Originally Posted by jinydu
in any case, Mathematica is unable to handle bases larger than 36.
Mathematica can do this. Use IntegerDigits rather than BaseForm.
John Renze is offline   Reply With Quote
Old 2006-03-27, 00:56   #37
grandpascorpion
 
grandpascorpion's Avatar
 
Jan 2005
Transdniestr

503 Posts
Default

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.

Last fiddled with by grandpascorpion on 2006-03-27 at 01:00
grandpascorpion is offline   Reply With Quote
Old 2006-03-27, 01:10   #38
Citrix
 
Citrix's Avatar
 
Jun 2003

3×5×107 Posts
Default

Quote:
Originally Posted by 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.
Citrix is online now   Reply With Quote
Old 2006-03-27, 01:44   #39
grandpascorpion
 
grandpascorpion's Avatar
 
Jan 2005
Transdniestr

503 Posts
Default

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

Last fiddled with by grandpascorpion on 2006-03-27 at 01:47
grandpascorpion is offline   Reply With Quote
Old 2006-03-27, 03:30   #40
Citrix
 
Citrix's Avatar
 
Jun 2003

3·5·107 Posts
Default

Yes you are right
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?
Citrix is online now   Reply With Quote
Old 2006-03-27, 04:03   #41
grandpascorpion
 
grandpascorpion's Avatar
 
Jan 2005
Transdniestr

503 Posts
Default

Chances are that it's three.

Last fiddled with by grandpascorpion on 2006-03-27 at 04:04
grandpascorpion is offline   Reply With Quote
Old 2006-03-27, 06:08   #42
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

101010100010002 Posts
Default

Quote:
Originally Posted by 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.
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
Uncwilly is offline   Reply With Quote
Old 2006-03-28, 01:13   #43
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

2×33×83 Posts
Default

Your code is okay, except the loop for "base" should be up to 2^30402457-1 and not 30402457 . 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

and you could have coded
Quote:
50 Digits = ( N_l / Base )
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.
paulunderwood is offline   Reply With Quote
Old 2006-03-28, 01:42   #44
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

448210 Posts
Default

And shouldn't
Quote:
30 L_g = log( Prime ) / log( Base )
be
Quote:
30 L_g = log( 2 ) / log( Base )
?
paulunderwood is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
(M48) NEW MERSENNE PRIME! LARGEST PRIME NUMBER DISCOVERED! dabaichi News 571 2020-10-26 11:02
Yes, Virginia, there _is_ a largest prime number! R.D. Silverman Data 82 2013-08-14 15:58
New largest prime number found Prime95 Miscellaneous Math 20 2008-07-29 16:58
get the 15th largest prime number in 3 months wfgarnett3 PSearch 1 2004-06-28 20:51
New largest prime number??? McBryce Lounge 39 2003-08-12 19:35

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


Sat Jan 28 00:39:58 UTC 2023 up 162 days, 22:08, 0 users, load averages: 1.10, 1.33, 1.25

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔