On Wednesday, the Dow Jones Industrial Average (DJINDICES:^DJI) closed at 16,501.65. Bubbling just 0.8% below the intraday high set in early April, the blue-chip index didn't move very far. Disappointing wireless results and weak guidance from AT&T (NYSE:T) was the big news of that trading day, and the Dow ended the session down 12.72 points -- a mere 0.08% daily price change.

If you thought that was a flat Dow day, you were in for another ultra-bland market session the following day. Another tepid report from the telecom sector was balanced out by very healthy results from industrial machinery titan Caterpillar (NYSE:CAT).

And on Thursday night, the Dow closed at ... 16,501.65.

That's the exact same closing price two days in a row, down to the second decimal digit. The market just can't get any flatter than this, mathematically speaking.

So I had to wonder just how rare it is for the Dow to see this kind of exact closing-price matches. Sucking down two decades of daily closing prices from the St. Louis Federal Reserve Bank, I dove into the data armed with spreadsheets and programming know-how. This is what I found:

In the last 20 years, the Dow has come back to an old closing price -- to the second decimal point -- 14 times. That's 14 matches among 2,487 data points and two decades. But there's only one example of the same closing price happening two days in a row, and that was this week.

Most of the exact matches involved two dates fairly close to each other on the calendar. The daily squiggles of the Dow's random walk down Wall Street should generate a fair amount of similar prices, just because investors haven't changed their minds too much about how different the index value should be just a few days later.

Five of these 14 pairs fell within one month of one another, and only two were separated by a full year or more.

These two outliers are real doozies. One reaches from September 2004 all the way into November 2009. The other one matched a Dow value from June 2004 with a perfect mate in May 2010. Both spans stretch across the 2008 market crash, with stocks generally moving up in both the start and end of the matches.

Sure, all of this perfect-match information is of mostly academic interest. It's an exercise in math and statistics with little bearing on how to build your portfolio.

But if nothing else, it's a reminder that everything old eventually becomes new again. With delicious randomness, the long-stretch matches show that the Dow was perfectly capable of bouncing back from the 2008 subprime disaster, even if it took a couple years to rebuild index values last seen in 2004. And now we're back to exploring new Dow records again.

The lesson also applies to the Dow's components. Caterpillar took a bigger hit from the 2008 crash than anybody but the banks. Infrastructure construction projects were put on long-term hold and housing hit a brick wall. But Caterpillar also rebounded with vigor when money started flowing into construction projects again, and the stock has gained a market-beating 150% over the last decade -- with plenty of opportunities to find its own exact closing price matches along the way.

AT&T has largely acted as a proxy for the Dow, rising and falling pretty much in line with the index. That is, unless you account for the telecom's often index-leading dividend yields. Investing those payouts along the way is the only avenue to unlock the full value of AT&T's success in the smartphone era.

Not shown in this chart, dividend reinvestments would have delivered a 100.6% 10-year return in a Dow Jones-tracking security. Doubling your returns via dividends is great, but not quite as cool as nearly quadrupling them, which is what AT&T did.

T Chart

T data by YCharts.

Long story short, diving into the Dow's history of perfectly matched closing prices was a useful reminder of just how resilient the stock market is in the long run. The next time the market is crashing, make sure you don't sell all your stocks -- and miss the inevitable rebound.