Write a number using the digits k, k−1, …, 2, 1, 0 in decreasing order, or 1, 2, …, k in increasing order, each exactly once, with joining of digits (as in 54 or 876), + − × ÷, powers and factorials. Each row of the pyramid adds one more digit, from the smallest possible k up to k = 9.
Interval mode builds one pyramid per number, up to 100 numbers at a time.
For each N the scan finds the smallest k and checks every row up to k = 9. Uses the options from the Pyramid tab. Up to 5 000 numbers per scan. Click a row to open its pyramid.
| N | Smallest k | Rows found | Missing rows | First row |
|---|---|---|---|---|
| Press Scan to fill this table. | ||||
The Excel file has two sheets: Pyramids (one row per k) and Summary (smallest k and which rows exist).
The rule. For a chosen k, the digits k, k−1, …, 2, 1, 0 are written in this decreasing order, each exactly once. Neighbouring digits may be joined into one number (54, 321, 876, 10). Between the numbers we may use +, −, ×, ÷, powers, factorials and brackets.
Increasing order. The digits 1, 2, …, k are written in increasing order, each exactly once. A leading 0 cannot start a joined number and adds nothing on its own, so it is left out; with the option "Increasing with 0!", the row starts with 0! = 1, as in 0! + 1 + 2 + 34 = 38.
Why decreasing. In increasing order the first digit would be 0, which cannot start a joined number and contributes nothing unless written as 0! = 1. In decreasing order the 0 comes last, where it is useful: × 0! (multiply by 1), + 0! or − 0! (add or subtract 1), joined as 10, or + 0.
The pyramid. Starting from the smallest k that works for N, each new row uses one more digit, up to k = 9, where all ten digits 9 8 7 6 5 4 3 2 1 0 appear.
Notation. A repeated factorial is written in full, (3!)! = 6! = 720 or ((2 + 1)!)!, so it cannot be confused with the double factorial 3!! = 3 × 1. 3!2 means (3!)2 = 36. Multiplication and division are read from left to right.
Fair use of 0. By default x0 = 1 and multiplying a long block of digits by 0 are not allowed, because they would let any digits disappear. A single digit times 0, such as 1 × 0, is allowed. Both tricks can be switched on in the options.
Search. For each k, the generator first collects the values every block of consecutive digits can produce (exact fractions, kept within safe bounds), then searches for N by splitting the digit string into two parts and matching values. For k ≤ 4 the search is complete, so "none exists" is certain. For larger k the search keeps the simplest values of each block, so "none found" means none was found, not that none exists. The first use of each k takes a few seconds (up to about 15 seconds for k = 9); after that every number is answered in milliseconds.
Check. Every displayed row is evaluated again from its text, and its digits are checked to read k, k−1, …, 0 in order (✓).
The work is due author's following publications: