Why AI keeps picking 17
Ask an AI to pick a number from 1 to 30 and 17 appears suspiciously often. That small quirk reveals a much bigger lesson about how language models work.
“Pick a number between 1 and 30.”
There is a good chance an AI chatbot will answer 17.
Open a new chat and try it. Then try another model. Seventeen appears often enough that it feels like the machines are sharing an inside joke.
They are not. They are doing something more useful to understand: producing an answer that looks random without actually drawing from a uniform random process.
The short answer
A language model is not a random-number generator. It is a plausible-answer generator.
When you ask for a number, the model predicts which response best fits the words that came before it. Numbers such as 17 have accumulated the cultural texture of randomness. Seventeen is odd, prime, away from both ends of the range, not a multiple of five, and contains the perennially popular 7.
That explanation is not a proven recipe inside every model. Different models, prompts, languages, and settings produce different favorites. But the broader pattern is well supported: language models repeat a narrow set of “random-looking” numbers far more often than a fair draw should.
Seventeen is the tell. Prediction is the mechanism.
Seventeen was already a human habit
AI did not invent our affection for 17.
In a 2007 online poll, 347 people were asked to think of a random number between 1 and 20. Sixty-two chose 17—nearly 18 percent of the responses. A uniform draw would select it about 5 percent of the time.
That was an informal online poll, not a definitive psychological study, but it captures a familiar problem: people are bad at deliberately behaving randomly. We avoid endpoints, round numbers, obvious sequences, and recent repetitions. In trying to look unpredictable, we become predictably unconventional.
Language models learn from enormous collections of human-produced text and are tuned to produce answers people find useful and natural. It should not surprise us when they inherit our idea of what a random answer is supposed to look like.
The model is not thinking, “17 is mathematically more random.” It has learned that 17 is a very plausible continuation after a request for a random-looking number.
Random output is not a random process
If a system chooses uniformly from the integers 1 through 30, every number has the same probability:
1 ÷ 30 = 3.33 percent.
The process may still produce 17 several times in a row. Randomness does not promise an even result in a small sample. It promises that the selection mechanism gives every valid number the specified chance on every draw.
A language model makes no such promise.
Research published in 2025 tested six language models across multiple number ranges, prompt languages, and temperature settings. The models frequently concentrated on a few preferred values. In the 1-to-10 test, 7 dominated many configurations; some models returned it in roughly 80 percent of cases. In the 1-to-100 test, low-temperature configurations sometimes produced only one value despite having 100 choices.
A larger 2026 study audited 11 models across 15 statistical distributions. When the researchers made 1,000 independent requests, 10 of the 11 models failed every distribution test. The researchers’ conclusion was direct: current language models need external tools when an application requires statistical guarantees.
That is the important distinction:
- A random-looking answer feels surprising to a person.
- A random process follows a defined probability distribution that can be tested.
Seventeen passes the first test. An unaided chatbot usually fails the second.
Turning up the temperature does not make it fair
Language models often have a setting called temperature. Increasing it generally makes lower-probability tokens more likely, which can make responses more varied.
That is not the same as making the integers 1 through 30 equally likely.
Temperature changes how the model samples from its learned token probabilities. It does not replace those probabilities with a uniform distribution over the numbers you named. The 2025 study found that higher temperature improved variety for some models and languages, while making little difference for others. The favorite values often remained visible.
More variation is not proof of fair sampling.
The prompt matters too. “Pick a number,” “generate a random integer,” and “simulate a uniform draw” can lead to different outputs. Asking repeatedly in one conversation is also different from making independent requests because the previous answers become context. Even the language used in the prompt can change the distribution.
If the behavior changes when you translate the request, reword the sentence, or mention the previous choice, you are observing language generation—not a dependable source of randomness.
A tiny quirk can become a real system bias
Nobody is harmed when a chatbot picks 17 during a party game. The problem begins when a team assumes the same mechanism is safe inside a workflow.
Consider an AI system asked to:
- assign customers to experiment groups;
- select transactions for an audit sample;
- choose which test case runs next;
- distribute correct answers across a multiple-choice assessment;
- generate synthetic people using a target demographic distribution.
If the model favors familiar or “representative” choices, the output can look varied while remaining systematically skewed. The 2026 study demonstrated this downstream effect in multiple-choice answer positions and demographic targets for image prompts.
The failure is easy to miss because every individual result looks reasonable. Bias appears only when someone measures the distribution across many results.
This is a recurring pattern in AI systems. A model can produce a credible instance without reliably satisfying a system-level requirement. It can write a convincing answer without being accurate, recommend a sensible action without following policy, or create diverse-looking examples without meeting a defined distribution.
Plausibility is valuable. It is not a control.
Give the random job to a random tool
The fix is simple: separate language work from statistical work.
Use the language model to understand the request, explain the result, or incorporate a selected value into a larger response. Use a real random-number generator to make the selection.
For a casual application, that may be the random function provided by the programming language. For security-sensitive choices—tokens, passwords, winners, financial samples, or anything adversaries might exploit—use a cryptographically secure generator. For experiments or simulations that must be reproduced, use an explicitly seeded generator and record the seed, algorithm, and configuration.
The architecture should make the boundary visible:
- The application validates the requested range or distribution.
- A dedicated tool generates the value.
- The model receives that value as data.
- The system logs enough information to verify the process when the outcome matters.
Do not ask the model to sound random and then treat the answer as evidence that it was random.
The leadership lesson hiding inside 17
Seventeen is funny because the task is so small. It is also a clean demonstration of why AI systems need more than a prompt.
A language model is optimized to produce a useful continuation. The business may need a fair allocation, a policy-compliant decision, an auditable sample, or a repeatable calculation. Those are different requirements, and they belong in tools, code, tests, and controls around the model.
When I help a company move an AI workflow into production, this is one of the first boundaries I look for: Which outputs may be model judgments, and which must be enforced by deterministic or statistically valid systems?
The same principle applies to permissions, pricing rules, financial calculations, data validation, and approval thresholds. Let the model handle ambiguity where language and judgment create value. Let conventional software enforce the properties the business must be able to prove.
If the requirement includes the word “fair,” “exact,” “guaranteed,” or “auditable,” do not leave it to next-token prediction.
Ask the AI for a number and enjoy the 17. Just do not mistake its favorite answer for a fair draw.
Primary references
- Coronado-Blázquez: Deterministic or probabilistic? The psychology of LLMs as random number generators
- Zhao, Du, and Wang: Large Language Models Are Bad Dice Players
- Harrison: A Comparison of Large Language Model and Human Performance on Random Number Generation Tasks
- Cognitive Daily: Randomness wrap-up—the 2007 poll in which 17 was overrepresented