|
|
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):
|
|
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];
|
|
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
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
More terms from Larry Reeves (larryr(AT)acm.org), Apr 13 2001
|
|
STATUS
|
approved
|
|
|
|