I shuffled 60 songs a million times. 99.5% put the same artist back-to-back

You tap shuffle. Two songs later, the artist you just heard is back. The button is clearly broken, or promotional, or harboring a small personal grudge.

There is another possibility: the shuffle is being scrupulously fair.

I made a synthetic playlist with 60 unique songs: six tracks each from ten imaginary artists. Then I used Python's standard shuffle to generate one million random orders. I was not modeling Spotify, Apple Music, or anybody's recommendation system. This was the plain question underneath them: if every ordering of those 60 songs is allowed, how often will the same artist appear twice in a row?

shuffles tested:                         1,000,000
with an adjacent same-artist pair:         994,611
share:                                     99.4611%
mean adjacent same-artist pairs:             4.9982
with a run of 3+ by one artist:             27.6273%

A back-to-back artist repeat was not an unlucky edge case. It appeared in more than 99 out of every 100 shuffles.

Randomness is permitted to clump

The average result contained almost exactly five adjacent same-artist pairs. That number is not a simulation accident. Pick any neighboring pair of positions. Once the first song lands, five of the remaining 59 songs belong to the same artist, so the chance of a match is 5/59. There are 59 neighboring pairs. Multiply them and the expected count is five.

That expectation does not say every shuffle has five repeats. In 5,389 of my million trials, no artist repeated consecutively at all. At the other end, 27.6% contained at least one run of three or more songs by the same artist. One especially committed shuffle put all six songs from an artist together. Twenty-one trials did that somewhere.

The playlist was intentionally tidy. Real libraries have artists with one track and artists with fifty, plus albums, genres, moods, skips, and the inconvenient fact that a listener remembers yesterday. Those details can raise or lower the clustering. The experiment isolates one point: even a perfectly balanced playlist does not spread itself evenly when shuffled.

The fair result can feel rigged

This mismatch has been studied beyond music. In a 1997 review and set of experiments, Ruma Falk and Clifford Konold found that people asked to invent random sequences tended to alternate more than chance would produce. They also judged overalternating sequences as especially random. Their explanation centered on how difficult a sequence is to mentally encode: obvious runs feel like a pattern, while irregular alternation is harder to compress into a quick description. The University of Massachusetts hosts a summary and the paper.

It would be too neat to conclude that humans simply fail Probability 101. A later re-examination by Paul Warren and colleagues found that human-generated sequences can resemble random ones much more closely when the comparison accounts for finite experience, attention, and short-term memory. A listener does not experience a playlist as all 60 positions at once. The listener hears a moving window and notices the singer who has returned before the coffee has cooled.

In that window, “random” often means varied. That is a preference, not a theorem.

Shuffle buttons quietly choose a definition

Spotify described this product problem in 2025. Its Standard Shuffle assigns random values to tracks and orders them accordingly. Its default Fewer Repeats mode for Premium users generates multiple random sequences, scores them according to how recently songs and artists were heard, and chooses the freshest candidate.

Each candidate may be random, but the final selection has a deliberate preference. Recently heard material is less likely to appear early. That is not a scandal hiding inside the shuffle button. It is the button doing the job many listeners thought they requested: surprise me, but do not make me suspicious.

There is no neutral escape here. Pure shuffle treats every ordering fairly and produces clumps. A de-clumped shuffle treats some valid orderings as better than others. One honors the lottery; the other honors the complaint.

After a million trials, I have more sympathy for both. The listener who hears the same artist twice has noticed something real. The algorithm that produced it may still be innocent. Randomness has no ear for pacing, and it has never once worried that the person holding the phone might take a coincidence personally.

Sources