The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A334226 Number of times the number 3*k+1 from the Collatz sequence for n is bigger than n. 0
 0, 0, 2, 0, 1, 2, 5, 0, 6, 1, 4, 1, 2, 5, 5, 0, 2, 5, 5, 0, 1, 3, 3, 0, 6, 1, 40, 3, 4, 4, 38, 0, 7, 2, 2, 2, 3, 4, 9, 0, 39, 1, 5, 1, 2, 3, 37, 0, 3, 4, 4, 0, 1, 40, 40, 0, 5, 1, 5, 3, 4, 38, 38, 0, 3, 3, 3, 0, 1, 2, 35, 0, 40, 1, 3, 1, 2, 6, 6, 0, 4, 38, 38, 0, 1, 4, 4, 0, 3, 1, 31, 2, 3, 36, 36, 0, 41, 2, 2, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Collatz process for the number n is a sequence starting with n and ending with 1 (obtained for the first time), constructed using even steps k to k/2 and odd steps k to 3*k+1. The sequence a(n) that we introduce shows how many times in the Collatz process for n the number 3*k+1, obtained after the odd step k to 3*k+1, is bigger than n. Alternatively, a(n) represents the number of odd terms in the Collatz process for n that are bigger than (n-1)/3. We have a(1)=0 since we don't have any step. LINKS FORMULA a(n) <= A006667(n). - David A. Corneth, May 20 2020 EXAMPLE Collatz process for n=3 is 3, (10), 5, (16), 8, 4, 2, 1. It happened twice that the number 3*k+1 in this process is bigger than n, those numbers 3*k+1 are in parentheses. MATHEMATICA a[n_] := Block[{c = NestWhileList[ If[ EvenQ@ #, #/2, 3 # + 1] &, n, #>1 & ]}, Length@ Select[ Range[2, Length[c]], OddQ[c[[# - 1]]] && c[[#]] > n &]]; Array[a, 90] (* Giovanni Resta, May 19 2020 *) PROG (PARI) a(n) = my(res=0, cn=n); while(n>1, if(bitand(n, 1), n=3*n+1; if(n>cn, res++); , n>>=1)); res \\ David A. Corneth, May 20 2020 CROSSREFS Cf. A006667. Sequence in context: A127767 A292577 A055509 * A006667 A112570 A127755 Adjacent sequences:  A334223 A334224 A334225 * A334227 A334228 A334229 KEYWORD nonn AUTHOR Hamid Kulosman, May 11 2020 EXTENSIONS More terms from Giovanni Resta, May 19 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 24 03:42 EDT 2020. Contains 337316 sequences. (Running on oeis4.)