Champernowne Digits Generator
Generate digits of the Champernowne constant in any base (2-36). Extract digits from any position with direct mathematical computation.
About
The Champernowne constant C10 = 0.12345678910111213... is constructed by concatenating successive positive integers after the decimal point. It is one of the few explicitly constructible normal numbers - meaning every finite digit string of length n appears with limiting frequency 1Γ·10n in base 10. Champernowne proved normality in base 10 in 1933. Normality in one base does not imply normality in another. Misidentifying digit positions in this sequence leads to errors in pseudorandom sampling, statistical testing, and constructive analysis proofs. This generator computes exact digits using group-counting arithmetic rather than brute-force string concatenation, remaining accurate and efficient even at position 1015 and beyond.
The tool generalizes to any integer base b from 2 to 36, producing the Champernowne constant Cb. Note: computational limits apply. Browsers handle positions up to approximately 253 due to JavaScript's IEEE 754 double-precision integer ceiling. For cryptographic or high-precision research beyond that range, use an arbitrary-precision library outside the browser.
Formulas
The Champernowne constant in base b is defined as the real number formed by concatenating all positive integers written in base b after a decimal point.
To find the digit at position p (1-indexed from the first digit after the decimal point), we use the group-counting method. The k-digit numbers in base b contribute a total digit count of:
We subtract group sizes from p until the remainder falls within a k-digit group. Then we locate the exact number and digit within it:
Where prem is the remaining position after subtracting all complete groups of fewer than k digits, n is the integer containing the target digit, and d is the specific digit index within that integer (0-indexed from left).
The total number of digits contributed by all integers from 1 up to and including all k-digit numbers:
Reference Data
| Base b | Constant Name | First 30 Digits After Decimal | OEIS ID | Normality Proved |
|---|---|---|---|---|
| 2 | C2 | 0.1 10 11 100 101 110 111 1000... | A030190 | Yes (Champernowne, 1933) |
| 3 | C3 | 0.1 2 10 11 12 20 21 22 100 101... | A054635 | Yes |
| 8 | C8 | 0.1 2 3 4 5 6 7 10 11 12 13 14... | A030373 | Yes |
| 10 | C10 | 0.1 2 3 4 5 6 7 8 9 1 0 1 1 1 2... | A033307 | Yes (Original proof) |
| 16 | C16 | 0.1 2 3 4 5 6 7 8 9 A B C D E F... | A030374 | Yes |
| Digit Group Structure (Base 10) | ||||
| Digits k | Range | Count of Numbers | Total Digits in Group | Cumulative Digits |
| 1 | 1 - 9 | 9 | 9 | 9 |
| 2 | 10 - 99 | 90 | 180 | 189 |
| 3 | 100 - 999 | 900 | 2,700 | 2,889 |
| 4 | 1,000 - 9,999 | 9,000 | 36,000 | 38,889 |
| 5 | 10,000 - 99,999 | 90,000 | 450,000 | 488,889 |
| 6 | 100,000 - 999,999 | 900,000 | 5,400,000 | 5,888,889 |
| 7 | 1,000,000 - 9,999,999 | 9,000,000 | 63,000,000 | 68,888,889 |
| 8 | 10,000,000 - 99,999,999 | 90,000,000 | 720,000,000 | 788,888,889 |
| Digit Group Structure (Base 2) | ||||
| 1 | 1 | 1 | 1 | 1 |
| 2 | 10 - 11 | 2 | 4 | 5 |
| 3 | 100 - 111 | 4 | 12 | 17 |
| 4 | 1000 - 1111 | 8 | 32 | 49 |