987654321 / 123456789

A curious numerical coincidence—987,654,321 divided by 123,456,789 being extremely close to 8—leads to explorations of why certain digit patterns in base‑10 and other bases produce near-integer ratios. Commenters derive exact algebraic formulas, connect the behavior to geometric series and generating functions, and generalize the result to arbitrary bases, showing the error shrinks rapidly as the base grows. Along the way, they contrast computational checks with formal proofs, touch on floating‑point precision limits, and share related number curiosities like missing digits in decimal expansions and classic calculator tricks.

Near-integer ratio and related curiosities

  • Thread centers on why 987654321 / 123456789 ≈ 8.0000000729 and similar “almost integer” coincidences.
  • People compare it to other near-integer expressions like e^π - π ≈ 20, noting that some have deep reasons while others seem more mysterious.
  • A simple approximate argument is: adding 123456789 twice to 987654321 gives ~10×123456789, so the ratio should be close to 8.

Series and exact rational explanations

  • Several comments analyze recurring decimals 0.123456… and 0.987654… as infinite series:
    • Show 0.123456… = Σ k·10⁻ᵏ = 10/81, via geometric series and derivatives or via squaring (1/9).
    • Then 0.987654… = 1 − 0.012345… = 1 − 1/81 = 80/81, giving an ~8 ratio.
  • 1/81 = 0.012345679… is discussed; the missing 8 is explained by carries in …789(10)(11)… causing 8→9 and eliminating an 8 and an extra 0.
  • Multiple equivalent derivations are compared; some find the “intuitive” ones less obvious than implied.

Base‑b generalization and formulas

  • The pattern is generalized to base b, with ascending digits 123…(b−1) and descending (b−1)…321.
  • Definitions of num(b), denom(b) are given and the exact identity
    num(b)/denom(b) = (b−2) + (b−1)³ / (bᵇ − b² + b − 1)
    is derived and also expanded via geometric series.
  • Approximation (b−2) + (b−1)³ / bᵇ is shown to have very small relative error ~(b²−b+1)/bᵇ; examples for bases 8, 9, 10, 16 illustrate how error shrinks with larger b.
  • Edge cases like b=2 and b=3 are explored; special behavior in base 2 is discussed.

Patterns in products and calculators

  • Noted patterns:
    • 12345679×8 = 98765432 and 123456789×8 ≈ 987654312 (swap of last two digits).
    • General base‑n formula: ascending-sequence×(n−2) + (n−1) = descending-sequence.
    • Classic calculator tricks: (1…1)² giving palindromes (111×111=12321), and 12345679×(9k)=k repeated 9 times.
  • “Center of mass” keypad patterns via averaging digit-wise (e.g., (147+369)/2 = 258) are discussed; some see them as trivial per-digit averages, others as delightful numerological structure.

Floating point, exact arithmetic, and scripts vs proofs

  • Comments link to floating-point references and show using arbitrary precision / rational arithmetic (e.g., Python’s Fraction) to get exact decompositions like 14 + 1/5465701947765793.
  • Discussion on using scripts to support proofs: scripts catch different errors than proofs and make details explicit, but aren’t substitutes for formal, explanatory proofs.
  • Brief digression on Curry–Howard and what exactly “code as proof” does and doesn’t mean.

Meta and aesthetics

  • OEIS entries are used to categorize “error terms”; curiosity about an OEIS-like resource for analytic observations.
  • Several remarks frame these coincidences as examples of the “fun”, “hidden magic”, and imperfect beauty of mathematics.