奇怪数列
Weird Sequences
题目详情
求下列数列的下一项(或下两项):
a) 1, 11, 21, 1211, 111221, ?
b) 10, 11, 12, 13, 14, 20, 22, 101, ?, ?
c) 仅由 2 与 1 构成:2,2,1,1,2,1,2,2,1, ?, ? …
提示:a) 报数;b) 换进制;c) 连段长度编码。
What is/are the next term(s) in the sequence: a) 1, 11, 21, 1211, 111221, ? b) 10, 11, 12, 13, 14, 20, 22, 101, ?, ? c) (This a sequence made by only 2 & 1): 2,2,1,1,2,1,2,2,1, ?, ?....
Hint
a) base-change, b) count numbers, c) count repetition
解析
a) 这是“报数数列”(look-and-say)。下一项为 312211(再下一项 13112221)。
b) 这是把“十进制的 10”写成不同进制:10 进制到 1 进制。下一两项为 1010、1111111111。
c) 这是 Kolakoski 数列的一种版本:它等于自身的 run-length encoding(连段长度编码),下一两项依该规则继续生成。
Original Explanation
Solution
a) 1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, … This is a Look-and-say sequence! To generate a member of the sequence from the previous member, read off the digits of the previous member, counting the number of digits in groups of the same digit.
b) 10, 11, 12, 13, 14, 20, 22, 101, 1010, 1111111111 This is '10' written in different bases, from 10 to 1!
c) This a sequence made by only 2 & 1: 2,2,1,1,2,1,2,2,1, ?, ?.... This is a version of Kolakoski sequence, and is its own run-length encoding. Each symbol occurs in a "run" of either 1 or 2 consecutive terms, and writing down the lengths of these runs gives exactly the same sequence. It is the unique sequence with this property except for the same sequence with extra '1' at start.