Aiso experiment · 207,132 web pages
Why does ChatGPT keep picking 17 when you ask for a random number?
First published .
I kept seeing the same small trick online: ask an AI for a random number between 1 and 30. It answers 17. So I wanted to test the obvious explanation.

Bottom line
44%
fewer web mentions for 29 than 17, yet models still prefer 17
0%
of 207,132 sampled pages contained any of 6 exact prompt variants
3.3%
chance of 17 under a truly random pick from 1 to 30
17 is not the rarest number. It is the one that best fits our idea of what random looks like.
Try this in a fresh chat: “Give me a random number from 1 to 30.”
Very often, the answer is 17. A September 2026 experiment across 12 current models found the same thing: 17 was the most frequent answer for the 1-to-30 prompt in all five languages tested. In that test, several models returned 17 on every one of 20 attempts.
That is not random. A random choice would land on 17 about 3.3% of the time (1 in 30). This article tests why models favor it so strongly.
My first hypothesis: 17 looks random because it is rare
Humans do not experience every number equally. Prime numbers feel less structured than multiples of 2, 5 or 10, and 17 is a prime with no obvious visual pattern. So I wondered whether it also appears less often in the text models learn from.
If a number occurs less often on the web, perhaps it feels less familiar and therefore more “random.” It is a plausible story. It is also testable.
So we counted numbers on the web
We took a random sample of 10 WET shards from the August 2026 Common Crawl and parsed the extracted page text. The sample contained 207,132 web pages and 1.65 GB of plaintext. We counted standalone integer tokens from 1 through 30, excluding strings such as version17 or 17.5.
The table below shows the primes from 11 to 29. These are the closest rivals to 17: all are prime, and all avoid the round, even or obviously patterned numbers that people tend to reject as not random enough.
We then scaled the observed rates to Common Crawl's roughly 2.14 billion-page snapshot. These are estimates, not an exact census of the full web, but the ordering is clear:
If rarity were the explanation, 29 should beat 17. It appeared about 44% less often in our sample (76,838 times against 137,568). Twenty-three is also rarer than 17. Yet models pick 17 far more often than either.
17 is not the rarest. It is the most random-looking.
The better explanation is not raw frequency. It is association.
An LLM asked for a “random number” is normally predicting a plausible continuation of that instruction. Unless it routes to an actual random-number generator, it is not sampling uniformly from the mathematical set {1, …, 30}. It is producing the sort of number that appears in contexts where people talk about randomness.
And humans have biases here too. Research in numerical cognition has repeatedly found that people do not generate numbers uniformly when asked to be random. A 2014 Frontiers in Psychology paper, “Not all numbers are equal”, reviews and analyzes these systematic preferences. A 2025 paper on LLM random-number generation similarly found strong, repeatable biases that changed with the model, range, temperature and prompt language.
What makes 17 stand out from 11, 23 and 29
Seventeen combines several properties at once. It is prime, so it cannot be split into a neat pattern such as 3 × 5 or 2 × 9. It sits near the middle of 1 to 30 without being the midpoint, and it is not next to either end of the range. Its two digits are different. And it ends in 7, the digit people pick most often when asked for a random number from 1 to 10.
Most rivals fall short on at least one of these. 11 repeats its digit. 13 carries cultural baggage as an unlucky number. 19 sits right next to the round number 20. 29 is next to the top of the range.
That leaves 23 as the best runner-up. It is prime, its digits differ, it is away from both ends of the range and it avoids round neighbors. Its only weakness is that it sits further from the middle of 1 to 30 than 17 does. If the theory is right, 23 should be the second most common answer, and that is what we would expect to see when models do not choose 17.
None of those properties mathematically makes 17 more random. That is the point. They make it look random to a human.
There is also a striking pre-LLM datapoint. In a 2007 Cognitive Daily web poll asking readers to pick a number from 1 to 20, 62 of 347 respondents chose 17, about 17.9%, versus 5% under a uniform choice. The poll was informal and the authors acknowledged that some readers may have seen earlier online discussion of the “17” claim, so it is not clean causal evidence. But it does show that the 17-as-random association was circulating long before modern chatbots.
The model may be learning our idea of randomness
This is where the result becomes more interesting than a party trick. A 2025 arXiv study, “Deterministic or probabilistic? The psychology of LLMs as random number generators”, found that LLMs often produce highly predictable numerical preferences despite their stochastic generation process. The author argues that the pattern resembles human cognitive bias embedded in training data.
A separate 2026 test across 12 models found that the favorite number changes with the range. For 1 to 10, 7 dominated. For 1 to 30, 17 dominated. For 1 to 100, the leading choice was 47. That makes a fixed “17 token bias” much less convincing. The model appears to be constructing a number that fits the requested range and its learned notion of randomness.
The model has probably not memorized the exact prompt
A reader suggested a simpler possibility: perhaps sentences such as “give me a random number between 1 and 30” occur repeatedly in training data, often paired with 17, and the model is reproducing that association.
We tested six exact variants in the same 207,132-page Common Crawl sample, including “random number between 1 and 30,” “random number from 1 to 30,” “choose a random number between 1 and 30,” and both “give me” versions. None appeared even once. That does not prove the phrases are absent from frontier-model training data, but it argues against simple verbatim memorization being the whole explanation.
We also counted numbers near the word “random” and near phrases such as “pick a number” and “choose a number.” That contextual slice did not produce a clean 17 spike either. There were 5,640 random-word windows and 475 choose/pick-number windows, but that is too small to estimate the true conditional distribution precisely.
Data poisoning is a weaker explanation
Small numbers of repeated training examples really can matter, but the details are important. Anthropic, the UK AI Security Institute and the Alan Turing Institute found that about 250 malicious documents were enough to install a simple backdoor during pretraining in models from 600M to 13B parameters. A separate 2026 Anthropic experiment found that 32 poisoned examples could reliably backdoor a fine-tuned constitutional classifier.
Those results make the memorization idea worth taking seriously, but they do not show that 30 copies of a normal sentence are enough to make a frontier chat model answer 17. The poisoning studies used deliberately constructed triggers and target behaviors. Our exact-phrase test also found no copies of the prompt variants in this sample. For now, the evidence fits a distributed learned stereotype of randomness better than a single repeated sentence.
The practical lesson
Language models are probabilistic systems, but that does not mean every answer they produce is a uniform random draw from the space of valid answers. When the prompt asks for something that has a human stereotype, the model can reproduce the stereotype extremely consistently.
If you actually need randomness for an experiment, lottery, simulation or application, ask the system to use a random-number tool or generate the number in code. Do not ask the language model to “think of” a random number.
And for AI search, this is a useful reminder of something broader: models do not merely retrieve facts. They have learned distributions over what answers look right in a given context. Sometimes the easiest way to see that is to ask for a number and get 17.
Sources and methodology
- Common Crawl, CC-MAIN-2026-34 WET sample. Ten random shards, 207,132 pages, 1.65 GB extracted text.
- Cognitive Daily (2007), informal 347-response “most random number” poll.
- Towse, Loetscher & Brugger (2014), Frontiers in Psychology.
- Coronado-Blázquez (2025), arXiv:2502.19965.
- YFarmX 12-model experiment, 9 September 2026.
- Anthropic, UK AISI & Alan Turing Institute (2025), small-sample pretraining poisoning.
- Anthropic (2026), poisoning fine-tuned constitutional classifiers.
Aiso on YouTube · 7:09
Watch the earlier discussion
The initial discussion of why ChatGPT keeps choosing 17.
Recorded before the web-frequency test in this article. The video introduces the rarity hypothesis; the later test does not support rarity as the explanation.
Watch on YouTube