# 40 (number)

**40 (forty)** is the natural number following 39 and preceding 41, equal to four tens and written XL in [Roman numerals](https://www.edgepedia.org/roman-numerals).<sup>[1](https://en.wiktionary.org/wiki/forty)</sup><sup> • </sup><sup>[2](https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Forty)</sup> It is an even, two-digit composite number whose prime factorization is \( 2^{3} \times 5 \).<sup>[3](https://www.numberempire.com/40)</sup> Beyond arithmetic, forty carries unusual cultural weight: it is one of the most frequent numbers in the Bible as a marker of extended periods, and it appears in phrases from the [Roaring Forties](https://www.edgepedia.org/roaring-forties) to forty winks.<sup>[4](https://www.etymonline.com/word/forty)</sup><sup> • </sup><sup>[2](https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Forty)</sup>

| Key fact | Detail |
|---|---|
| Prime factorization | \( 2^{3} \times 5 \), two distinct prime factors<sup>[3](https://www.numberempire.com/40)</sup> |
| Divisors | 1, 2, 4, 5, 8, 10, 20, 40; sum of divisors σ(40) = 90<sup>[3](https://www.numberempire.com/40)</sup> |
| Classification | Abundant (proper divisors sum to 50), Harshad (divisible by digit sum 4), refactorable (divisor count 8 divides 40)<sup>[5](https://nerdulator.com/40)</sup><sup> • </sup><sup>[6](https://cs.uwaterloo.ca/journals/JIS/colton/joisol.html)</sup> |
| Arithmetic functions | Euler's totient φ(40) = 16; Carmichael function λ(40) = 4<sup>[3](https://www.numberempire.com/40)</sup><sup> • </sup><sup>[5](https://nerdulator.com/40)</sup> |
| Figurate forms | 4th octagonal number, 4th pentagonal pyramidal number, 5th second pentagonal number, 10th generalized pentagonal number<sup>[7](https://proofwiki.org/wiki/40)</sup> |
| Notation | Roman XL; binary 101000; hexadecimal 28<sup>[3](https://www.numberempire.com/40)</sup> |
| Spelling | Forty, the only number whose English name has all its letters in alphabetical order<sup>[7](https://proofwiki.org/wiki/40)</sup> |
| Prime context | The 40th prime is 173<sup>[3](https://www.numberempire.com/40)</sup> |

## Etymology and spelling

The English word goes back to [Old English](https://www.edgepedia.org/old-english) *feowertig*, a combination of *feower* (four, from the Proto-Indo-European root *kwetwer-) and *tig*, an old form of "ten" used as a suffix. The form is attested from the early 12th century, with cognates including German *vierzig*, Dutch *veertig*, and Gothic *fidwor tigjus*.<sup>[4](https://www.etymonline.com/word/forty)</sup><sup> • </sup><sup>[8](https://bosworthtoller.com/10484)</sup>

The missing u is a quirk of standardization. Four, fourteen, and forty all descend from the same root, but the current spelling *forty* dates only to the 16th century, and the logically consistent [Middle English](https://www.edgepedia.org/middle-english) form *fourty* survived into the 18th century before falling out of use.<sup>[9](https://scrabble.m-w.com/grammar/is-it-forty-or-fourty)</sup> The spelling *fourty* is now nonstandard in every variety of English.<sup>[10](https://en.wiktionary.org/wiki/fourty)</sup>

The Latin side of the family produced several English derivatives. *Quarantine* comes from Italian *quaranta giorni*, literally "space of forty days", and *Quadragesima*, the Latin name for Lent, means "the fortieth (day)" because the fast lasts forty days.<sup>[4](https://www.etymonline.com/word/forty)</sup> French *quarante* likewise derives from a popular alteration of Latin *quadraginta*, itself built from *quattuor* (four) and *decem* (ten).<sup>[11](https://www.dictionnaire-academie.fr/article/A9Q0084)</sup>

## Mathematical properties

**Factor structure.** With prime factorization \( 2^{3} \times 5 \), the divisor-count formula \( (3+1)(1+1) \) gives 8 divisors: 1, 2, 4, 5, 8, 10, 20, and 40.<sup>[3](https://www.numberempire.com/40)</sup><sup> • </sup><sup>[12](https://factor-calculator.net/factors-of-40/)</sup> Their sum is 90, so the sum of proper divisors is 50, which exceeds 40; this makes 40 an abundant number, the 7th after 12, 18, 20, 24, 30, and 36.<sup>[5](https://nerdulator.com/40)</sup><sup> • </sup><sup>[7](https://proofwiki.org/wiki/40)</sup> Because a subset of its proper divisors (2, 8, 10, 20) sums exactly to 40, it is also a semiperfect number.<sup>[7](https://proofwiki.org/wiki/40)</sup>

**Other classifications.** 40 is a [Harshad number](https://www.edgepedia.org/harshad-number), divisible by its digit sum of 4, and a refactorable number, divisible by its own divisor count of 8.<sup>[5](https://nerdulator.com/40)</sup><sup> • </sup><sup>[6](https://cs.uwaterloo.ca/journals/JIS/colton/joisol.html)</sup> It is not a [Fibonacci](https://www.edgepedia.org/fibonacci), Lucas, perfect, or highly composite number, and it is not prime; the nearest primes are 37 and 41.<sup>[3](https://www.numberempire.com/40)</sup> In figurate terms it is the 4th octagonal number (\( 1 + 7 + 13 + 19 \)), the 4th pentagonal pyramidal number, and the 10th generalized pentagonal number.<sup>[7](https://proofwiki.org/wiki/40)</sup>

**Position among primes.** The 40th prime number is 173, and 40 itself sits in a prime gap of 1 between 37 and 41.<sup>[3](https://www.numberempire.com/40)</sup> The number also marks the length of the most famous prime-producing run in mathematics, discussed below.

## Euler's prime-generating polynomial

In 1772 [Leonhard Euler](https://www.edgepedia.org/leonhard-euler), the Swiss mathematician who shaped analysis and number theory, observed that the quadratic polynomial \( f(n) = n^{2} + n + 41 \) yields a prime for every integer \( 0 \le n \le 39 \), producing 40 different prime numbers from 41 up to 1601.<sup>[13](https://projecteuler.net/problem=027)</sup><sup> • </sup><sup>[14](https://www.cambridge.org/core/journals/mathematical-gazette/article/eulers-primeproducing-polynomial-revisited/1F76183BF30CECE688E31E8F10F37AC8)</sup> The streak fails exactly at 40: \( f(40) = 1681 = 41^{2} \), since \( 40^{2} + 40 + 41 = 40(40+1) + 41 \) is divisible by 41.<sup>[13](https://projecteuler.net/problem=027)</sup>

The run can be doubled. Shifting the variable gives \( n^{2} - 79n + 1601 \), which takes prime values for 80 consecutive integers, corresponding to Euler's 40 primes taken twice each.<sup>[14](https://www.cambridge.org/core/journals/mathematical-gazette/article/eulers-primeproducing-polynomial-revisited/1F76183BF30CECE688E31E8F10F37AC8)</sup> No polynomial with integer coefficients can produce primes for all integer values, a result shown by Goldbach in 1752, so long finite runs such as Euler's are the strongest form this property can take.<sup>[15](https://mathworld.wolfram.com/Prime-GeneratingPolynomial.html)</sup>

## Religious and symbolic use

In the Bible, next to the number seven, forty occurs most frequently, often as a round number or a concrete stand-in for "many".<sup>[16](https://www.jewishencyclopedia.com/articles/6248-forty-the-number)</sup> The 1915 *International Standard Bible Encyclopedia* noted that 40 is remarkably frequent in reference to periods of days or years, and suggested the usage may have originated in the idea that 40 years constituted a generation or the age at which a person attains maturity, an idea it attributed to the Greeks, the [Israelites](https://www.edgepedia.org/israelites), and the Arabs alike.<sup>[4](https://www.etymonline.com/word/forty)</sup>

The canonical examples are the forty days of rain at the Flood, the Israelites' forty years in the [Wilderness](https://www.edgepedia.org/wilderness), Moses' forty days on the mountain, the spies' forty days in Canaan, Goliath's forty-day challenge, and the forty days granted Nineveh for repentance in Jonah.<sup>[16](https://www.jewishencyclopedia.com/articles/6248-forty-the-number)</sup> Scholars of the [Hebrew Bible](https://www.edgepedia.org/hebrew-bible) describe 40 as a conventional number for major physical, social, or spiritual changes and for periods of trial or waiting, rather than a measure of precise time.<sup>[17](https://scielo.org.za/scielo.php?pid=S0259-94222020000400031&script=sci_arttext)</sup><sup> • </sup><sup>[18](https://www.thetorah.com/article/forty-a-biblical-symbol-for-completeness)</sup> The Christian season of Lent lasts forty days in memory of Christ's fast in the desert.<sup>[11](https://www.dictionnaire-academie.fr/article/A9Q0084)</sup>

## Culture, measure, and phrases

**Bodies called "The Forty".** The name has been given to various bodies of forty members: a judicial body in ancient Athens that tried small cases in rural districts, a court of criminal jurisdiction and two civil appeal courts in the Venetian republic, and the French Academy, also known as "The Forty Immortals".<sup>[2](https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Forty)</sup>

**Latitude and history.** The "roaring forties" is a sailor's name for the stormy region between the 40th and 50th latitudes north and south, applied especially to the North Atlantic portion; the "hungry forties" refers to the period just before the repeal of the corn laws in the United Kingdom.<sup>[2](https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Forty)</sup> In American history a forty-niner was an adventurer who went to California during the 1849 gold rush, and "forty winks" for a short sleep is attested from 1821.<sup>[4](https://www.etymonline.com/word/forty)</sup>

**Measurement.** There are 40 rods, poles, or perches in a furlong.<sup>[7](https://proofwiki.org/wiki/40)</sup> In computing, 40 is the ASCII code for the left parenthesis character.<sup>[19](https://calculator.name/101000-binary-to-hexadecimal)</sup>

## References

1. [forty - Wiktionary](https://en.wiktionary.org/wiki/forty)
2. [Forty, 1911 Encyclopædia Britannica, Wikisource](https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Forty)
3. [Properties of the number 40, Number Empire](https://www.numberempire.com/40)
4. [Forty - Etymology, Origin & Meaning, Online Etymology Dictionary](https://www.etymonline.com/word/forty)
5. [40: Number Facts, Properties & Conversions, Nerdulator](https://nerdulator.com/40)
6. [Refactorable Numbers - A Machine Invention, Journal of Integer Sequences](https://cs.uwaterloo.ca/journals/JIS/colton/joisol.html)
7. [40 - ProofWiki](https://proofwiki.org/wiki/40)
8. [feówertig, Bosworth-Toller Anglo-Saxon Dictionary](https://bosworthtoller.com/10484)
9. [Forty or Fourty: How do you spell 40?, Merriam-Webster](https://scrabble.m-w.com/grammar/is-it-forty-or-fourty)
10. [fourty - Wiktionary](https://en.wiktionary.org/wiki/fourty)
11. [quarante, Dictionnaire de l'Académie française, 9e édition](https://www.dictionnaire-academie.fr/article/A9Q0084)
12. [Factors of 40, Factor Calculator](https://factor-calculator.net/factors-of-40/)
13. [Problem 27: Quadratic Primes, Project Euler](https://projecteuler.net/problem=027)
14. [Euler's prime-producing polynomial revisited, The Mathematical Gazette (2024)](https://www.cambridge.org/core/journals/mathematical-gazette/article/eulers-primeproducing-polynomial-revisited/1F76183BF30CECE688E31E8F10F37AC8)
15. [Prime-Generating Polynomial, Wolfram MathWorld](https://mathworld.wolfram.com/Prime-GeneratingPolynomial.html)
16. [Forty, the Number, Jewish Encyclopedia](https://www.jewishencyclopedia.com/articles/6248-forty-the-number)
17. [The symbolic meaning of the number of days in the book of Jonah, Verbum et Ecclesia](https://scielo.org.za/scielo.php?pid=S0259-94222020000400031&script=sci_arttext)
18. [Forty: A Biblical Symbol of Completeness, TheTorah.com](https://www.thetorah.com/article/forty-a-biblical-symbol-for-completeness)
19. [101000 binary to hexadecimal, calculator.name](https://calculator.name/101000-binary-to-hexadecimal)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Numbers and algebra › Arithmetic and number systems › Integer sequences and partitions › Special and named integers › Named individual integers*

*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
