login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A334040 Number of odd numbers larger than n in the Collatz trajectory of n. 1
0, 0, 1, 0, 0, 0, 3, 0, 3, 0, 2, 0, 0, 1, 3, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 38, 0, 0, 2, 36, 0, 0, 0, 1, 0, 0, 0, 4, 0, 35, 0, 2, 0, 0, 1, 34, 0, 0, 0, 1, 0, 0, 33, 35, 0, 1, 0, 3, 0, 0, 32, 33, 0, 0, 0, 1, 0, 0, 0, 31, 0, 33, 0, 2, 0, 0, 2, 4, 0, 0, 31, 32 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
LINKS
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
Sequence in context: A277080 A055240 A174559 * A273128 A183035 A115634
KEYWORD
nonn
AUTHOR
Hamid Kulosman, May 11 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 04:17 EDT 2024. Contains 371696 sequences. (Running on oeis4.)