I loosened the tolerance on the test for s = 2. Increasing the number of primes seems to degrade the accuracy after a certain point, and the result becomes farther from the value listed in sequence A085548 in the Online Encyclopedia of Integer Sequences. This solution should pass now.
Find the peak 3n+1 sequence value
1141 Solvers
Count from 0 to N^M in base N.
220 Solvers
Sort numbers by outside digits
131 Solvers
Piecewise linear interpolation
310 Solvers
42 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!