A clear acrylic lottery ball machine filled with white numbered balls, and every single ball is printed with the number 17

Why does AI always pick 17?


Ask a chatbot for a random number between 1 and 25, and there’s a good chance you’ll get 17. Try it on a second chatbot and you’ll probably get 17 again. It feels like you’ve found a loose thread in the machine, and pulling it is fun.

Then you find someone online insisting the answer is always 27. Someone else swears it’s 73. A fourth person has screenshots showing 37.

They’re all telling the truth, and the fact that they disagree is the actual answer.

The essentials

  • The number isn’t fixed. It follows the range you asked for: 17 for small ranges, 27 for 1 to 50, and 37, 47 or 73 for 1 to 100. Only the last of those has been properly counted.
  • That’s the giveaway. Nothing is being rolled or drawn. The chatbot is predicting which number a person would have written next.
  • The “MIT study” that supposedly proves 17 is the least random number doesn’t appear to exist. The trail ends at a dictionary of programmer slang that calls it a possible in-joke.

So does AI always pick 17?

No. It picks 17 when you give it a small range. Change the range and the favorite changes with it. Here’s how the commonly repeated answers line up, and where each one comes from:

RangeUsual answerEvidence
1 to 25 / 1 to 3017What people report online, in forum threads and screenshots
1 to 5027IFLScience got it from ChatGPT, Claude, Gemini and Copilot alike
1 to 10037, 47 or 73Measured in a 2025 study of 75,600 requests

Worth being straight about that last column: only the bottom row has been counted properly. The 17 and the 27 are things a lot of people have noticed and posted about. That makes them interesting, not measured.

But the pattern across the rows is the point. If a chatbot were reaching into a hat, the range wouldn’t matter. The number moves because the range moves.

Why does the number change with the range?

Because the chatbot isn’t picking a number. It’s finishing a sentence.

A chatbot is built to predict what text comes next. Feed it “a random number between 1 and 25 is” and it works out which characters are most likely to follow, based on the enormous pile of human writing it learned from. It has no dice and no hat. Asking it for a random number is like asking a very well-read parrot to be spontaneous.

So the question it’s really answering is: what number would a person have put here? And people, it turns out, are extremely predictable about this.

That’s also why the range changes the answer. Somebody writing “pick a number between 1 and 10” in a book or a forum post reaches for a different number than somebody writing “between 1 and 100.” The chatbot inherited both habits, filed separately.

The same machinery drives a much more annoying habit: why ChatGPT makes things up. Plausible-sounding is the goal. True, or in this case actually random, is not.

Why 17 and not 20?

Because 17 survives a filter your brain runs without telling you.

Think about what a stage magician does with “think of a number.” You skip the ends, because 1 and 25 feel like cheating. You skip round numbers, because 10 and 20 feel too tidy. You skip doubles like 11 and 22 for the same reason. What you want is something a bit odd and a bit off-center. That’s a small pile of numbers, and 17 sits right in the middle of it.

An overhead photograph of a wooden desk covered in small torn paper slips, each with a number handwritten in pencil, and most of them reading 17
Ask a room full of people for a random number and the slips pile up on a handful of values. Chatbots learned from writing produced by that same room.

The 2025 study found the same fingerprint at every size it tested. The favorites were 3 and 4 for a range of 1 to 5, then 5 and 7 for 1 to 10, then 37, 47, 73 and 42 for 1 to 100. Nearly all of them are prime numbers, meaning they don’t divide evenly by anything except themselves and 1. A prime has no visible structure, so it reads as random. The odd one out is 42, and it’s there for a completely different reason: it’s the joke answer from The Hitchhiker’s Guide to the Galaxy.

None of this is the machine being strange. It’s the machine being an extremely accurate mirror.

Is there really an MIT study about 17?

No. We went looking for it, and the trail ends in a joke. That hasn’t stopped almost every page explaining the 17 thing from repeating it.

The claim is that MIT ran a study, asked people for a random number between 1 and 20, and found 17 came up most. Hence the nickname: “the least random number.”

Here’s where the trail actually goes. Wikipedia’s page on the number 17 says it “was described at MIT as ‘the least random number’” and then hedges with the word supposedly. Its source isn’t a study. It’s the Jargon File, a long-running dictionary of programmer slang. And the Jargon File entry says 17 has been “long described at MIT as ‘the least random number’” before adding that this “may be Discordian in origin, or it may be related to some in-jokes about 17 and ‘yellow pig’ propagated by the mathematician Michael Spivak.”

Discordianism is a joke religion. The yellow pig is one mathematician’s private running gag. No paper. No sample size. No method.

A worn hardback dictionary lying open on a dark desk under a warm lamp, with a magnifying glass resting on the page and dust motes visible in the beam of light
Follow the famous MIT study to its source and you arrive at a dictionary of programmer slang that flags itself as a possible in-joke.

It’s a piece of campus folklore that got repeated until it started wearing a lab coat, and now it’s the standard explanation for a chatbot behavior that didn’t exist when the folklore was written.

Here’s the twist, though. That same Jargon File page has an entry for 37, and it says the most commonly chosen number is 37 when people are polled for a “random number between 1 and 100.” That’s exactly what the 2025 study went on to measure. The folklore had the pattern right the whole time. What it never had was a citation.

What did the one real study actually find?

That the favorite number changes with the range, and that the language you ask in changes it too.

In February 2025, Javier Coronado-Blázquez posted a preprint called Deterministic or probabilistic? The psychology of LLMs as random number generators. A preprint is a study shared publicly before other scientists have formally reviewed it, so treat it as strong evidence rather than a settled verdict. The setup was six models, seven languages, three ranges and six creativity settings, for 75,600 separate requests. Worth knowing who’s in it: four of the six are small open models most people have never run, and only two, Gemini 2.0 and GPT-4o-mini, are chatbots you’d recognize.

Two findings stand out.

The first is how lopsided the results were. Three of the six models answered 7 to “pick a number between 1 and 10” in roughly 80% of all cases. Not a lean. A landslide.

The second is stranger. The language you ask in changes the answer. The study varied a setting called temperature. It nudges a model toward less likely words. At the highest temperature it tried, one model asked in English still replied 7 in 100% of cases. Asked in French, same model, same question, same setting: about 57%. Cranking the creativity dial to maximum didn’t shake the habit loose. Changing the language did.

One honest caveat, since we’re being picky about sources. That study tested ranges of 1 to 5, 1 to 10 and 1 to 100. It never tested a range containing 17. So it explains the behavior beautifully and it does not, by itself, prove anything about 17 specifically, no matter how many articles cite it as if it did.

You’ll also see it claimed that 27 has “a 30% probability” of being chosen. We couldn’t find any source or method behind that figure. It appears to have started in a blog post and been copied since.

How do you get a random number out of a chatbot?

If your chatbot can run code, ask it to. Something like “write and run a program to pick a random number between 1 and 100” hands the job to a real random number generator instead of the text-prediction machinery. Most of the big chatbots can do this now. The number then comes from an actual generator rather than a guess about what you expected to see.

If it can’t, use something built for the job. Type “random number generator” into Google and the results page has one built in.

One more thing, and this one matters more than a party trick: don’t ask a chatbot to make up a password. It’s running the same next-token prediction there, so the result isn’t random even though it looks it. Use a password manager.

For the bigger picture on why chatbots behave this way, our guides on how AI actually works and what a large language model is cover the same machinery without the math. There’s more in AI Explained, including the other quirk with a measurable answer: why AI uses so many em dashes.

The 17 thing is a good party trick. It’s also the clearest demonstration you’ll get, in about five seconds, of what these tools are really doing when they sound like they’re thinking.

About the pictures: all three images here were generated with AI for this article. They’re illustrations, not photographs of anything real. Nobody ran a lottery machine loaded entirely with 17s, and nobody laid out that desk of paper slips. In a piece about checking where things actually come from, it would be odd not to say so.

Frequently asked questions

Why does ChatGPT keep picking 73?

73 is one of the numbers that dominate the 1 to 100 range, along with 37 and 47, according to a February 2025 preprint that made 75,600 requests to six different models. All three are prime numbers. That fits the pattern across almost every range the study tested: a prime doesn't divide evenly by anything except itself and 1, so it has no obvious structure, and both people and the models trained on their writing read that as looking random.

Is there really an MIT study saying 17 is the least random number?

We could not find one. The claim traces back to the Jargon File, a dictionary of programmer slang. It says 17 was 'long described at MIT as the least random number' and then adds that this may be Discordian in origin, or related to in-jokes about 17 and 'yellow pig' propagated by the mathematician Michael Spivak. Wikipedia repeats the claim with the word 'supposedly' and cites the Jargon File rather than any study. No paper, no sample size, no method.

Does turning up the creativity setting fix it?

Not reliably. Some tools expose a setting called temperature, which nudges a model toward less likely answers. In the 2025 preprint, at the highest temperature tested, one model asked in English for a number between 1 and 10 still answered 7 in 100% of cases. The same model asked in French answered 7 about 57% of the time. Raising the setting helped some models and made no real difference to others.

How do I get a genuinely random number from a chatbot?

Ask it to write and run a small program to do it, if your chatbot can run code. That hands the job to a real random number generator instead of the text-prediction machinery. If it can't, type 'random number generator' into Google and use the one built into the results page. And don't ask a chatbot to invent a password: it's running the same next-token prediction, so the result isn't random even though it looks it.