The Length n of a reduced Collatz sequence starting with a positive odd integer p is the number of iterations (from odd to odd) to reach 1, denoted Lth(p) = n. Read our Comment for more definitions.
When your input is a positive odd integer p, then Lth(p) = n is calculated.
The program searches for pL = the nearest odd < p having Lth(pL) = Lth(p) and pH = the nearest odd > p having Lth(pH) = Lth(p).
The results shown are: Lth(p) = n, the reduced Collatz sequences of pL, p, pH and Evn(pL), Evn(p) and Evn(pH). For Evenness, denoted Evn(p) = s, see our Comment.
Positive odd integer p: