987654321 / 123456789
The ratio 987654321 / 123456789 is very nearly 8. What about the analogous ratio in other bases?
Companies come to us for help data analysis and data privacy. Clients have included Amazon, Google, Microsoft, law firms, start-ups, and smaller businesses.
Visit johndcook.com → RSS feedOn Hacker News Jan 2010 – Sep 2026
Math & Algorithms 44Software Engineering 24Life, Learning & Writing 11Career & Management 11Science & Space 9Programming Languages 6
The ratio 987654321 / 123456789 is very nearly 8. What about the analogous ratio in other bases?
A handy rule of thumb for creating a confidence interval for the probability of an event you haven't seen happen yet.
The math behind how people wait in line
As n increases, the distance from phi^n to the nearest integer decreases exponentially where phi is the golden ratio.
Heights are normally distributed because height is determined by many factors. But why are other things with many inputs not normally distributed?
How to manually test whether a large number is divisible by 7, 11, and 13 all at the same time.
A paper on Kalman filtering and functional folds that I alluded to previously has been split into several papers and posted online.
Charles Dodgson (a.k.a. Lewis Carroll) developed a method of computing determinants which has some practical advantages.
Many times on this blog I've argued that the difference between pure and applied math is motivation. As my graduate advisor used to say, “Applied mathematics is not a subject classification. It's an attitude.” Traditionally there was general agreement regarding what is pure math and what is applied. Number theory and…
The distances to the planets are fairly evenly distributed on a logarithmic scale, not only in our solar system but in extrasolar systems as well.
An impressive poster summarizing biochemical pathways reminds us how complex life is, and how interconnected the world is.
The applied math classic Courant & Hilbert was banned in Nazi Germany. The US seized the copyright and published an English edition.
Deriving the basic mathematical properties of the Smith chart from electrical engineering
Physicist Lev Landau used to play a mental game with Soviet license plates [1]. The plates had the form of two digits, a dash, two more digits, and some letters. Rules of the game His game was to apply high school math operators to the numbers on both side of the dash so that the
For every n, there is a base b such that n! = b^n. The relation between n and b(n) is surprisingly close to linear.
A family of infinite sums that evaluate to rational numbers, sometimes integers, and and effective algorithm for finding the sum.
Here are ten things about numerical linear algebra that you may find surprising if you're not familiar with the field. Numerical linear algebra applies very advanced mathematics to solve problems that can be stated with high school mathematics. Practical applications often require solving enormous systems of…
The familiar quadratic formula can give the wrong answer in a program due to numerical precision issues. This post shows what can go wrong and how to fix it. Especially important in low-precision arithmetic.
Functions include in the standard C math library that seem unnecessary at first glance and why they are necessary.
When Mathematica seems to not to know how to simplify an expression, it may be doing the right thing, being more sophisticated than you expect.
The informal definition of an elliptic curve is simple. The formal definition is more involved.
In hyperbolic geometry, the sum of a the interior angles of a triangle can be any value less than π. If the sum is zero the triangle has area π.
One attempt at rationalizing astrology is to say that the gravitational effects of celestial bodies impact our bodies. To get an idea how hard the stars and planets pull on us, let's compare their gravitational attraction to that of cows at various distances. Newton's law of gravity says that the gravitational…
The eigenvectors of a circulant matrix do not depend on the matrix itself, only on the size, and the eigenvectors are columns of the FFT matrix.
There is hardly ever a good reason to invert a matrix. What do you do if you need to solve Ax = b where A is an n x n matrix? Isn't the solution A−1 b? Yes, theoretically. But that doesn't mean you need to actually find A−1. Solving the equation Ax = b is
Ramanujan came up with an approximation for factorial that resembles Stirling's famous approximation but is much more accurate. As with Stirling's approximation, the relative error in Ramanujan's approximation decreases as n gets larger. Typically these approximations are not useful for small values of n. For n = 5…
Prime powers have a kinda chaotic pattern in their bits. We bootstrap this idea into a good random number generator, recapitulating history.
Any Boolean function can be computed with Tofolli gates, and Tofolli gates are reversible, and so any Boolean function can be computed reversibly.
Generating primes using the Buenos Aires constant.
Clever tricks used by medieval astronomers to tabulate sines at every degree, before calculators and before calculus.