Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cyc[n_Integer, m_Integer] :=
- Max@Table[
- NestWhileList[
- If[OddQ[#], 3 # + 1, #/2] &,
- i,
- # != 1 &
- ] // Length,
- {i, n, m}
- ]
- ArrayPlot[
- Table[
- cyc[x, y],
- {x, 1, 6},
- {y, 1, 6}
- ],
- ColorFunction -> "GreenPinkTones"]
Advertisement
Add Comment
Please, Sign In to add comment