If you want to add more tests: https://oeis.org/A006884 and https://oeis.org/A006885 contain the relevant sequences.
function pmax = peakOfPeaks(nmax)
How would I speed this up?
If I input nmax = 2^60, my program cannot finish.
This solution will fail for nmax = 2; so I had to swap the order of two lines. See Solution 1088355.
i'm totally lost with this!
wrong, corrected in soln 329062
I only feel justified in doing this because the previous best answer was a look-up table. :P
Clever pattern, but still gaming the system. This is not the absolute highest Collatz peak as you go to infinity. Yuval, you should be ashamed of submitting this without apologies.
This really doesn't solve the problem it's just gaming the results.
Ooooooh this is evil.
Back and Forth Rows
Remove the vowels
Scoring for oriented dominoes
Test for balanced parentheses
Which doors are open?
Tic Tac Toe FTW
Determine whether a vector is monotonically increasing
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office