Number analysis
42
Douglas Adams's answer to the Ultimate Question in The Hitchhiker's Guide to the Galaxy.
Douglas Adams's answer to the Ultimate Question in The Hitchhiker's Guide to the Galaxy.
The number itself
- Value
- 42
- Digits
- 2
- Digit sum
- 6
- Reversed
- 24
- Palindrome
- No
4 + 2
Digit sum repeated until one digit remains; equals n mod 9 (with 9 for multiples of 9).
Reverses to 24.
Parity and primality
- Parity
- Even
- Prime
- No
- Prime factorisation
- 2 × 3 × 7
- Squarefree
- Yes
- Möbius μ(n)
- -1
- Nearest primes
- 41 ← → 43
Divisible by 2.
Composite — it factors as 2 × 3 × 7.
3 distinct prime factors, 3 with multiplicity.
No prime divides it twice.
(−1) to the power of 3 distinct prime factors.
A gap of 2 between them.
Divisors
- Aliquot sum
- 54
- Classification
- Abundant
1, 2, 3, 6, 7, 14, 21, 42
The proper divisors — everything except n itself.
Its proper divisors overshoot by 12.
How many integers from 1 to n share no factor with n.
Sums and additive structure
- Sum of two squares
- No
- Sum of three squares
- Yes
- Sum of four squares
- Yes
- Goldbach pair
- 5 + 37
A prime congruent to 3 mod 4 divides it an odd number of times, which rules it out.
Legendre's three-square theorem allows it.
Lagrange's four-square theorem: every non-negative integer is, without exception.
The smallest pair of primes summing to n. Goldbach’s conjecture says one always exists; it remains unproven.
Shapes and sequences
- Catalan number
- Yes — index 5
Digit curiosities
- Happy number
- No
- Harshad number
- Yes
- Collatz trajectory
- 8 steps to 1
Summing the squares of its digits falls into the 4 → 16 → 37 → … → 4 cycle.
Divisible by its digit sum 6 — 42 ÷ 6 = 7.
Peaks at 64 along the way.
Written other ways
- Binary
- 101010
- Octal
- 52
- Hexadecimal
- 2A
- Base 36
- 16
- Roman numerals
- XLII
- In words
- forty-two
- Scientific notation
- 4.2 × 10^1
Is 42 a prime number?
Composite — it factors as 2 × 3 × 7.
Nearby numbers
Other numeral systems
Beyond the bases and Roman numerals above, these notations write 42 their own way.
- Greek (alphabetic)
- ΜΒʹ
- Babylonian cuneiform
- 𒐏𒐖
- Tamil
- ௪௰௨
References
Further reading: Wikipedia · MathWorld · Wikidata
Notations, naming and the links above come from Wikidata, whose structured data is dedicated to the public domain under CC0-1.0. Retrieved 2026-10-07.