{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-05-26T00:16:20.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2026-05-26T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":44849,"title":"Given a base n, find the y values less or equal than 100(without 1), such that they will never produce a periodic number if we divide any whole number between some of them","description":"A periodic number depends on the base b where we are working. So, for example the number \r\n2/3 in decimal base is periodic(0.666666666) but if we are working in base 3, the same number can be expressed as 2/10, and the result is not periodic (0.2). \r\nBy this way, it is possible to enunciate:\r\n\r\n* In base 2 or 3, all numbers will produce periodics numbers unless the number is the base or power of the base\r\n* In decimal base, numbers as 2,5,8,40,50 for example will never produce periodics numbers. \r\n\r\nBy this way, you have to find when a number in any base can produce periodics numbers or not, and then find the values less or equal than 100 that in this base will never produce a periodic number.","description_html":"\u003cp\u003eA periodic number depends on the base b where we are working. So, for example the number \r\n2/3 in decimal base is periodic(0.666666666) but if we are working in base 3, the same number can be expressed as 2/10, and the result is not periodic (0.2). \r\nBy this way, it is possible to enunciate:\u003c/p\u003e\u003cul\u003e\u003cli\u003eIn base 2 or 3, all numbers will produce periodics numbers unless the number is the base or power of the base\u003c/li\u003e\u003cli\u003eIn decimal base, numbers as 2,5,8,40,50 for example will never produce periodics numbers.\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eBy this way, you have to find when a number in any base can produce periodics numbers or not, and then find the values less or equal than 100 that in this base will never produce a periodic number.\u003c/p\u003e","function_template":"function y = nperiodos(b)\r\ny=b;\r\nend","test_suite":"%%\r\nb = 2;\r\ny_correct = [2 4 8 16 32 64];\r\nassert(isequal(nperiodos(b),y_correct))\r\n%%\r\nb=3;\r\ny_correct = [3 9 27 81];\r\nassert(isequal(nperiodos(b),y_correct))\r\n%%\r\nb=60;\r\ny_correct = [2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30 32 36 40 45 48 50 54 60 64 72 75 80 81 90 96 100];\r\nassert(isequal(nperiodos(b),y_correct))\r\n%%\r\nb=50;\r\ny_correct = [2 4 5 8 10 16 20 25 32 40 50 64 80 100];\r\nassert(isequal(nperiodos(b),y_correct))\r\n%%\r\nb=10;\r\ny_correct = [2 4 5 8 10 16 20 25 32 40 50 64 80 100];\r\nassert(isequal(nperiodos(b),y_correct))\r\n%%\r\nb=29;\r\ny_correct = [29];\r\nassert(isequal(nperiodos(b),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":289312,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":11,"test_suite_updated_at":"2019-02-13T21:28:22.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2019-02-13T21:27:15.000Z","updated_at":"2019-02-16T21:35:00.000Z","published_at":"2019-02-13T21:28:22.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA periodic number depends on the base b where we are working. So, for example the number 2/3 in decimal base is periodic(0.666666666) but if we are working in base 3, the same number can be expressed as 2/10, and the result is not periodic (0.2). By this way, it is possible to enunciate:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn base 2 or 3, all numbers will produce periodics numbers unless the number is the base or power of the base\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn decimal base, numbers as 2,5,8,40,50 for example will never produce periodics numbers.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBy this way, you have to find when a number in any base can produce periodics numbers or not, and then find the values less or equal than 100 that in this base will never produce a periodic number.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"problem_search":{"problems":[{"id":44849,"title":"Given a base n, find the y values less or equal than 100(without 1), such that they will never produce a periodic number if we divide any whole number between some of them","description":"A periodic number depends on the base b where we are working. So, for example the number \r\n2/3 in decimal base is periodic(0.666666666) but if we are working in base 3, the same number can be expressed as 2/10, and the result is not periodic (0.2). \r\nBy this way, it is possible to enunciate:\r\n\r\n* In base 2 or 3, all numbers will produce periodics numbers unless the number is the base or power of the base\r\n* In decimal base, numbers as 2,5,8,40,50 for example will never produce periodics numbers. \r\n\r\nBy this way, you have to find when a number in any base can produce periodics numbers or not, and then find the values less or equal than 100 that in this base will never produce a periodic number.","description_html":"\u003cp\u003eA periodic number depends on the base b where we are working. So, for example the number \r\n2/3 in decimal base is periodic(0.666666666) but if we are working in base 3, the same number can be expressed as 2/10, and the result is not periodic (0.2). \r\nBy this way, it is possible to enunciate:\u003c/p\u003e\u003cul\u003e\u003cli\u003eIn base 2 or 3, all numbers will produce periodics numbers unless the number is the base or power of the base\u003c/li\u003e\u003cli\u003eIn decimal base, numbers as 2,5,8,40,50 for example will never produce periodics numbers.\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eBy this way, you have to find when a number in any base can produce periodics numbers or not, and then find the values less or equal than 100 that in this base will never produce a periodic number.\u003c/p\u003e","function_template":"function y = nperiodos(b)\r\ny=b;\r\nend","test_suite":"%%\r\nb = 2;\r\ny_correct = [2 4 8 16 32 64];\r\nassert(isequal(nperiodos(b),y_correct))\r\n%%\r\nb=3;\r\ny_correct = [3 9 27 81];\r\nassert(isequal(nperiodos(b),y_correct))\r\n%%\r\nb=60;\r\ny_correct = [2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30 32 36 40 45 48 50 54 60 64 72 75 80 81 90 96 100];\r\nassert(isequal(nperiodos(b),y_correct))\r\n%%\r\nb=50;\r\ny_correct = [2 4 5 8 10 16 20 25 32 40 50 64 80 100];\r\nassert(isequal(nperiodos(b),y_correct))\r\n%%\r\nb=10;\r\ny_correct = [2 4 5 8 10 16 20 25 32 40 50 64 80 100];\r\nassert(isequal(nperiodos(b),y_correct))\r\n%%\r\nb=29;\r\ny_correct = [29];\r\nassert(isequal(nperiodos(b),y_correct))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":289312,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":11,"test_suite_updated_at":"2019-02-13T21:28:22.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2019-02-13T21:27:15.000Z","updated_at":"2019-02-16T21:35:00.000Z","published_at":"2019-02-13T21:28:22.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA periodic number depends on the base b where we are working. So, for example the number 2/3 in decimal base is periodic(0.666666666) but if we are working in base 3, the same number can be expressed as 2/10, and the result is not periodic (0.2). By this way, it is possible to enunciate:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn base 2 or 3, all numbers will produce periodics numbers unless the number is the base or power of the base\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn decimal base, numbers as 2,5,8,40,50 for example will never produce periodics numbers.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBy this way, you have to find when a number in any base can produce periodics numbers or not, and then find the values less or equal than 100 that in this base will never produce a periodic number.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"errors":[],"facets":[[],[{"value":"medium","count":1,"selected":false}]],"term":"tag:\"least common multiple\"","page":1,"per_page":50,"sort":"map(difficulty_value,0,0,999) asc"}}