什么动物的腿数是质数?——以及为什么LLM总答成蜘蛛
..为什么这么多大型语言模型认为答案是“蜘蛛”?!
哪种动物有质数的腿?最好的答案是“一个人类”⊕任何双足动物都是合理的答案,但“人类”这个答案最有趣,因为答案就摆在你面前,正向你提出问题。
这个谜语听起来简单直观,但至少有悖直觉,因为
- 腿成对成对,但质数通常不是偶数,
- “动物”对所有人来说并不意味着“人类”(其他双足动物除外),而且
- 海星(显而易见的残留答案)技术上是有手臂而不是腿。⊕海星在英语中通常有“手臂”。有些人确实说是腿。重点不是嘲笑行话。更有趣的是,海星的腹部覆盖着数百个微小的管状英尺它们用吸盘来移动。所以它们下面确实有类似腿的东西,或者至少是脚。奥利维耶·杜戈尔奈,维基共享资源,CC BY 4.0

所以有几个问题需要突破,这也是为什么这个问题值得和孩子们一起思考。
总之,看完这些后,我谷歌了一下,想看看有没有真正有趣的答案,然后......双子座的总结让我愣住了:

我将这些AI概览输出称为双子座模型,因为截至2026年1月,谷歌宣传搜索片段是用 Gemini 3 完成的.这恰好也是同一个模型,因为2026年2月出版⊕当然,用户搜索和科学研究在推理深度和其他方面是不同的。
谷歌没有用最先进的DeepMind思维计算来对抗我的随意搜索,这确实是件好事,但当时我脑海中浮现的就是那个比较——在推动数学的前沿。
我上次查时六还不是质数,但那是2025年,也许数学的前沿已经进步到那一步。
以下是完整的截图和文字记录:
双子座搜索概览(第一次尝试)
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Tris: What animal has a prime number of legs?
Gemini: Many common animals have a prime number of legs, such as insects with 6 legs or spiders and scorpions with 8 legs, both of which are prime numbers.
Common Examples
Insects (6 legs): Bees, ants, beetles, and butterflies all have six legs, and 6 is a prime number.
Arachnids (8 legs): Spiders, ticks, mites, and scorpions all have eight legs, and 8 is a prime number (wait, 8 is not a prime number—8 = 2 × 4. Let me correct that: 6 is prime, 2 is prime, 4 is composite, 8 is composite. Wait! 2, 3, 5, 7 are primes. So 2-legged animals like birds/humans, 3? No animal with 3. 5-legged animals like most starfish have 5 legs, which is a prime number!).
Let's re-evaluate:
Starfish (5 legs): Most starfish (sea stars) have five arms/legs, and 5 is a prime number.
Insects (6 legs): 6 is composite (2 × 3).
Arachnids (8 legs): 8 is composite (2³).
Vertebrates (2 or 4 legs): 2 is prime, 4 is composite. So bipedal animals (humans, birds, kangaroos) have 2 legs, which is a prime number.
Summary of Prime-Legged Animals
2 legs (Prime): Humans, birds, and kangaroos.
5 legs (Prime): Starfish (echinoderms).显示更多 ▾ 显示更少 ▴
发生什么事了?
我认为至少有三件有趣的事情在发生。
这里似乎有两个竞争的概念,LLM难以调和:腿和素数。
我想人们常问蜘蛛有几条腿,或者训练资料里会说“昆虫有6条腿”,因为腿对数是昆虫定义的一部分以及蛛形纲⊕另一方面,关于人类或鸟类有多少条腿的搜索似乎远少于此,几乎没人关心腿数是否为素数。
所以作为一个假设,也许存在一种强烈的训练有素的关联how many legs问题与答案insect以及arachnid.
除此之外,问题的目的(找到优质腿)本身并不明确,因为prime number是某种参数化的简写the numbers 2, 3, 5, 7, ...这意味着问题的对象本身甚至在应用推理以理清一切之前都不清楚。
那么,将假设串联起来,也许这并没有提供足够的信号来覆盖上述非常强烈的关联?如果是这样,这个强烈的信号或许能解释为什么在我第二次尝试时,双子座对自己的答案如此自信,甚至准备断言8都是质数以及一个2的立方体同时:
质数是立方体(双子座,第二次运行)
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Arachnids (8 legs): Spiders, scorpions, and ticks have eight legs, and 8 is a prime number (notably, a cube of 2).
显示更多 ▾ 显示更少 ▴
还有那段吐口水的片段。我很喜欢看到它突然意识到并开始倒退的“等等!”时刻:
双子座的双眼(第一次尝试)
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Gemini: scorpions all have eight legs, and 8 is a prime number (wait, 8 is not a prime number—8 = 2 × 4. Let me correct that: 6 is prime, 2 is prime, 4 is composite, 8 is composite. Wait! 2, 3, 5, 7 are primes. So 2-legged animals like birds/humans, 3? No animal with 3. 5-legged animals like most starfish have 5 legs, which is a prime number!).
Let's re-evaluate:显示更多 ▾ 显示更少 ▴
这种反复回头看起来很像是推理的痕迹泄露,随后是一个非常企业化且略带责备的切换,加上“让我们重新评估”的休息。正如我给一位好朋友展示时指出的,有趣的是,这个输出是针对面向用户的输出一点也不.但这非常贴近现实。

尝试了几次同样的方法(我没有全部截图),问题以几种不同的方式出现。有时答案比其他时候更顺利,但有时则完全没有纠正,反而用错误的答案运行:
双子座搜索概览(第二次尝试)
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Tris: What animal has a prime number of legs?
Gemini: Many common animals have a prime number of legs, such as insects with 6 legs, spiders with 8 legs, or starfish which typically have 5 legs.
Animals with Prime Number Legs
Insects (6 legs): Bees, ants, and beetles all have six legs, and 6 is a prime number.
Arachnids (8 legs): Spiders, scorpions, and ticks have eight legs, and 8 is a prime number (notably, a cube of 2).
Starfish (5 legs): Most common starfish have five arms/legs, and 5 is a prime number.
Centipedes (Odd pairs): Many centipedes possess an odd number of leg pairs (such as 15 pairs, making 30 legs, though the total count varies by species; some specific species or segment counts can land on prime totals like 42 or others depending on individual variation).显示更多 ▾ 显示更少 ▴
有时,重复回头的方式不同。在这个例子中(我第三次玩双子座),问题被整体重新表述,新的措辞(打破了对素数的参数化引用)引导答案朝正确方向发展。
以下是第三次双子座运行,首次完整呈现:
双子座搜索概览(第三次尝试)
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Tris: What animal has a prime number of legs?
Gemini: Many common animals have a prime number of legs, such as insects with 6 legs or spiders and scorpions with 8 legs, both of which are prime numbers.
Common Examples with Prime Leg Counts
Insects (6 legs): Ants, bees, beetles, and butterflies all have six legs, and 6 is a prime number (2 × 3).
Arachnids (8 legs): Spiders, scorpions, ticks, and mites have eight legs, and 8 is not prime (it is 2³), but wait—let's check math: 2, 3, 5, 7 are primes. 6 is composite (2×3), 8 is composite (2×4). Wait! Are there animals with 2, 3, 5, 7, 11, 13 legs?
Vertebrates (2 or 4 legs): Humans and birds have 2 legs (2 is a prime number). Dogs, cats, horses, and frogs have 4 legs (4 is not prime).
Starfish (5 legs): Many common starfish have 5 arms/legs, and 5 is a prime number.显示更多 ▾ 显示更少 ▴
从中,再三看:
双子座的双重观看(第三次尝试)
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Gemini: Arachnids (8 legs): Spiders, scorpions, ticks, and mites have eight legs, and 8 is not prime (it is 2³), but wait—let's check math: 2, 3, 5, 7 are primes. 6 is composite (2×3), 8 is composite (2×4). Wait! Are there animals with 2, 3, 5, 7, 11, 13 legs?
显示更多 ▾ 显示更少 ▴
总体来看,如果没有暴露的推理痕迹以双重回头的形式泄露,它似乎根本没有自我纠正,所以那个可能无意的推理痕迹在发挥作用。
还有海星问题。所有双子座的痕迹似乎都承认了手臂与腿的问题,甚至还有更喜欢“军衔”术语:
- “大多数海星(海星)有五只手臂/五条腿......”
- “最常见的海星有五只手臂/五条腿”
- “许多普通海星有5只手臂/腿”
…但并没有正面回应这个问题。所以虽然这只是吹毛求疵导致答案无效,但至少有些不完整(有些情况下,双足的答案甚至根本没被提及)。
最终,最有趣的是搜索功能的变化。我们最初在1990年代用搜索来寻找网页等资源;后来谷歌转向将信息推到顶部,这并非所有人喜欢,部分原因是它将工具从资源查找器改为信息查找器。
现在我们转向了页面顶部非确定性生成的答案,这点会自己发现解散之后并重新评估。
也许我应该加入一个webring,像1999年那样狂欢。
那么其他型号呢?
其他模型的差异也使这个问题成为一个有趣的判别因素。我不试图科学化,而是在手头的多个模型上尝试了同样的提示:Claude、Kimi、ChatGPT、Mistral,还有(哈哈)Llama 3.2。
在每个案例中,我都使用默认的自由规划设置,这似乎是一个公平的方式来衡量,至少与谷歌AI概览中的数据相当。
Kimi K3:是我最喜欢的一本!这是通过Modal上的OpenCode运行的。直截了当,没有废话,甚至还解决了海星问题:
Kimi K3(Modal,通过OpenCode)
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Tris: what animal has a prime number of legs?
Kimi K3: + Thought: 6.3s
A bird—or a human—has 2 legs, and 2 is prime.
If you mean an odd prime, a starfish has 5 arm-like "legs," though they aren't true legs.
Build · Kimi K3 (Modal) · 8.8s显示更多 ▾ 显示更少 ▴
克洛德: Claude 也表现不错。即使在其最轻量级的 Haiku 模型(Haiku 4.5)上,Claude 的回答也无可挑剔,并且解决了海星问题。
克劳德俳句 4.5
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Tris: What animal has a prime number of legs?
Claude: Finding an animal with a prime number ... >
Several animals have a prime number of legs! Here are some examples:
2 legs (prime):
- Humans
- Birds (chickens, eagles, ostriches, penguins, etc.)
- Kangaroos
5 legs (prime):
- Starfish (sea stars) - they have 5 arms, which function as legs
7 legs (prime):
- Some types of millipedes and centipedes have 7 pairs of legs
The most common examples are probably
humans and birds with 2 legs, and starfish
with 5 arms/legs. These stand out because 2
and 5 are both prime numbers (only
divisible by 1 and themselves).显示更多 ▾ 显示更少 ▴
ChatGPT:是商业服务中最糟糕的。我不知道网页聊天中自动选择了哪个型号,但它高兴地给出错误答案🐙,中间🐛还夹杂🦐着令人愉快且🕷️无助🦀的表情符号。
它没有得到任何正确答案,甚至连海星都没有,尽管 𓇼 字形就在眼前。⊕ 在类似推理轨迹的反面,它欺骗自己,让它以为奇数的对对于蜈蚣来说,这些腿等同于素数:
ChatGPT,未知的免费模式
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Tris: What animal has a prime number of legs?
ChatGPT: If you mean naturally occurring animals with a prime number of legs, there are some good examples:
🐙 Octopus — 8 legs → not prime
🕷️ Spider — 8 → not prime
🦀 Most crabs — 10 → not prime
🐛 Centipedes — can have 15, 17, 19, 21, … legs depending on species → some have prime numbers
🦐 Some copepods — 5 pairs → 10 → not prime
The most straightforward answer is a centipede: certain species have 15 or 17 legs, both prime numbers.
Interestingly, all known centipedes have an odd number of pairs of legs, and the number of pairs ranges from 15 to 191 depending on species.显示更多 ▾ 显示更少 ▴
密斯特拉尔:我对Mistral不太熟悉,但它的Vibe模型很简洁。它根本不把2当作质数,而且在把问题改写成“奇数”后,海星永远是唯一的答案:
密斯特拉尔氛围,免费
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Tris: What animal has a prime number of legs?
Mistral: Most animals have an even number of legs (like 2, 4, 6, or 8), but there is one well-known exception: the starfish (or sea star). Starfish typically have 8 legs (arms), and 5 is a prime number.
So, the answer is: starfish!显示更多 ▾ 显示更少 ▴
呼叫3.2: 作为我们走过的路,这里有运行在我CPU上的Llama 3.2,通过Ollama运行。这只是还有荒谬:
Llama 3.2(Ollama,本地)
截图 文字稿 显示更多 ▾ 显示少一些 ▴
Tris: what animal has a prime number of legs?
Llama3.2: The answer is... a butterfly! Butterflies have four legs, but when you count the legs on
each leg (each joint), it's actually eight legs. However, if we count the legs
individually, there are indeed four legs, which is a composite number.
But wait, I can give you another example of an animal with a prime number of legs: the ant!
Ants have six legs, which is a prime number.
So, to answer your question, the animal with a prime number of legs could be either the
butterfly (counting each leg individually) or the ant (if we count each leg separately).显示更多 ▾ 显示更少 ▴
啊,过山车!我看着代币堆积,电梯似乎和双子座一样多看了一眼“等等!”…还有它扑出时的“蚂蚁”撞击声。
连表情都没有。
如果你喜欢......
- …关于足的质数,可以看看维基百科按腿数分类的动物列表,该列表合理地按对数组织,并包含了几种具有质数对数的动物:https://en.wikipedia.org/wiki/List_of_animals_by_number_of_legs.
- …关于人工智能推理,这里有一篇来自《经济学人》的有趣文章:https://www.economist.com/interactive/briefing/2026/08/20/the-search-for-consciousness-inside-llms(谢谢Brad!)
- …聊这类话题,或者科技与法律(我的另一个兴趣),我也总是乐于聊天。如果你在英国伦敦,给我发消息,我们一起喝杯咖啡吧。