🔢 生成 Gijswijts 序列Generate Gijswijts Sequence
生成 Gijswijt 序列(OEIS A090822):a(1)=1,之后每一项等于“目前序列末尾最多由同一段连续重复了几次”。1 1 2 1 1 2 2 2 3 1 1 2…,本地处理。Generate Gijswijt's sequence (OEIS A090822): a(1)=1, then each term is the largest k such that the sequence so far ends with some block repeated k times in a row. 1 1 2 1 1 2 2 2 3 1 1 2… Processed locally.
使用说明与常见问题How-to & FAQ
「生成 Gijswijts 序列」是什么?What is the Generate Gijswijts Sequence tool?
生成 Gijswijt 序列(OEIS A090822):a(1)=1,之后每一项等于“目前序列末尾最多由同一段连续重复了几次”。1 1 2 1 1 2 2 2 3 1 1 2…,本地处理。Generate Gijswijt's sequence (OEIS A090822): a(1)=1, then each term is the largest k such that the sequence so far ends with some block repeated k times in a row. 1 1 2 1 1 2 2 2 3 1 1 2… Processed locally.
如何使用「生成 Gijswijts 序列」?How do I use the Generate Gijswijts Sequence tool?
在「生成 Gijswijts 序列」中,按需设置「项数」,结果会实时显示在下方,点击「复制结果」即可复制。In the Generate Gijswijts Sequence: Adjust "Terms"; the result appears below instantly — click "Copy result" to copy it.
这是什么规则?What is the rule?
a(1)=1。之后每一步看目前已有的序列,找最大的 k,使序列末尾可以写成某一段 Y 连续重复 k 次(YY…Y),把 k 作为下一项。例如 1 1 的末尾是“1”重复 2 次,所以下一项是 2;1 1 2 1 1 2 的末尾是“1 1 2”重复 2 次,所以下一项也是 2。前 20 项是 1 1 2 1 1 2 2 2 3 1 1 2 1 1 2 2 2 3 2 1,与 OEIS A090822 一致。a(1)=1. At each step, look at the sequence so far and find the largest k such that it ends with some block Y repeated k times in a row (YY…Y); that k is the next term. For example 1 1 ends with "1" twice, so the next term is 2; 1 1 2 1 1 2 ends with "1 1 2" twice, so the next term is 2 as well. The first 20 terms are 1 1 2 1 1 2 2 2 3 1 1 2 1 1 2 2 2 3 2 1, matching OEIS A090822.
什么时候第一次出现 4?When does 4 first appear?
第 220 项是第一个 4;而第一个 5 出现得极晚(大约在第 10^(10^23) 项),所以本工具 5000 项以内只会看到 1–4。The first 4 is term 220; the first 5 appears astronomically late (around term 10^(10^23)), so within this tool's 5,000 terms you only see 1 to 4.
结果精确吗?Is the result exact?
精确。每一项都是逐项比较整数得到的小整数,不经过浮点计算。Yes. Every term is a small integer found by comparing earlier terms exactly; no floating-point arithmetic is involved.
输入和输出是什么样的?What does the input and output look like?
例如在「生成 Gijswijts 序列」中把「项数」设为 20,输出为:1 1 2 1 1 2 2 2 3 1 1 2 1 1 2 2 2 3 2 1。For example, in the Generate Gijswijts Sequence with "Terms" set to 20, the output is: 1 1 2 1 1 2 2 2 3 1 1 2 1 1 2 2 2 3 2 1.
有哪些选项可以调整?What options can I adjust?
「生成 Gijswijts 序列」的设置:「项数」默认 20;可勾选:「每行一个」。每次生成结果都按当前设置处理。Settings in the Generate Gijswijts Sequence — "Terms" default 20; tick boxes: "One per line". The result always uses the current settings.
「生成 Gijswijts 序列」免费吗?需要注册吗?Is the Generate Gijswijts Sequence free? Do I need an account?
「生成 Gijswijts 序列」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Generate Gijswijts Sequence is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.