So nguyen to Mersenne la mot so nguyen to co gia tri bang 2n − 1. Vi du 31 la so nguyen to Mersenne vi 31 = 25 − 1 (31 va 5 đeu la so nguyen to). So nguyen to Mersenne đat theo ten Nha toan hoc Marin Mersenne.
Đieu kien can đe so Mn nguyen to la n la so nguyen to, 24 -1 = 15 la hop so vi 4 khong la nguyen to, nhung suy đoan nguoc lai khong đung: vi du so Mersenne 2047 = 211 − 1 khong la nguyen to vi no chia het cho 89 va 23, mac du so 11 la so nguyen to.
Hien nay, cac so nguyen to lon nhat đuoc tim thay thuong la so nguyen to Mersenne.
Cac so nguyen to Mersenne co quan he chat che voi cac so hoan thien, nghia la cac so bang tong cac uoc chan chinh cua no. Trong lich su, viec nghien cuu cac so nguyen to Mersenne đa tung bi thay đoi do cac lien quan nay; vao the ky IV TCN, Euclid phat bieu rang neu M la so nguyen to Mersenne thi M(M+1)/2 la so hoan thien. Vao the ky XVIII, Leonhard Euler chung minh rang tat ca cac so hoan thien chan đeu co dang nay. Khong mot so hoan thien le nao đuoc biet, va nguoi ta nghi ngo rang chung khong ton tai.


Tim cac so nguyen to Mersenne Đang thuc sau

  
    
      
        
          2
          
            a
            b
          
        
        −
        1
        =
        (
        
          2
          
            a
          
        
        −
        1
        )
        ⋅
        
          (
          
            1
            +
            
              2
              
                a
              
            
            +
            
              2
              
                2
                a
              
            
            +
            
              2
              
                3
                a
              
            
            +
            ⋯
            +
            
              2
              
                (
                b
                −
                1
                )
                a
              
            
          
          )
        
      
    
    {\displaystyle 2^{ab}-1=(2^{a}-1)\cdot \left(1+2^{a}+2^{2a}+2^{3a}+\dots +2^{(b-1)a}\right)}
  

cho biet rang Mn co the la so nguyen to chi neu chinh n la so nguyen to, đieu đo lam gian luoc bot viec tim cac so nguyen to Mersenne. Menh đe đao, noi rang Mn la so nguyen to neu n la so nguyen to la sai. So nho nhat cho vi du nay la 211-1 = 23×89, la hop so.
Đa co mot so thuat toan toi uu hoa đe tim so nguyen to Mersenne, do đo hien nay nguoi ta đa biet cac so nguyen to Mersenne rat lon.
Bon so nguyen to Mersenne đau tien 
  
    
      
        
          M
          
            2
          
        
        =
        3
      
    
    {\displaystyle M_{2}=3}
  
, 
  
    
      
        
          M
          
            3
          
        
        =
        7
      
    
    {\displaystyle M_{3}=7}
  
, 
  
    
      
        
          M
          
            5
          
        
        =
        31
      
    
    {\displaystyle M_{5}=31}
  
 va 
  
    
      
        
          M
          
            7
          
        
        =
        127
      
    
    {\displaystyle M_{7}=127}
  
 đa đuoc biet tu co xua. So thu nam, 
  
    
      
        
          M
          
            13
          
        
        =
        8191
      
    
    {\displaystyle M_{13}=8191}
  
, đuoc tim thay vao truoc nam 1461; hai so tiep theo (
  
    
      
        
          M
          
            17
          
        
      
    
    {\displaystyle M_{17}}
  
 va 
  
    
      
        
          M
          
            19
          
        
      
    
    {\displaystyle M_{19}}
  
) tim thay boi Cataldi vao nam 1588, đong thoi ong con du đoan cho cac so mu 23 (đa bi Fermat bac bo), 29 (đa bi Fermat bac bo), 37(đa bi Euler bac bo). Sau hon mot the ky 
  
    
      
        
          M
          
            31
          
        
      
    
    {\displaystyle M_{31}}
  
 đuoc kiem tra boi Euler vao nam 1750 bang Ly thuyet chi so. So tiep theo (trong lich su, khong theo thu tu so) la 
  
    
      
        
          M
          
            127
          
        
      
    
    {\displaystyle M_{127}}
  
, do Lucas tim thay vao nam 1876, sau đo 
  
    
      
        
          M
          
            61
          
        
      
    
    {\displaystyle M_{61}}
  
 do Pervushin tim vao nam 1883. Hai so nua (
  
    
      
        
          M
          
            89
          
        
      
    
    {\displaystyle M_{89}}
  
 va 
  
    
      
        
          M
          
            107
          
        
      
    
    {\displaystyle M_{107}}
  
) đuoc tim thay vao the ky XX, boi Powers vao nam 1911 va 1914.
Tu the ky XVII, cac so nay đuoc mang ten nha toan hoc Phap Marin Mersenne, nguoi đa chung minh va du đoan mot loat cac so nguyen to Mersenne voi cac so mu: 2, 3, 5, 7, 13, 17, 31, 67, 127, 257. Danh sach cua ong đa mac mot so sai lam, nhu bao gom ca M67 (đuoc Kohler chung minh la hop so vao nam 1901, cu the: 
  
    
      
        
          2
          
            67
          
        
        −
        1
        =
        193.707.721
        ×
        761.838.257.287
      
    
    {\displaystyle 2^{67}-1=193.707.721\times 761.838.257.287}
  
), M257 (đuoc chung minh la hop so vao nam 1952), va bi bo quen M61, M89 va M107.
Phuong phap tot nhat đe kiem tra tinh nguyen to cua cac so Mersenne đuoc dua vao su tinh toan mot day tuan hoan, đuoc phat bieu đau tien boi Lucas nam 1878 va chung minh boi Lehmer vao nhung nam 1930. Hien nay no đuoc goi la kiem tra Lucas-Lehmer voi so Mersenne. Đac biet, ta co the chung minh rang (voi 
  
    
      
        n
        >
        2
      
    
    {\displaystyle n>2}
  
) 
  
    
      
        
          M
          
            n
          
        
        =
        
          2
          
            n
          
        
        −
        1
      
    
    {\displaystyle M_{n}=2^{n}-1}
  
 la so nguyen to neu va chi neu Mn chia het cho Sn-2, trong đo 
  
    
      
        
          S
          
            0
          
        
        =
        4
      
    
    {\displaystyle S_{0}=4}
  
 va voi 
  
    
      
        k
        >
        0
      
    
    {\displaystyle k>0}
  
, 
  
    
      
        
          S
          
            k
          
        
        =
        
          S
          
            k
            −
            1
          
          
            2
          
        
        −
        2
      
    
    {\displaystyle S_{k}=S_{k-1}^{2}-2}
  
.

Viec tim cac so nguyen to Mersenne thuc su đuoc cach mang boi cac may tinh đien tu so. Thanh cong đau tien cua tu tuong nay thuoc ve so nguyen to Mersenne, M521, nho no luc kheo leo vao luc 10:00 P.M. ngay 30-1, 1952 khi su dung may tinh tu đong Western U.S. National Bureau of Standards (SWAC) tai Institute for Numerical Analysis thuoc Đai hoc California tai Los Angeles, duoi su đieu khien truc tiep cua Lehmer, su dung chuong trinh viet va chay boi GS R.M. Robinson. No la so nguyen to Mersenne đau tien tim thay sau 38 nam; so tiep theo, M607, đa đuoc tim thay do computer nay sau gan hai gio chay may. Ba so tiep theo  — M1279, M2203, M2281 — đa đuoc tim thay voi cung chuong trinh tren sau nhieu thang nua. M4253 la so nguyen to Mersenne đau tien la so nguyen to sieu lon (tren 1000 chu so thap phan - titanic), va M44497 la so nguyen to đau tien co tren 10.000 chu so thap phan (gigantic).
Đen thang 10 nam 2024, chi moi biet 52 so nguyen to Mersenne; so lon nhat đa biet la so (2136 279 841 − 1). Cung nhu nhieu so nguyen to Mersenne truoc đo, no đuoc tim ra nho du an tinh toan phan tan tren Internet, đuoc biet voi ten goi Tim kiem so nguyen to Mersenne khong lo tren Internet (Great Internet Mersenne Prime Search - GIMPS).


Cac đinh ly ve so nguyen to Mersenne Neu n la so nguyen duong, theo đinh ly nhi thuc ta co the viet:

  
    
      
        
          c
          
            n
          
        
        −
        
          d
          
            n
          
        
        =
        (
        c
        −
        d
        )
        
          ∑
          
            k
            =
            0
          
          
            n
            −
            1
          
        
        
          c
          
            k
          
        
        
          d
          
            n
            −
            1
            −
            k
          
        
      
    
    {\displaystyle c^{n}-d^{n}=(c-d)\sum _{k=0}^{n-1}c^{k}d^{n-1-k}}
  
,
hay

  
    
      
        (
        
          2
          
            a
          
        
        −
        1
        )
        ⋅
        
          (
          
            1
            +
            
              2
              
                a
              
            
            +
            
              2
              
                2
                a
              
            
            +
            
              2
              
                3
                a
              
            
            +
            ⋯
            +
            
              2
              
                (
                b
                −
                1
                )
                a
              
            
          
          )
        
        =
        
          2
          
            a
            b
          
        
        −
        1
      
    
    {\displaystyle (2^{a}-1)\cdot \left(1+2^{a}+2^{2a}+2^{3a}+\dots +2^{(b-1)a}\right)=2^{ab}-1}
  

nho đat 
  
    
      
        c
        =
        
          2
          
            a
          
        
      
    
    {\displaystyle c=2^{a}}
  
, 
  
    
      
        d
        =
        1
      
    
    {\displaystyle d=1}
  
, va 
  
    
      
        n
        =
        b
      
    
    {\displaystyle n=b}
  

Chung minh:

  
    
      
        (
        a
        −
        b
        )
        
          ∑
          
            k
            =
            0
          
          
            n
            −
            1
          
        
        
          a
          
            k
          
        
        
          b
          
            n
            −
            1
            −
            k
          
        
      
    
    {\displaystyle (a-b)\sum _{k=0}^{n-1}a^{k}b^{n-1-k}}
  

  
    
      
        =
        
          ∑
          
            k
            =
            0
          
          
            n
            −
            1
          
        
        
          a
          
            k
            +
            1
          
        
        
          b
          
            n
            −
            1
            −
            k
          
        
        −
        
          ∑
          
            k
            =
            0
          
          
            n
            −
            1
          
        
        
          a
          
            k
          
        
        
          b
          
            n
            −
            k
          
        
      
    
    {\displaystyle =\sum _{k=0}^{n-1}a^{k+1}b^{n-1-k}-\sum _{k=0}^{n-1}a^{k}b^{n-k}}
  

  
    
      
        =
        
          a
          
            n
          
        
        +
        
          ∑
          
            k
            =
            1
          
          
            n
            −
            1
          
        
        
          a
          
            k
          
        
        
          b
          
            n
            −
            k
          
        
        −
        
          ∑
          
            k
            =
            1
          
          
            n
            −
            1
          
        
        
          a
          
            k
          
        
        
          b
          
            n
            −
            k
          
        
        −
        
          b
          
            n
          
        
      
    
    {\displaystyle =a^{n}+\sum _{k=1}^{n-1}a^{k}b^{n-k}-\sum _{k=1}^{n-1}a^{k}b^{n-k}-b^{n}}
  

  
    
      
        =
        
          a
          
            n
          
        
        −
        
          b
          
            n
          
        
      
    
    {\displaystyle =a^{n}-b^{n}}
  

Neu 
  
    
      
        
          2
          
            n
          
        
        −
        1
      
    
    {\displaystyle 2^{n}-1}
  
 la so nguyen to, thi 
  
    
      
        n
      
    
    {\displaystyle n}
  
 la so nguyen to.
Chung minh
Do

  
    
      
        (
        
          2
          
            a
          
        
        −
        1
        )
        ⋅
        
          (
          
            1
            +
            
              2
              
                a
              
            
            +
            
              2
              
                2
                a
              
            
            +
            
              2
              
                3
                a
              
            
            +
            ⋯
            +
            
              2
              
                (
                b
                −
                1
                )
                a
              
            
          
          )
        
        =
        
          2
          
            a
            b
          
        
        −
        1
      
    
    {\displaystyle (2^{a}-1)\cdot \left(1+2^{a}+2^{2a}+2^{3a}+\dots +2^{(b-1)a}\right)=2^{ab}-1}
  

Neu 
  
    
      
        n
      
    
    {\displaystyle n}
  
 khong phai la nguyen to, hoac 
  
    
      
        n
        =
        a
        b
      
    
    {\displaystyle n=ab}
  
 trong đo 
  
    
      
        1
        <
        a
        ,
        b
        <
        n
      
    
    {\displaystyle 1<a,b<n}
  
. Do đo, 
  
    
      
        
          2
          
            a
          
        
        −
        1
      
    
    {\displaystyle 2^{a}-1}
  
 la uoc cua 
  
    
      
        
          2
          
            n
          
        
        −
        1
      
    
    {\displaystyle 2^{n}-1}
  
, hoac 
  
    
      
        
          2
          
            n
          
        
        −
        1
      
    
    {\displaystyle 2^{n}-1}
  
 khong la nguyen to.

Voi moi so nguyen to p le, uoc nguyen to cua Mp luon co dang 
  
    
      
        2
        k
        p
        +
        1
        ≡
        ±
        1
        
          
          (
          mod
          
          8
          )
        
      
    
    {\displaystyle 2kp+1\equiv \pm 1{\pmod {8}}}
  
.
Chung minh
Goi q la uoc nguyen to cua 2p - 1 ta co:

  
    
      
        
          2
          
            p
          
        
        ≡
        1
        
          
          (
          mod
          
          q
          )
        
      
    
    {\displaystyle 2^{p}\equiv 1{\pmod {q}}}
  
.
Theo đinh ly nho Fermat ta co:

  
    
      
        
          2
          
            q
            −
            1
          
        
        ≡
        1
        
          
          (
          mod
          
          q
          )
        
      
    
    {\displaystyle 2^{q-1}\equiv 1{\pmod {q}}}
  
.
Tu đo ta co q la uoc chung cua 2p - 1 va 2q - 1 - 1, hay la 
  
    
      
        gcd
        (
        
          2
          
            p
          
        
        −
        1
        ,
        
          2
          
            q
            −
            1
          
        
        −
        1
        )
        >
        1
      
    
    {\displaystyle \gcd(2^{p}-1,2^{q-1}-1)>1}
  
(*).
Ta xet bo đe sau: Neu a va b la hai so nguyen duong phan biet thi 
  
    
      
        gcd
        (
        
          2
          
            a
          
        
        −
        1
        ,
        
          2
          
            b
          
        
        −
        1
        )
        =
        
          2
          
            gcd
            (
            a
            ,
            b
            )
          
        
        −
        1
      
    
    {\displaystyle \gcd(2^{a}-1,2^{b}-1)=2^{\gcd(a,b)}-1}
  
.
That vay, gia su 
  
    
      
        gcd
        (
        a
        ,
        b
        )
        =
        d
      
    
    {\displaystyle \gcd(a,b)=d}
  
, suy ra a = k1d va b = k2d.
Suy ra:

  
    
      
        
          2
          
            a
          
        
        −
        1
        =
        
          2
          
            
              k
              
                1
              
            
            d
          
        
        −
        1
        =
        
          (
          
            
              2
              
                d
              
            
            −
            1
          
          )
        
        ×
        A
      
    
    {\displaystyle 2^{a}-1=2^{k_{1}d}-1=\left(2^{d}-1\right)\times A}
  

  
    
      
        
          2
          
            b
          
        
        −
        1
        =
        
          2
          
            
              k
              
                2
              
            
            d
          
        
        −
        1
        =
        
          (
          
            
              2
              
                d
              
            
            −
            1
          
          )
        
        ×
        B
      
    
    {\displaystyle 2^{b}-1=2^{k_{2}d}-1=\left(2^{d}-1\right)\times B}
  

Tuc la bo đe ta đa đat ra la đung.
Tu bo đe suy ra: 
  
    
      
        gcd
        (
        
          2
          
            p
          
        
        −
        1
        ,
        
          2
          
            q
            −
            1
          
        
        −
        1
        )
        =
        
          2
          
            gcd
            (
            p
            ,
            q
            −
            1
            )
          
        
        −
        1
      
    
    {\displaystyle \gcd(2^{p}-1,2^{q-1}-1)=2^{\gcd(p,q-1)}-1}
  
.
Gia su 
  
    
      
        gcd
        (
        p
        ,
        q
        −
        1
        )
        =
        1
      
    
    {\displaystyle \gcd(p,q-1)=1}
  
 thi suy ra đuoc 
  
    
      
        gcd
        (
        
          2
          
            p
          
        
        −
        1
        ,
        
          2
          
            q
            −
            1
          
        
        −
        1
        )
        =
        1
      
    
    {\displaystyle \gcd(2^{p}-1,2^{q-1}-1)=1}
  
, mau thuan voi (*). Do đo ta phai co 
  
    
      
        gcd
        (
        p
        ,
        q
        −
        1
        )
        >
        1
      
    
    {\displaystyle \gcd(p,q-1)>1}
  
. Do p la so nguyen to nen 
  
    
      
        gcd
        (
        p
        ,
        q
        −
        1
        )
        =
        p
      
    
    {\displaystyle \gcd(p,q-1)=p}
  
 hay q - 1 = bp.
Do q la uoc cua Mp le nen q le, suy ra b = 2k hay q = 2kp + 1.
Do 2p ≡ 1 (mod q) nen 2p + 1 ≡ 2 (mod q), suy ra 
  
    
      
        
          2
          
            
              
                p
                +
                1
              
              2
            
          
        
      
    
    {\displaystyle 2^{\frac {p+1}{2}}}
  
 la can bac hai cua 2 theo modulo (mođun) q, tuc no la nghiem cua:

  
    
      
        
          x
          
            2
          
        
        ≡
        2
        
          
          (
          mod
          
          q
          )
        
      
    
    {\displaystyle x^{2}\equiv 2{\pmod {q}}}
  
.
Theo luat tuong ho bac hai:

  
    
      
        q
        ≡
        ±
        1
        
          
          (
          mod
          
          8
          )
        
      
    
    {\displaystyle q\equiv \pm 1{\pmod {8}}}
  
.


Danh sach cac so nguyen to Mersenne đa biet cho đen nay Tinh đen  thang 12 nam 2021 co 51 so nguyen to Mersenne 2p − 1 tuong ung voi so mu p duoi đay:

2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583, 25964951, 30402457, 32582657, 37156667, 42643801, 43112609, 57885161, 74207281, 77232917, 82589933. (day so A000043 trong bang OEIS)
Đe hinh dung đo lon cua so nguyen to lon nhat đuoc tim thay (so thu 48), ta can co 4 647 trang giay A4 đe bieu dien so đo voi cac chu so trong he co so 10, 75 chu so mot dong va 50 dong mot trang. Neu dung giay đinh luong 70g/m², se can hon 10 kg giay (2.324 to) đe in thanh tap day khoang 20 cm.
Lay 2 luy thua n tru 1 nhan voi so tuong ung thi se cho ra so hoan hao.


Xem them Repunit
So nguyen to Fermat
Hang so Erdos–Borwein
Prime95 / MPrime
Kiem tra Lucas–Lehmer voi cac so Mersenne
So Mersenne kep
Mersenne twister
Bang so nguyen to


Tham khao Lien ket ngoai Great Internet Mersenne Prime Search (GIMPS), Orlando, Florida
Great Internet Mersenne Prime Search PrimeNet (v5.0): GIMPS Milestones Report
Prime Mersenne Numbers – History, Theorems and Lists – giai thich
Mersenne numbers – Wolfram Research/Mathematica
prime Mersenne numbers – Wolfram Research/Mathematica
Mq = (8x)2 - (3qy)2 Mersenne Proof (pdf)
Mq = x2 + d.y2 Math Thesis Luu tru ngay 21 thang 2 nam 2005 tai Wayback Machine (ps)
Mersenne Numbers & Mersenne Primes Bibliography with hyperlinks to original publications
Die neue Primzahl ist 39 Kilometer lang, 11.03.2005.dpa – reportage about prime Mersenne number – detection in detail (German)
Mersenne prime Wiki Luu tru ngay 5 thang 12 nam 2006 tai Wayback Machine
43rd Mersenne Prime Found tai MathWorld