Tool to search digits or digits patterns (id number, birth date, etc.) in the decimals of some numbers (Pi, e, square root of 2 etc.)
Search in Decimals - dCode
Tag(s) : Mathematics, Fun/Miscellaneous
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The decimal digits of a number are the digits located after the decimal point in its base-10 representation.
A real number can have two types of decimal expansion:
A rational number (such as $ \frac{1}{2} = 0.5 $ or $ \frac{1}{3} = 0.333\ldots $) has either a finite number of decimal digits or a periodic expansion (a sequence of digits that repeats indefinitely).
An irrational number (such as $ \pi $ or $ \sqrt{2} $) has an infinite and non-periodic decimal expansion, meaning there is no repeating pattern.
Therefore, infinitely many numbers have infinitely many decimal digits, but only irrational numbers have infinite non-repeating decimals.
The constants available on dCode are computed with up to 10000000 (ten million) decimal digits.
Finding a pattern in the decimal digits of a number depends on the nature of the number.
For a rational number, a pattern necessarily exists if the expansion is periodic, and it can be determined analytically.
For an irrational number, there is generally no repeating pattern. The digits appear to be distributed without apparent structure.
In some specific cases (such as $ \pi $ or $ e $), mathematicians conjecture that their digits behave like a random sequence (this is called a normal number).
In practice, to search for a given pattern (for example a sequence of digits), the user must scan the digits sequentially using a search algorithm.
Example: Example: searching for the birth date 18/08/1998 in pi, the number 18081998 can be found at position 794769.
dCode considers the first decimal digit 1 in pi = 3.14159 to be at position 1. Other programs may use position 0, or position 2 (where the digit 3 before the decimal point is considered position 1).
A real number is said to be normal (sometimes incorrectly referred to as a universal number) if, in its decimal expansion, all finite sequences of digits appear with the expected frequency.
Thus, in a normal number in base 10: each digit from $ 0 $ to $ 9 $ appears about $ 10\% $ of the time, and each pair of digits appears about $ 1\% $ of the time, and so on.
In other words, every finite combination of digits appears somewhere in its decimal expansion.
Mathematicians conjecture that constants such as $ \pi $, $ e $, or $ \sqrt{2} $ are normal, but this has not yet been proven.
dCode retains ownership of the "Search in Decimals" source code. Any algorithm for the "Search in Decimals" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Search in Decimals" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Search in Decimals" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Search in Decimals" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Search in Decimals on dCode.fr [online website], retrieved on 2026-05-16,