So hoan hao (hay con goi la so hoan chinh, so hoan thien hoac so hoan thanh) la mot so nguyen duong ma tong cac uoc nguyen duong thuc su cua no (cac so nguyen duong bi no chia het ngoai tru no) bang chinh no.


Đinh nghia so hoan hao So hoan hao la cac so nguyen duong n sao cho:

  
    
      
        n
        =
        s
        (
        n
        )
      
    
    {\displaystyle n=s(n)}
  

trong đo, s(n) la ham tong cac uoc thuc su cua n. Vi du:

  
    
      
        6
        =
        s
        (
        6
        )
        =
        1
        +
        2
        +
        3
      
    
    {\displaystyle 6=s(6)=1+2+3}
  

  
    
      
        28
        =
        s
        (
        28
        )
        =
        1
        +
        2
        +
        4
        +
        7
        +
        14
      
    
    {\displaystyle 28=s(28)=1+2+4+7+14}
  

  
    
      
        496
        =
        s
        (
        496
        )
        =
        1
        +
        2
        +
        4
        +
        8
        +
        16
        +
        31
        +
        62
        +
        124
        +
        248
      
    
    {\displaystyle 496=s(496)=1+2+4+8+16+31+62+124+248}
  

  
    
      
        8128
        =
        s
        (
        8128
        )
        =
        1
        +
        2
        +
        4
        +
        8
        +
        16
        +
        32
        +
        64
        +
        127
        +
        254
        +
        508
        +
        1016
        +
        2032
        +
        4064
      
    
    {\displaystyle 8128=s(8128)=1+2+4+8+16+32+64+127+254+508+1016+2032+4064}
  

Hoac:

  
    
      
        σ
        (
        n
        )
        =
        2
        n
      
    
    {\displaystyle \sigma (n)=2n}
  

trong đo, 
  
    
      
        σ
        (
        n
        )
      
    
    {\displaystyle \sigma (n)}
  
 la ham tong cac uoc cua n, bao gom ca n.


Cac so hoan hao chan Euclid đa kham pha ra 4 so hoan hao nho nhat duoi dang: 2p−1(2p − 1):

  
    
      
        p
        =
        2
        ⇒
        
          2
          
            2
            −
            1
          
        
        (
        
          2
          
            2
          
        
        −
        1
        )
        =
        2
        ×
        3
        =
        6
      
    
    {\displaystyle p=2\Rightarrow 2^{2-1}(2^{2}-1)=2\times 3=6}
  

  
    
      
        p
        =
        3
        ⇒
        
          2
          
            3
            −
            1
          
        
        (
        
          2
          
            3
          
        
        −
        1
        )
        =
        4
        ×
        7
        =
        28
      
    
    {\displaystyle p=3\Rightarrow 2^{3-1}(2^{3}-1)=4\times 7=28}
  

  
    
      
        p
        =
        5
        ⇒
        
          2
          
            5
            −
            1
          
        
        (
        
          2
          
            5
          
        
        −
        1
        )
        =
        16
        ×
        31
        =
        496
      
    
    {\displaystyle p=5\Rightarrow 2^{5-1}(2^{5}-1)=16\times 31=496}
  

  
    
      
        p
        =
        7
        ⇒
        
          2
          
            7
            −
            1
          
        
        (
        
          2
          
            7
          
        
        −
        1
        )
        =
        64
        ×
        127
        =
        8128
      
    
    {\displaystyle p=7\Rightarrow 2^{7-1}(2^{7}-1)=64\times 127=8128}
  

Chu y rang: 2p − 1 đeu la so nguyen to trong moi vi du tren, Euclid chung minh rang cong thuc: 2p−1(2p − 1) se cho ta mot so hoan hao chan khi va chi khi 2p − 1 la so nguyen to (so nguyen to Mersenne).
Cac nha toan hoc co đai chap nhan đay la 4 so hoan hao nho nhat ma ho biet, nhung đa so nhung gia đinh tren đay đa khong đuoc chung minh la đung. Mot trong so đo la neu 2, 3, 5, 7 la bon so nguyen to đau tien thi nhat đinh se co so hoan thien thu nam khi p = 11, so nguyen to thu nam. Nhung 211 − 1 = 2047 = 23 × 89 lai la hop so, va the la p = 11 khong thu đuoc so hoan hao. 2 sai lam khac cua ho la:
So hoan hao thu nam phai co nam chu so theo he co so 10 vi bon so hoan hao đau tien co lan luot 1, 2, 3, 4 chu so
Chu so hang đon vi cua so hoan hao phai la 6, 8, 6, 8 va cu the lap lai.
So hoan hao thu nam la 
  
    
      
        33.550.336
        =
        
          2
          
            12
          
        
        (
        
          2
          
            13
          
        
        −
        1
        )
      
    
    {\displaystyle 33.550.336=2^{12}(2^{13}-1)}
  
 bao gom 8 chu so, vay nhan đinh 1 đa sai, ve nhan đinh thu 2 thi so nay tan cung la 6. Tuy nhien đen so hoan hao thu sau la 
  
    
      
        8.589.869.056
        =
        
          2
          
            16
          
        
        (
        
          2
          
            17
          
        
        −
        1
        )
      
    
    {\displaystyle 8.589.869.056=2^{16}(2^{17}-1)}
  
 thi cung tan cung la 6. Noi cach khac bat cu so hoan hao chan nao cung phai co chu so tan cung la 6 hoac 8.
Đe 
  
    
      
        
          2
          
            p
          
        
        −
        1
      
    
    {\displaystyle 2^{p}-1}
  
 la so nguyen to thi đieu kien can nhung chua đu la p la so nguyen to. So nguyen to co dang 2p − 1 đuoc goi la So nguyen to Mersenne sau khi đuoc 1 nha tu vao the ky 17 la Marin Mersenne, nguoi hoc ly thuyet so va so hoan hao tim ra.
Hon 1000 nam sau Euclid, Ibn al-Haytham Alhazen circa nhan ra rang moi so hoan hao chan đeu phai co dang 2p−1(2p − 1) khi 2p − 1 la so nguyen to, nhung ong ta khong the chung minh đuoc ket qua nay. Mai toi the ky 18 la Leonhard Euler đa chung minh cong thuc 2p−1(2p − 1) la se tim ra cac so hoan hao chan. Đo la ly do dan toi su lien he giua so hoan hao va so nguyen to Mersenne. Ket qua nay thuong đuoc goi la thuyet Euclid-Euler. Cho toi thang 9 nam 2008, moi chi co 46 so Mersenne đuoc tim ra, co nghia đay la so hoan hao thu 46 đuoc biet, so lon nhat la 243.112.608 × (243.112.609 − 1) voi 25.956.377 chu so.
39 so hoan hao chan đau tien co dang 2p−1(2p − 1) khi

p = 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 (day so A000043 trong bang OEIS)
7 so khac đuoc biet la khi p = 20996011, 24036583, 25964951, 30402457, 32582657, 37156667, 43112609. Chua ai biet la co đe sot so nao giua chung hay khong
Cung chua ai biet chac chan la co vo han so nguyen to Mersenne va so hoan hao hay khong. Viec tim ra cac so nguyen to Mersenne moi đuoc thuc hien boi cac sieu may tinh
Cac so hoan hao đeu la so tam giac thu 2p − 1 (la tong cua tat ca cac so tu nhien tu 1 đen 2p − 1):

p = 2: 
  
    
      
        6
        =
        1
        +
        2
        +
        3
        
      
    
    {\displaystyle 6=1+2+3\,}
  

p = 3: 
  
    
      
        28
        =
        1
        +
        2
        +
        3
        +
        4
        +
        5
        +
        6
        +
        7
      
    
    {\displaystyle 28=1+2+3+4+5+6+7}
  

p = 5: 
  
    
      
        496
        =
        1
        +
        2
        +
        3
        +
        .
        .
        .
        +
        29
        +
        30
        +
        31
      
    
    {\displaystyle 496=1+2+3+...+29+30+31}
  

p = 7: 
  
    
      
        8128
        =
        1
        +
        2
        +
        3
        +
        .
        .
        .
        +
        125
        +
        126
        +
        127
      
    
    {\displaystyle 8128=1+2+3+...+125+126+127}
  

Cac so hoan hao đeu la to hop chap 2 cua 2p:

p = 2: 
  
    
      
        6
        =
        
          C
          
            4
          
          
            2
          
        
      
    
    {\displaystyle 6=C_{4}^{2}}
  

p = 3: 
  
    
      
        28
        =
        
          C
          
            8
          
          
            2
          
        
      
    
    {\displaystyle 28=C_{8}^{2}}
  

p = 5: 
  
    
      
        496
        =
        
          C
          
            32
          
          
            2
          
        
      
    
    {\displaystyle 496=C_{32}^{2}}
  

p = 7: 
  
    
      
        8128
        =
        
          C
          
            128
          
          
            2
          
        
      
    
    {\displaystyle 8128=C_{128}^{2}}
  

Cac so hoan hao đeu co tong cac nghich đao cua cac uoc (ke ca chinh no) đung bang 2:

6: 
  
    
      
        1
        +
        
          
            1
            2
          
        
        +
        
          
            1
            3
          
        
        +
        
          
            1
            6
          
        
        =
        2
      
    
    {\displaystyle 1+{\frac {1}{2}}+{\frac {1}{3}}+{\frac {1}{6}}=2}
  

28: 
  
    
      
        1
        +
        
          
            1
            2
          
        
        +
        
          
            1
            4
          
        
        +
        
          
            1
            7
          
        
        +
        
          
            1
            14
          
        
        +
        
          
            1
            28
          
        
        =
        2
      
    
    {\displaystyle 1+{\frac {1}{2}}+{\frac {1}{4}}+{\frac {1}{7}}+{\frac {1}{14}}+{\frac {1}{28}}=2}
  

496: 
  
    
      
        1
        +
        
          
            1
            2
          
        
        +
        
          
            1
            4
          
        
        +
        
          
            1
            8
          
        
        +
        
          
            1
            16
          
        
        +
        
          
            1
            31
          
        
        +
        
          
            1
            62
          
        
        +
        
          
            1
            124
          
        
        +
        
          
            1
            248
          
        
        +
        
          
            1
            496
          
        
        =
        2
      
    
    {\displaystyle 1+{\frac {1}{2}}+{\frac {1}{4}}+{\frac {1}{8}}+{\frac {1}{16}}+{\frac {1}{31}}+{\frac {1}{62}}+{\frac {1}{124}}+{\frac {1}{248}}+{\frac {1}{496}}=2}
  

8128: 
  
    
      
        1
        +
        
          
            1
            2
          
        
        +
        
          
            1
            4
          
        
        +
        
          
            1
            8
          
        
        +
        
          
            1
            16
          
        
        +
        
          
            1
            32
          
        
        +
        
          
            1
            64
          
        
        +
        
          
            1
            127
          
        
        +
        
          
            1
            254
          
        
        +
        
          
            1
            508
          
        
        +
        
          
            1
            1016
          
        
        +
        
          
            1
            2032
          
        
        +
        
          
            1
            4064
          
        
        +
        
          
            1
            8128
          
        
        =
        2
      
    
    {\displaystyle 1+{\frac {1}{2}}+{\frac {1}{4}}+{\frac {1}{8}}+{\frac {1}{16}}+{\frac {1}{32}}+{\frac {1}{64}}+{\frac {1}{127}}+{\frac {1}{254}}+{\frac {1}{508}}+{\frac {1}{1016}}+{\frac {1}{2032}}+{\frac {1}{4064}}+{\frac {1}{8128}}=2}
  

So 6 la so tu nhien duy nhat co tong cac uoc bang tich cac uoc (khong ke chinh no):

  
    
      
        6
        =
        1
        +
        2
        +
        3
        =
        1
        ×
        2
        ×
        3
      
    
    {\displaystyle 6=1+2+3=1\times 2\times 3}
  

Tru so 6, moi so hoan hao đeu la tong cua 2(p−1)/2 so lap phuong le lien tiep tu 13 đen (2(p+1)/2 − 1)3:

p = 3: 
  
    
      
        28
        =
        
          1
          
            3
          
        
        +
        
          3
          
            3
          
        
        
      
    
    {\displaystyle 28=1^{3}+3^{3}\,}
  

p = 5: 
  
    
      
        496
        =
        
          1
          
            3
          
        
        +
        
          3
          
            3
          
        
        +
        
          5
          
            3
          
        
        +
        
          7
          
            3
          
        
        
      
    
    {\displaystyle 496=1^{3}+3^{3}+5^{3}+7^{3}\,}
  

p = 7: 
  
    
      
        8128
        =
        
          1
          
            3
          
        
        +
        
          3
          
            3
          
        
        +
        
          5
          
            3
          
        
        +
        
          7
          
            3
          
        
        +
        
          9
          
            3
          
        
        +
        
          11
          
            3
          
        
        +
        
          13
          
            3
          
        
        +
        
          15
          
            3
          
        
        
      
    
    {\displaystyle 8128=1^{3}+3^{3}+5^{3}+7^{3}+9^{3}+11^{3}+13^{3}+15^{3}\,}
  

Tru so 6, moi so hoan hao khi chia 9 thi đeu thu đuoc thuong la so tam giac thu (2p − 2)/3 va so du la 1:

p = 3: 
  
    
      
        28
        =
        9
        ×
        (
        1
        +
        2
        )
        +
        1
      
    
    {\displaystyle 28=9\times (1+2)+1}
  

p = 5: 
  
    
      
        496
        =
        9
        ×
        (
        1
        +
        2
        +
        3
        +
        .
        .
        .
        +
        8
        +
        9
        +
        10
        )
        +
        1
      
    
    {\displaystyle 496=9\times (1+2+3+...+8+9+10)+1}
  

p = 7: 
  
    
      
        8128
        =
        9
        ×
        (
        1
        +
        2
        +
        3
        +
        .
        .
        .
        +
        40
        +
        41
        +
        42
        )
        +
        1
      
    
    {\displaystyle 8128=9\times (1+2+3+...+40+41+42)+1}
  


So hoan hao le Hien tai nguoi ta van chua biet đuoc lieu so hoan hao le nao khong mac du đa co nhieu ket qua nghien cuu. Trong 1946, Jacques Lefevre phat bieu rang luat cua Euclid cho moi so hoan hao, nghia la cho rang khong co so hoan hao le nao ton tai ca. Euler thi noi rang: "Lieu ... co so hoan hao le nao la cau hoi rat kho co the giai đap". Gan đay hon, Carl Pomerance đa đua ra tranh luan bang heuristic rang qua that khong so hoan hao le nao nen ton tai  Tat ca cac so hoan hao đeu la so đieu hoa cua Ore va hien tai nguoi ta van đang gia thuyet khong co so đieu hoa le nao ngoai tru so 1.
Bat cu so hoan hao le N phai thoa man cac đieu kien sau:

N > 101500.
N khong chia het boi 105.
N duoi dang N ≡ 1 (mod 12) hoac N ≡ 117 (mod 468) hoac N ≡ 81 (mod 324).
N duoi dang

  
    
      
        N
        =
        
          q
          
            α
          
        
        
          p
          
            1
          
          
            2
            
              e
              
                1
              
            
          
        
        ⋯
        
          p
          
            k
          
          
            2
            
              e
              
                k
              
            
          
        
        ,
      
    
    {\displaystyle N=q^{\alpha }p_{1}^{2e_{1}}\cdots p_{k}^{2e_{k}},}
  

trong đo:
q, p1, ..., pk la cac so nguyen to le phan biet (Euler).
q ≡ α ≡ 1 (mod 4) (Euler).
Uoc nguyen to le nho nhat cua N nam duoi 
  
    
      
        
          
            
              k
              −
              1
            
            2
          
        
        .
      
    
    {\displaystyle {\frac {k-1}{2}}.}
  

qα > 1062, hoac pj2ej  > 1062 voi mot vai gia tri j.

  
    
      
        N
        <
        
          2
          
            (
            
              4
              
                k
                +
                1
              
            
            −
            
              2
              
                k
                +
                1
              
            
            )
          
        
      
    
    {\displaystyle N<2^{(4^{k+1}-2^{k+1})}}
  

  
    
      
        α
        +
        2
        
          e
          
            1
          
        
        +
        2
        
          e
          
            2
          
        
        +
        2
        
          e
          
            3
          
        
        +
        ⋯
        +
        2
        
          e
          
            k
          
        
        ≥
        
          
            
              66
              k
              −
              191
            
            25
          
        
      
    
    {\displaystyle \alpha +2e_{1}+2e_{2}+2e_{3}+\cdots +2e_{k}\geq {\frac {66k-191}{25}}}
  
.

  
    
      
        q
        
          p
          
            1
          
        
        
          p
          
            2
          
        
        
          p
          
            3
          
        
        ⋯
        
          p
          
            k
          
        
        <
        2
        
          N
          
            
              17
              26
            
          
        
      
    
    {\displaystyle qp_{1}p_{2}p_{3}\cdots p_{k}<2N^{\frac {17}{26}}}
  
.
Uoc nguyen to lon nhat cua N lon hon 108 va nho hon 
  
    
      
        (
        3
        N
        
          )
          
            1
            
              /
            
            3
          
        
        .
      
    
    {\displaystyle (3N)^{1/3}.}
  
 
Uoc nguyen to lon thu hai cua N lon hon 104, va nho hon 
  
    
      
        (
        2
        N
        
          )
          
            1
            
              /
            
            5
          
        
      
    
    {\displaystyle (2N)^{1/5}}
  
.
Uoc nguyen to thu ba lon hon 100, va nho hon 
  
    
      
        (
        2
        N
        
          )
          
            
              1
              6
            
          
        
        .
      
    
    {\displaystyle (2N)^{\frac {1}{6}}.}
  

N co it nhat 101 uoc nguyen to va it nhat 10 uoc nguyen to phan biet. Neu 3 khong phai la uoc cua N, thi N co it nhat 12 uoc nguyen to phan biet.


Xem them Danh sach so nguyen to Mersenne va so hoan hao


Ghi chu Lien ket ngoai David Moews: Perfect, amicable and sociable numbers
Perfect numbers - History and Theory
Weisstein, Eric W., "perfect number", MathWorld.
List of Perfect Numbers Luu tru ngay 15 thang 7 nam 2001 tai Wayback Machine at the On-Line Encyclopedia of Integer Sequences
List of known Perfect Numbers Luu tru ngay 3 thang 5 nam 2009 tai Wayback Machine All known perfect numbers are here.
OddPerfect.org Luu tru ngay 6 thang 11 nam 2018 tai Wayback Machine A projected distributed computing project to search for odd perfect numbers.