#mersenne primes demo please!!
116 messages · Page 1 of 1 (latest)
What do you need to be explained?
Mersenne primes are prime numbers with the form
$M = 2^n - 1$
Jadεn
For an integer n
It's proven that for a composite number n, 2^n - 1 isn't prime
And not for all prime n, 2^n - 1 is prime
There is a sequence of primes that give off Mersenne primes
There is a method to check if M_p is prime(M_p = 2^p - 1)
$\forall p > 2, M_p = 2^p - 1 \text{ is prime iff } M_p | S_{p-2}, \text{ where } S_0 = 4 \text{ and } S_k = (S_{k-1})^2 - 2 \text{ for } k > 0$
Jadεn
This is the most efficient method known so far
You can implement it into a python code
and it can do it pretty fast
In mathematics, a Mersenne prime is a prime number that is one less than a power of two. That is, it is a prime number of the form Mn = 2n − 1 for some integer n. They are named after Marin Mersenne, a French Minim friar, who studied them in the early 17th century. If n is a composite number then so is 2n − 1. Therefore, an equivalent defini...
didn't know this before nice!
It is in the wikipedia article
The "Searching for mersenne primes" section
o0 ill give it a read
Here is it
This file can do it, but it needs optimization
I can work on it more and then send it
There, the most I can optimize it
A python script that can check if the number 2^p - 1(the user gives p) is a marsenne prime
The "is_prime" function has a lot of recursion, I need to fix that
@jolly nymph Do you want the python script? Bc if not, I don't have to work on it and send it
and if you @kind cipher are interested, I can send it to you 🙃
I found out that S_k grows exponentially
S(11) is too big for my computer to ahndle
so writing this code isn't going to work for me
lol
I can read french
I'm from Morocco 🤓
You are too
I think I know that school
IQrae
I forgot if that upwards arrow means the greatest common divisor or not
I had taken that lesson at the start of this year
Thanks i annoyed my dad whos learning French with this
Or is it the logical and
lmao
@jolly nymph what does that upwards arrow mean?
coprime i think
No
I took this lesson the same year
this year
It's the GCD or smth
We had them in French
the PGCD and something else
yup it is
huh
Yeah
That's what I remember too
Just give a sec
But they didn't give a symbol of the PPCM
So I assume they're wrong
"v" this is the PPCM and "^" is the PGCD
yes they're
Okay, so let's look at the first exercise
We need to use the formula for the PGCD
Take all the common divisors of the two and multiply them with the smallest exponents of the two numbers
But here m and n are arbitrary
d|d' and d'|d <=> d=d'
let M(n)^M(m)= d and M(m^n)=d'
Jadεn
How can we simplify this?
congru in english what is it?
Congruent
d' = M(m^n) , let m^n = L so 2 ^L = 1 [d'] (m^n = L<=> n=kL and m=k'L ) 2 ^Lk = 1[d'] and 2^Lk' = 1 [d'] => d' | 2^n -1 and d'|2^m -1
so d'|M(n)^M(m)
hrira
d|d'
This is going to take a long time
And where do you need mersenne primes?
I mean M(n) is the form of a mersenne prime
but is there a question
about it?
no
Oh
it's easy with this : l=m^n => nu+mv=L
Yes
But mersenne primes aren't easy to work with
and they grow very fast
But you can go read the wikipedia article
it may help you
bye for now
see u later
$M = 2^n - 1$
rockhoven