OFFSET
1,1
LINKS
FORMULA
EXAMPLE
119 is a term since its Collatz trajectory is 119, 358, 179, 538, 269, 808, 404, 202, 101, 304, 152, 76, 38, 19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 29, 10, 5, 16, 8, 4, 2, 1, which has 11 odd numbers.
MAPLE
b:= proc(n) option remember; irem(n, 2, 'r')+
`if`(n=1, 0, b(`if`(n::odd, 3*n+1, r)))
end:
q:= n-> is(n::odd and b(n)=11):
select(q, [$1..5000])[]; # Alois P. Heinz, May 18 2022
MATHEMATICA
q[n_] := Count[NestWhileList[If[OddQ[#], 3 # + 1, #/2] &, n, # > 1 &], _?OddQ] == 11; Select[2*Range[1000] - 1, q] (* Amiram Eldar, May 18 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Krishna Kumar Arumugam, May 18 2022
STATUS
approved