PROJECT EULER · #0693
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
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.