OFFSET
1,7
LINKS
Markus Sigg, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale).
EXAMPLE
For n=7 the Collatz process is: 7,22,(11),34,(17),52,26,(13),40,20,10,5,16,8,4,2,1. The numbers in the parentheses are odd numbers in the Collatz process for n=7 that are bigger than 7. There are three of them, hence a(7)=3.
MATHEMATICA
Table[Count[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>1&], _?(#>n&&OddQ[#]&)], {n, 90}] (* Harvey P. Dale, Aug 03 2023 *)
PROG
(PARI) f(n) = if (n%2, 3*n+1, n/2);
a(n) = {my(nb = 0, m=n); while ((n=f(n)) != 1, if ((n % 2) && (n>m), nb++)); nb; } \\ Michel Marcus, Jun 01 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Hamid Kulosman, May 11 2020
STATUS
approved