Skip to content

Commit 0c1c3bb

Browse files
author
f@bi.an
committed
docs: add comprehensive section on numerical patterns and formulas
1 parent 522e125 commit 0c1c3bb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/tech/art/numbers/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Numbers
2+
3+
| name/number | formula | explaintion |
4+
|----------------------------------|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
5+
| “Swap-tail” product (base 10) | `123456789 × 8 = 987654312` | Multiplying the ascending digits by 8 yields the descending digits with the last two swapped. Similar patterns hold in other bases (e.g., hex). |
6+
| Base-n reverse trick (exact) | `sequence × (n − 2) + (n − 1) = reverse(sequence)` | For base `n`, taking `123…(n−1)` and applying the formula gives `…321`. Works for n=6…16 (and generally). |
7+
| Ratio close to integer (general) | `N_desc/N_asc = (b − 2) + (b − 1)^3 / (b^b − b^2 + b − 1)` | Exact expression for the “almost integer” ratio of descending to ascending digits in base `b`. The fractional term shrinks ~like `1/b^{b−3}`. |
8+
| Handy approximation | `N_desc/N_asc ≈ (b − 2) + (b − 1)^3 / b^b` | Replace the denominator with `b^b` for a mental-math approximation; it slightly underestimates the exact value. |
9+
| Decimal special case | `987654321 / 123456789 = 8 + 729 / 9,999,999,909` | From the general formula with `b=10`; the error term is `9^3/(10^{10}−91) ≈ 7.29×10⁻⁸`. |
10+
| Hex special case | `0xFEDCBA987654321 / 0x123456789ABCDEF = 14 + 1/5465701947765793` | Exact fractional “tail” in base 16; it’s tiny (needs ~52 bits), hence floats round to 14.0. |
11+
| Exact integer “fix” (base 10) | `(987654321 − 1) / (123456789 + 1) = 8` | Nudge numerator down 1 and denominator up 1 to make the ratio exactly 8. Works analogously in other bases. |
12+
| Missing-8 series value | `0.12345679… = 10/81`, `0.98765432… = 80/81` | The repeating decimals with the “8” omitted equal tidy fractions; follows from geometric-series sums. |
13+
| Geometric/derivative identity | `∑_{k≥1} kx^k = x/(1−x)^2` | Used to show `0.123456… = 10/81` by plugging `x=1/10`. |
14+
| Classic calculator trick | `12345679 × (9×d) = ddddddddd` (for `d=1…9`) | Because `111,111,111/9 = 12,345,679`; multiplying by `9d` yields 9 identical digits `d`. |
15+
| Palindromic square | `111…1 × 111…1 = 123…(n)…321` | E.g., `1111×1111 = 1234321`; the peak digit equals the number of 1’s. |
16+
| “+9 away” observation | `123456789×8 = 987654312` is 9 off from perfect order; `12345678×8 = 98765424` is also 9 off | A small, repeated “+9” deviation shows up when the last two digits flip. |

0 commit comments

Comments
 (0)