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!)
A216022 Largest number m such that the Collatz trajectory starting at n contains all numbers not greater than m. 5
1, 2, 5, 2, 2, 6, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) <= 6; a(A007283(n)) = 6;
a(n) > 1 for n > 1; a(n) <> 3; a(n) <> 4; a(n) <> 5 for n > 3;
a(n) = A216059(n) - 1.
In the first 100000 terms, there are only 16 terms greater than 2, all of which but one are equal to 6. - Harvey P. Dale, Nov 29 2019
LINKS
Eric Weisstein's World of Mathematics, Collatz Problem
EXAMPLE
n = 3->10->5->16->8->4->2->1 => {1_2_3_4_5 8 10 16}, a(3) = 5;
n = 4->2->1 => {1_2 4}, a(4) = 2;
n = 5->16->8->4->2->1 => {1_2 4 5 8 16}, a(5) = 2;
n = 6->3->10->5->16->8->4->2->1 => {1_2_3_4_5_6 8 10 16}, a(6) = 6.
MATHEMATICA
scoll[n_]:=Sort[NestWhileList[If[EvenQ[#], #/2, 3#+1] &, n, #>1 &]]; Join[{1, 2}, Table[i=1; While[scoll[n][[i]]==i, i++]; i-1, {n, 3, 86}]] (* Jayanta Basu, May 27 2013 *)
Join[{1, 2}, Flatten[Table[Position[Differences[Sort[ NestWhileList[ If[ EvenQ[#], #/2, 3#+1]&, n, #>1&]]], _?(#>1&), 1, 1], {n, 90}]]] (* Harvey P. Dale, Nov 29 2019 *)
PROG
(Haskell)
import Data.List (sort)
a216022 = length .
takeWhile (== 0) . zipWith (-) [1..] . sort . a070165_row
CROSSREFS
Sequence in context: A065291 A065267 A273990 * A100955 A049413 A300691
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Sep 01 2012
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 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)