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!)
A060565 Follow trajectory of 2n+1 in the '3x+1' problem until a lower number is reached; A060445 gives number of steps for this to happen. Sequence gives the first lower number that is reached. 5
2, 4, 5, 7, 10, 10, 10, 13, 11, 16, 20, 19, 23, 22, 23, 25, 20, 28, 38, 31, 37, 34, 46, 37, 29, 40, 47, 43, 38, 46, 61, 49, 38, 52, 61, 55, 64, 58, 76, 61, 47, 64, 74, 67, 61, 70, 91, 73, 56, 76, 61, 79, 91, 82, 61, 85, 65, 88, 101, 91, 118, 94, 77, 97, 74, 100, 86, 103 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MAPLE
b:= proc(n, t) option remember; `if`(n<t, n,
b(`if`(n::even, n/2, 3*n+1), t))
end:
a:= n-> b((2*n+1)$2):
seq(a(n), n=1..80); # Alois P. Heinz, Jan 22 2022
MATHEMATICA
b[n_, t_] := b[n, t] = If[n<t, n, b[If[EvenQ[n], n/2, 3n+1], t]];
a[n_] := b[2n+1, 2n+1];
Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Apr 25 2022, after Alois P. Heinz *)
PROG
(PARI) a(n) = my(N=2*n+1, m=N); while(m >= N, m = if (m%2, 3*m+1, m/2)); m; \\ Michel Marcus, Jan 22 2022
CROSSREFS
Cf. A060445.
Sequence in context: A078404 A056908 A296344 * A231014 A231009 A133254
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 12 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Apr 13 2001
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 25 09:56 EDT 2024. Contains 371967 sequences. (Running on oeis4.)