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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087232 a(n) is the largest odd term in the 3x+1 trajectory initiated at n. 6
1, 1, 5, 1, 5, 5, 17, 1, 17, 5, 17, 5, 13, 17, 53, 1, 17, 17, 29, 5, 21, 17, 53, 5, 29, 13, 3077, 17, 29, 53, 3077, 1, 33, 17, 53, 17, 37, 29, 101, 5, 3077, 21, 65, 17, 45, 53, 3077, 5, 49, 29, 77, 13, 53, 3077, 3077, 17, 65, 29, 101, 53, 61, 3077, 3077, 1, 65, 33, 101, 17, 69 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

a(n)=3077 corresponds to peak=9232.

LINKS

Michael De Vlieger, Table of n, a(n) for n = 1..10000

FORMULA

If n = 2^k (for integers k >= 0), a(n) = 1; otherwise a(n) = (A025586(n)-1)/3 =(A056959(n)-1)/3. - Paolo Xausa, Nov 13 2021

MAPLE

a:= proc(n) option remember; `if`(n=1, 1, max(

     `if`(n::odd, n, 0), a(`if`(n::even, n/2, 3*n+1))))

    end:

seq(a(n), n=1..88);  # Alois P. Heinz, Nov 14 2021

MATHEMATICA

c[x_] := (1-Mod[x, 2])*(x/2)+Mod[x, 2]*(3*x+1); c[1]=1; fpl[x_] := Delete[FixedPointList[c, x], -1] ofp[x_] := Part[fpl[x], Flatten[Position[OddQ[fpl[x]], True]]] Table[Max[ofp[w]], {w, 1, 256}]

(* Second program: *)

Array[Max@ Select[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, #, Unequal[#, 1, -1, -10, -34] &, 1, 10^4], OddQ] &, 69] (* Michael De Vlieger, May 15 2017, after Alonso del Arte at A025586 *)

CROSSREFS

Cf. A025586, A056959, A348006.

Sequence in context: A143969 A198366 A162797 * A151780 A054244 A093562

Adjacent sequences:  A087229 A087230 A087231 * A087233 A087234 A087235

KEYWORD

nonn

AUTHOR

Labos Elemer, Sep 18 2003

EXTENSIONS

Name simplified by Paolo Xausa, Nov 13 2021

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 1 20:47 EST 2021. Contains 349435 sequences. (Running on oeis4.)