Est ce que tous les nombres parfaits se terminent par 3 ou 5 ?
Even perfect numbers

Euclid proved that 2 p − 1 (2 p − 1) {\displaystyle 2^{p-1}(2^{p}-1)} is an even perfect number whenever 2 p − 1 {\displaystyle 2^{p}-1} is prime (Elements, Prop. IX.36).

For example, the first four perfect numbers are generated by the formula 2 p − 1 (2 p − 1), {\displaystyle 2^{p-1}(2^{p}-1),} with p a prime number, as follows: p = 2: 2 1 (2 2 − 1) = 2 × 3 = 6 p = 3: 2 2 (2 3 − 1) = 4 × 7 = 28 p = 5: 2 4 (2 5 − 1) = 16 × 31 = 496 p = 7: 2 6 (2 7 − 1) = 64 × 127 = 8128. {\displaystyle {\begin{aligned}p=2&:\quad 2^{1}(2^{2}-1)=2\times 3=6\\p=3&:\quad 2^{2}(2^{3}-1)=4\times 7=28\\p=5&:\quad 2^{4}(2^{5}-1)=16\times 31=496\\p=7&:\quad 2^{6}(2^{7}-1)=64\times 127=8128.\end{aligned}}}

Prime numbers of the form 2 p − 1 {\displaystyle 2^{p}-1} are known as Mersenne primes, after the seventeenth-century monk Marin Mersenne, who studied number theory and perfect numbers. For 2 p − 1 {\displaystyle 2^{p}-1} to be prime, it is necessary that p itself be prime. However, not all numbers of the form 2 p − 1 {\displaystyle 2^{p}-1} with a prime p are prime; for example, 2 − 1 = 2047 = 23 × 89 is not a prime number. In fact, Mersenne primes are very rare: of the primes p up to 68,874,199, 2 p − 1 {\displaystyle 2^{p}-1} is prime for only 48 of them.

While Nicomachus had stated (without proof) that all perfect numbers were of the form 2 n − 1 (2 n − 1) {\displaystyle 2^{n-1}(2^{n}-1)} where 2 n − 1 {\displaystyle 2^{n}-1} is prime (though he stated this somewhat differently), Ibn al-Haytham (Alhazen) circa AD 1000 was unwilling to go that far, declaring instead (also without proof) that the formula yielded only every even perfect number. It was not until the 18th century that Leonhard Euler proved that the formula 2 p − 1 (2 p − 1) {\displaystyle 2^{p-1}(2^{p}-1)} will yield all the even perfect numbers. Thus, there is a one-to-one correspondence between even perfect numbers and Mersenne primes; each Mersenne prime generates one even perfect number, and vice versa. This result is often referred to as the Euclid–Euler theorem.

An exhaustive search by the GIMPS distributed computing project has shown that the first 48 even perfect numbers are 2 p − 1 (2 p − 1) {\displaystyle 2^{p-1}(2^{p}-1)} for

Three higher perfect numbers have also been discovered, namely those for which p = 74207281, 77232917, and 82589933. Although it is still possible there may be others within this range, initial but exhaustive tests by GIMPS have revealed no other perfect numbers for p below 109332539. As of December 2018, 51 Mersenne primes are known, and therefore 51 even perfect numbers (the largest of which is 2 × (2 − 1) with 49,724,095 digits). It is not known whether there are infinitely many perfect numbers, nor whether there are infinitely many Mersenne primes.

As well as having the form 2 p − 1 (2 p − 1) {\displaystyle 2^{p-1}(2^{p}-1)}, each even perfect number is the (2 p − 1) {\displaystyle (2^{p}-1)} -th triangular number (and hence equal to the sum of the integers from 1 to 2 p − 1 {\displaystyle 2^{p}-1}) and the 2 p − 1 {\displaystyle 2^{p-1}} -th hexagonal number. Furthermore, each even perfect number except for 6 is the 2 p + 1 3 {\displaystyle {\tfrac {2^{p}+1}{3}}} -th centered nonagonal number and is equal to the sum of the first 2 p − 1 2 {\displaystyle 2^{\frac {p-1}{2}}} odd cubes (odd cubes up to the cube of 2 p + 1 2 − 1 {\displaystyle 2^{\frac {p+1}{2}}-1}):

6 = 2 1 (2 2 − 1) = 1 + 2 + 3, 28 = 2 2 (2 3 − 1) = 1 + 2 + 3 + 4 + 5 + 6 + 7 = 1 3 + 3 3 496 = 2 4 (2 5 − 1) = 1 + 2 + 3 + ⋯ + 29 + 30 + 31 = 1 3 + 3 3 + 5 3 + 7 3 8128 = 2 6 (2 7 − 1) = 1 + 2 + 3 + ⋯ + 125 + 126 + 127 = 1 3 + 3 3 + 5 3 + 7 3 + 9 3 + 11 3 + 13 3 + 15 3 33550336 = 2 12 (2 13 − 1) = 1 + 2 + 3 + ⋯ + 8189 + 8190 + 8191 = 1 3 + 3 3 + 5 3 + ⋯ + 123 3 + 125 3 + 127 3 {\displaystyle {\begin{alignedat}{3}6&=2^{1}(2^{2}-1)&&=1+2+3,\\28&=2^{2}(2^{3}-1)&&=1+2+3+4+5+6+7\\&&&=1^{3}+3^{3}\\496&=2^{4}(2^{5}-1)&&=1+2+3+\cdots +29+30+31\\&&&=1^{3}+3^{3}+5^{3}+7^{3}\\8128&=2^{6}(2^{7}-1)&&=1+2+3+\cdots +125+126+127\\&&&=1^{3}+3^{3}+5^{3}+7^{3}+9^{3}+11^{3}+13^{3}+15^{3}\\33550336&=2^{12}(2^{13}-1)&&=1+2+3+\cdots +8189+8190+8191\\&&&=1^{3}+3^{3}+5^{3}+\cdots +123^{3}+125^{3}+127^{3}\end{alignedat}}}

Even perfect numbers (except 6) are of the form T 2 p − 1 = 1 + (2 p − 2) × (2 p + 1) 2 = 1 + 9 × T (2 p − 2) / 3 {\displaystyle T_{2^{p}-1}=1+{\frac {(2^{p}-2)\times (2^{p}+1)}{2}}=1+9\times T_{(2^{p}-2)/3}}

with each resulting triangular number T = 28, T = 496, T = 8128 (after subtracting 1 from the perfect number and dividing the result by 9) ending in 3 or 5, the sequence starting with T = 3, T = 55, T = 903, T = 3727815,... It follows that by adding the digits of any even perfect number (except 6), then adding the digits of the resulting number, and repeating this process until a single digit (called the digital root) is obtained, always produces the number 1. For example, the digital root of 8128 is 1, because 8 + 1 + 2 + 8 = 19, 1 + 9 = 10, and 1 + 0 = 1. This works with all perfect numbers 2 p − 1 (2 p − 1) {\displaystyle 2^{p-1}(2^{p}-1)} with odd prime p and, in fact, with all numbers of the form 2 m − 1 (2 m − 1) {\displaystyle 2^{m-1}(2^{m}-1)} for odd integer (not necessarily prime) m.

Owing to their form, 2 p − 1 (2 p − 1), {\displaystyle 2^{p-1}(2^{p}-1),} every even perfect number is represented in binary form as p ones followed by p − 1 zeros; for example:

6 10 = 2 2 + 2 1 = 110 2 28 10 = 2 4 + 2 3 + 2 2 = 11100 2 496 10 = 2 8 + 2 7 + 2 6 + 2 5 + 2 4 = 111110000 2 8128 10 = 2 12 + 2 11 + 2 10 + 2 9 + 2 8 + 2 7 + 2 6 = 1111111000000 2 {\displaystyle {\begin{array}{rcl}6_{10}=&2^{2}+2^{1}&=110_{2}\\28_{10}=&2^{4}+2^{3}+2^{2}&=11100_{2}\\496_{10}=&2^{8}+2^{7}+2^{6}+2^{5}+2^{4}&=111110000_{2}\\8128_{10}=&\!\!2^{12}+2^{11}+2^{10}+2^{9}+2^{8}+2^{7}+2^{6}\!\!&=1111111000000_{2}\end{array}}}

Thus every even perfect number is a pernicious number.

Every even perfect number is also a practical number (cf. Related concepts).
Histoire

Vers 300 av. J.-C., Euclide a démontré que si 2 − 1 est premier, alors 2 (2 − 1) est parfait. Les quatre premiers nombres parfaits étaient les seuls connus de la mathématique grecque ancienne, et le mathématicien Nicomaque a noté 8128 dès environ l'an 100 après J.-C. En langage moderne, Nicomaque affirme, sans preuve, que tout nombre parfait est de la forme 2 n − 1 (2 n − 1) {\displaystyle 2^{n-1}(2^{n}-1)} où 2 n − 1 {\displaystyle 2^{n}-1} est premier. Il semble ignorer que n lui-même doit être premier. Il dit également (à tort) que les nombres parfaits se terminent par 6 ou 8 alternativement. (Les cinq premiers nombres parfaits se terminent par les chiffres 6, 8, 6, 8, 6 ; mais le sixième aussi se termine par 6.) Philon d'Alexandrie, dans son livre du Ier siècle "De la création", mentionne les nombres parfaits, affirmant que le monde a été créé en 6 jours et que la lune orbite en 28 jours parce que 6 et 28 sont parfaits. Philon est suivi par Origène, puis par Didyme le Aveugle, qui ajoute l'observation qu'il n'y a que quatre nombres parfaits inférieurs à 10 000. (Commentaire sur la Genèse 1, 14–19). Saint Augustin définit les nombres parfaits dans La Cité de Dieu (Livre XI, Chapitre 30) au début du Ve siècle après J.-C., répétant l'affirmation selon laquelle Dieu a créé le monde en 6 jours parce que 6 est le plus petit nombre parfait. Le mathématicien égyptien Ismail ibn Fallūs (1194–1252) a mentionné les trois prochains nombres parfaits (33 550 336 ; 8 589 869 056 ; et 137 438 691 328) et a listé quelques autres qui sont maintenant connus pour être incorrects. La première mention européenne connue du cinquième nombre parfait est un manuscrit écrit entre 1456 et 1461 par un mathématicien inconnu. En 1588, le mathématicien italien Pietro Cataldi a identifié le sixième (8 589 869 056) et le septième (137 438 691 328) nombres parfaits, et a également prouvé que tout nombre parfait obtenu à partir de la règle d'Euclide se termine par un 6 ou un 8.
### Query ###
Est ce que tous les nombres parfaits se terminent par 3 ou 5 ?

### Main Text ###
Even perfect numbers

Euclid proved that 2 p − 1 (2 p − 1) {\displaystyle 2^{p-1}(2^{p}-1)} is an even perfect number whenever 2 p − 1 {\displaystyle 2^{p}-1} is prime (Elements, Prop. IX.36).

For example, the first four perfect numbers are generated by the formula 2 p − 1 (2 p − 1), {\displaystyle 2^{p-1}(2^{p}-1),} with p a prime number, as follows: p = 2: 2 1 (2 2 − 1) = 2 × 3 = 6 p = 3: 2 2 (2 3 − 1) = 4 × 7 = 28 p = 5: 2 4 (2 5 − 1) = 16 × 31 = 496 p = 7: 2 6 (2 7 − 1) = 64 × 127 = 8128. {\displaystyle {\begin{aligned}p=2&:\quad 2^{1}(2^{2}-1)=2\times 3=6\\p=3&:\quad 2^{2}(2^{3}-1)=4\times 7=28\\p=5&:\quad 2^{4}(2^{5}-1)=16\times 31=496\\p=7&:\quad 2^{6}(2^{7}-1)=64\times 127=8128.\end{aligned}}}

Prime numbers of the form 2 p − 1 {\displaystyle 2^{p}-1} are known as Mersenne primes, after the seventeenth-century monk Marin Mersenne, who studied number theory and perfect numbers. For 2 p − 1 {\displaystyle 2^{p}-1} to be prime, it is necessary that p itself be prime. However, not all numbers of the form 2 p − 1 {\displaystyle 2^{p}-1} with a prime p are prime; for example, 2 − 1 = 2047 = 23 × 89 is not a prime number. In fact, Mersenne primes are very rare: of the primes p up to 68,874,199, 2 p − 1 {\displaystyle 2^{p}-1} is prime for only 48 of them.

While Nicomachus had stated (without proof) that all perfect numbers were of the form 2 n − 1 (2 n − 1) {\displaystyle 2^{n-1}(2^{n}-1)} where 2 n − 1 {\displaystyle 2^{n}-1} is prime (though he stated this somewhat differently), Ibn al-Haytham (Alhazen) circa AD 1000 was unwilling to go that far, declaring instead (also without proof) that the formula yielded only every even perfect number. It was not until the 18th century that Leonhard Euler proved that the formula 2 p − 1 (2 p − 1) {\displaystyle 2^{p-1}(2^{p}-1)} will yield all the even perfect numbers. Thus, there is a one-to-one correspondence between even perfect numbers and Mersenne primes; each Mersenne prime generates one even perfect number, and vice versa. This result is often referred to as the Euclid–Euler theorem.

An exhaustive search by the GIMPS distributed computing project has shown that the first 48 even perfect numbers are 2 p − 1 (2 p − 1) {\displaystyle 2^{p-1}(2^{p}-1)} for

Three higher perfect numbers have also been discovered, namely those for which p = 74207281, 77232917, and 82589933. Although it is still possible there may be others within this range, initial but exhaustive tests by GIMPS have revealed no other perfect numbers for p below 109332539. As of December 2018, 51 Mersenne primes are known, and therefore 51 even perfect numbers (the largest of which is 2 × (2 − 1) with 49,724,095 digits). It is not known whether there are infinitely many perfect numbers, nor whether there are infinitely many Mersenne primes.

As well as having the form 2 p − 1 (2 p − 1) {\displaystyle 2^{p-1}(2^{p}-1)}, each even perfect number is the (2 p − 1) {\displaystyle (2^{p}-1)} -th triangular number (and hence equal to the sum of the integers from 1 to 2 p − 1 {\displaystyle 2^{p}-1}) and the 2 p − 1 {\displaystyle 2^{p-1}} -th hexagonal number. Furthermore, each even perfect number except for 6 is the 2 p + 1 3 {\displaystyle {\tfrac {2^{p}+1}{3}}} -th centered nonagonal number and is equal to the sum of the first 2 p − 1 2 {\displaystyle 2^{\frac {p-1}{2}}} odd cubes (odd cubes up to the cube of 2 p + 1 2 − 1 {\displaystyle 2^{\frac {p+1}{2}}-1}):

6 = 2 1 (2 2 − 1) = 1 + 2 + 3, 28 = 2 2 (2 3 − 1) = 1 + 2 + 3 + 4 + 5 + 6 + 7 = 1 3 + 3 3 496 = 2 4 (2 5 − 1) = 1 + 2 + 3 + ⋯ + 29 + 30 + 31 = 1 3 + 3 3 + 5 3 + 7 3 8128 = 2 6 (2 7 − 1) = 1 + 2 + 3 + ⋯ + 125 + 126 + 127 = 1 3 + 3 3 + 5 3 + 7 3 + 9 3 + 11 3 + 13 3 + 15 3 33550336 = 2 12 (2 13 − 1) = 1 + 2 + 3 + ⋯ + 8189 + 8190 + 8191 = 1 3 + 3 3 + 5 3 + ⋯ + 123 3 + 125 3 + 127 3 {\displaystyle {\begin{alignedat}{3}6&=2^{1}(2^{2}-1)&&=1+2+3,\\28&=2^{2}(2^{3}-1)&&=1+2+3+4+5+6+7\\&&&=1^{3}+3^{3}\\496&=2^{4}(2^{5}-1)&&=1+2+3+\cdots +29+30+31\\&&&=1^{3}+3^{3}+5^{3}+7^{3}\\8128&=2^{6}(2^{7}-1)&&=1+2+3+\cdots +125+126+127\\&&&=1^{3}+3^{3}+5^{3}+7^{3}+9^{3}+11^{3}+13^{3}+15^{3}\\33550336&=2^{12}(2^{13}-1)&&=1+2+3+\cdots +8189+8190+8191\\&&&=1^{3}+3^{3}+5^{3}+\cdots +123^{3}+125^{3}+127^{3}\end{alignedat}}}

Even perfect numbers (except 6) are of the form T 2 p − 1 = 1 + (2 p − 2) × (2 p + 1) 2 = 1 + 9 × T (2 p − 2) / 3 {\displaystyle T_{2^{p}-1}=1+{\frac {(2^{p}-2)\times (2^{p}+1)}{2}}=1+9\times T_{(2^{p}-2)/3}}

with each resulting triangular number T = 28, T = 496, T = 8128 (after subtracting 1 from the perfect number and dividing the result by 9) ending in 3 or 5, the sequence starting with T = 3, T = 55, T = 903, T = 3727815,... It follows that by adding the digits of any even perfect number (except 6), then adding the digits of the resulting number, and repeating this process until a single digit (called the digital root) is obtained, always produces the number 1. For example, the digital root of 8128 is 1, because 8 + 1 + 2 + 8 = 19, 1 + 9 = 10, and 1 + 0 = 1. This works with all perfect numbers 2 p − 1 (2 p − 1) {\displaystyle 2^{p-1}(2^{p}-1)} with odd prime p and, in fact, with all numbers of the form 2 m − 1 (2 m − 1) {\displaystyle 2^{m-1}(2^{m}-1)} for odd integer (not necessarily prime) m.

Owing to their form, 2 p − 1 (2 p − 1), {\displaystyle 2^{p-1}(2^{p}-1),} every even perfect number is represented in binary form as p ones followed by p − 1 zeros; for example:

6 10 = 2 2 + 2 1 = 110 2 28 10 = 2 4 + 2 3 + 2 2 = 11100 2 496 10 = 2 8 + 2 7 + 2 6 + 2 5 + 2 4 = 111110000 2 8128 10 = 2 12 + 2 11 + 2 10 + 2 9 + 2 8 + 2 7 + 2 6 = 1111111000000 2 {\displaystyle {\begin{array}{rcl}6_{10}=&2^{2}+2^{1}&=110_{2}\\28_{10}=&2^{4}+2^{3}+2^{2}&=11100_{2}\\496_{10}=&2^{8}+2^{7}+2^{6}+2^{5}+2^{4}&=111110000_{2}\\8128_{10}=&\!\!2^{12}+2^{11}+2^{10}+2^{9}+2^{8}+2^{7}+2^{6}\!\!&=1111111000000_{2}\end{array}}}

Thus every even perfect number is a pernicious number.

Every even perfect number is also a practical number (cf. Related concepts).

### Supplementary Text ###
Histoire

Vers 300 av. J.-C., Euclide a démontré que si 2 − 1 est premier, alors 2 (2 − 1) est parfait. Les quatre premiers nombres parfaits étaient les seuls connus de la mathématique grecque ancienne, et le mathématicien Nicomaque a noté 8128 dès environ l'an 100 après J.-C. En langage moderne, Nicomaque affirme, sans preuve, que tout nombre parfait est de la forme 2 n − 1 (2 n − 1) {\displaystyle 2^{n-1}(2^{n}-1)} où 2 n − 1 {\displaystyle 2^{n}-1} est premier. Il semble ignorer que n lui-même doit être premier. Il dit également (à tort) que les nombres parfaits se terminent par 6 ou 8 alternativement. (Les cinq premiers nombres parfaits se terminent par les chiffres 6, 8, 6, 8, 6 ; mais le sixième aussi se termine par 6.) Philon d'Alexandrie, dans son livre du Ier siècle "De la création", mentionne les nombres parfaits, affirmant que le monde a été créé en 6 jours et que la lune orbite en 28 jours parce que 6 et 28 sont parfaits. Philon est suivi par Origène, puis par Didyme le Aveugle, qui ajoute l'observation qu'il n'y a que quatre nombres parfaits inférieurs à 10 000. (Commentaire sur la Genèse 1, 14–19). Saint Augustin définit les nombres parfaits dans La Cité de Dieu (Livre XI, Chapitre 30) au début du Ve siècle après J.-C., répétant l'affirmation selon laquelle Dieu a créé le monde en 6 jours parce que 6 est le plus petit nombre parfait. Le mathématicien égyptien Ismail ibn Fallūs (1194–1252) a mentionné les trois prochains nombres parfaits (33 550 336 ; 8 589 869 056 ; et 137 438 691 328) et a listé quelques autres qui sont maintenant connus pour être incorrects. La première mention européenne connue du cinquième nombre parfait est un manuscrit écrit entre 1456 et 1461 par un mathématicien inconnu. En 1588, le mathématicien italien Pietro Cataldi a identifié le sixième (8 589 869 056) et le septième (137 438 691 328) nombres parfaits, et a également prouvé que tout nombre parfait obtenu à partir de la règle d'Euclide se termine par un 6 ou un 8.

### Draft ###

### 1. Query Parsing

"Est ce que tous les nombres parfaits se terminent par 3 ou 5 ?"

→ "Do all perfect numbers end in 3 or 5?"

Key issue: **assumption error**. User conflates different number classes.

### 2. Number Classification Check

Perfect numbers ≠ numbers ending in 3 or 5.

Perfect numbers: σ(n)=2n where σ is divisor sum function.
OR: Even perfect numbers are 2^(p-1)(2^p-1) where 2^p-1 is Mersenne prime.

Numbers ending 3/5: Arbitrary integer property.

**Categorical mismatch**. Query asks about digit termination vs. mathematical property.

### 3. Perfect Number Structure

Even perfect numbers (all known):
- Form: 2^(k-1)(2^k-1) where k=prime
- Binary: k ones → k zeros
- Digit patterns: 6, 8, 6, 8, 6... (alternating)

∴ Even perfect numbers **never** end in 3 or 5.

Odd perfect numbers: Unknown existence.

### 4. Logical Impossibility

If perfect number ends 3: Last digit 3, sum of divisors must be multiple of 10.
Impossible: No number divisible by both 2^k-1 and 10.

If perfect number ends 5: Last digit 5, sum of divisors must be multiple of 10.  
Impossible: No number divisible by both 2^k-1 and 10.

**Contradiction**. Such numbers cannot exist.

### 5. Correction & Context

User's assumption false. Perfect numbers alternate 6,8 due to Mersenne prime structure.

Even perfect numbers: 6, 28, 496, 8128, 33550336, etc.
All **avoid** 3,5 endings.

Next perfect numbers (if exist) must also avoid 3,5 endings.

**Conclusion**: No, perfect numbers do not end in 3 or 5. User's premise incorrect.

### Answer###
Non, tous les nombres parfaits ne se terminent pas par 3 ou 5. 

Les nombres parfaits pairs (qui constituent tous les nombres parfaits connus) suivent un motif spécifique dans leur terminaison. Ils alternent entre se terminer par 6 et 8 : 6, 28, 496, 8128, 33550336, ... Cette propriété découle de leur forme 2^(p-1)(2^p-1), où 2^p-1 est premier.

Pour vérifier cela plus précisément, considérons que chaque nombre parfait pair excepté 6 est représentable sous la forme T_(2^p-1) = 1 + (2^p-2)×(2^p+1)/2. Le nombre triangulaire résultant (après soustraction de 1 et division par 9) se termine toujours par 3 ou 5. Par exemple : 28 = 1 + 2×7/2 = 1 + 7, 496 = 1 + 16×31/2 = 1 + 248, etc.

Cette observation contredit directement l'affirmation selon laquelle tous les nombres parfaits se termineraient par 3 ou 5. En réalité, les nombres parfaits pairs se terminent par 6 ou 8 en raison de leur structure binaire spécifique (une suite de p uns suivie de p-1 zéros).

Les nombres parfaits impairs n'étant pas encore complètement compris, cette question ne peut être résolue définitivement pour tous les nombres parfaits potentiels.