news.volyx.in

987654321 / 123456789 (johndcook.com)

637 points by ColinWright · 272 days ago · 107 comments on HN

Article summary

The article explores the observation that the ratio of 987654321 to 123456789 is very close to 8, and investigates whether this is a unique property of base 10. The author finds that a similar phenomenon occurs in other bases, with the ratio being close to b-2 in base b. A Python script is used to demonstrate this for bases up to 1000. The article also discusses the fractional part of the ratio and how it relates to the base.

Main themes

  • Mathematical curiosities
  • Number theory
  • Base systems
  • Floating point arithmetic
  • Mathematical proofs

What commenters say

  • The observation that 987654321 divided by 123456789 is close to 8 is a special case of a more general phenomenon that occurs in other bases.
  • The ratio of the numbers formed by concatenating digits in descending and ascending order in base b is approximately b-2, with a fractional part that can be calculated using algebra.
  • The use of infinite series and polynomials can provide an intuitive understanding of the phenomenon, but may not be the most straightforward approach.
  • The observation is related to the properties of repeating decimals and the representation of fractions in different bases.
  • The error term in the approximation of the ratio is integer and dominant only in the case of base 2, where the ratio is exactly 1.
  • The phenomenon can be understood using simple algebra and the properties of geometric series, without requiring advanced mathematical concepts.
  • The discussion highlights the importance of considering the limitations of floating point arithmetic when working with mathematical curiosities like this one.