Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Graphics@Line@Partition[NestWhileList[If[2∣#,#Graphics@Line@Last@Reap[#/2,3#+1]&,#/.a_/;a>1:>Last@Sow@{a,#>1&]If[2∣a,a/2,1]&3a+1]}]&
-1617 bytes from @att
63728127
Graphics@Line@Partition[NestWhileList[If[2∣#,#/2,3#+1]&,#,#>1&],2,1]&
-16 bytes from @att
Graphics@Line@Last@Reap[#//.a_/;a>1:>Last@Sow@{a,If[2∣a,a/2,3a+1]}]&
-17 bytes from @att
Graphics@Line@Partition[NestWhileList[If[OddQ@#,3#+1Graphics@Line@Partition[NestWhileList[If[2∣#,#/2]&2,3#+1]&,#,#>1&],2,1]&
-1516 bytes from @att
Graphics@Line@Partition[NestWhileList[If[OddQ@#,3#+1,#/2]&,#,#>1&],2,1]&
-15 bytes from @att
ListLinePlot[Partition[NestWhileList[If[OddQ@#Graphics@Line@Partition[NestWhileList[If[OddQ@#,3#+1,#/2]&,#,#>1&],2,1],PlotRange->All]&1]&
ListLinePlot[Partition[NestWhileList[If[OddQ@#,3#+1,#/2]&,#,#>1&],2,1],PlotRange->All]&