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!)
A076228 Number of terms k in the trajectory of the Collatz function applied to n such that k < n. 5
0, 1, 2, 2, 3, 5, 4, 3, 6, 5, 6, 8, 6, 9, 6, 4, 8, 13, 10, 7, 5, 11, 8, 10, 13, 9, 9, 15, 13, 10, 9, 5, 16, 11, 8, 19, 17, 16, 17, 8, 12, 7, 19, 15, 13, 11, 12, 11, 19, 20, 17, 11, 9, 17, 14, 19, 23, 18, 21, 15, 13, 16, 14, 6, 22, 24, 21, 14, 12, 11, 15, 22, 18, 21, 7, 21, 19, 25, 22, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
It is believed that for each x, a(n) = x occurs a finite number of times and the largest n is 2^x.
Original name: Start iteration of Collatz-function (A006370) with initial value of n. a(n) shows how many times during fixed-point-list, the value sinks below initial one until reaching endpoint = 1. - Michael De Vlieger, Dec 13 2018
LINKS
EXAMPLE
A070165(18) = {18, 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1}. a(18) = 13 because 13 terms are smaller than n = 18; namely: {9, 14, 7, 11, 17, 13, 10, 5, 16, 8, 4, 2, 1}.
MATHEMATICA
f[x_] := (1-Mod[x, 2])*(x/2)+(Mod[x, 2])*(3*x+1) f[1]=1; f0[x_] := Delete[FixedPointList[f, x], -1] f1[x_] := f0[x]-Part[f0[x], 1] f2[x_] := Count[Sign[f1[x]], -1] Table[f2[w], {w, 1, 256}]
(* Second program: *)
Table[Count[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # > 1 &], _?(# < n &)], {n, 80}] (* Michael De Vlieger, Dec 09 2018 *)
CROSSREFS
Sequence in context: A036014 A359948 A289507 * A317050 A243970 A282443
KEYWORD
nonn
AUTHOR
Labos Elemer, Oct 01 2002
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)