I think the explanation in the problem statement is a bit sparse. The numbers in the table do not represent prime numbers per se: they represent indices on prime numbers, whose ultimate product yields the value n.
The in-built function factors() was pretty helpful for this problem :)
I do not understand how this code passes the test.
How this is a solution
tabulate code is not working. I got the correct results but I am getting error --"Undefined function 'tabulate' for input arguments of type 'double"
Tabulate could probably be made to work here, but I recall that Cody does not allow toolbox functions, and tabulate lives in the stats toolbox. I'd guess the logic is that not everyone has all toolboxes, so a solution that uses some tool that others cannot use would not be fair to those others.
Definitely used a bit of a work around in this one. Sorry for that!
can't believe 'deblank' can be used in this way
It dseon't mettar waht oedrr the lrettes in a wrod are.
Back to basics 10 - Max Float
Flag largest magnitude swings as they occur
05 - Vector Equations 1
Connect Four Win Checker
Make a Palindrome Number
Find the two-word state names
Maximum running product for a string of numbers
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