Problem 693
Finite Sequence Generator
Two positive integers
is the first term, for and- the generation stops when a term becomes
or .
The number of terms in this sequence is denoted
For example, with
Hence
Further, define
Find
有限数列生成器
对两个任意正整数
- 数列的第一项为
; - 对于
,令 ; - 当某一项为
或 时停止。
当序列停止时,记
例如,若
因此
记
记
求
Be the first person to leave a comment!