{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-16T00:12:35.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-04-16T00: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":60571,"title":"Find polygonal numbers that are Blum integers","description":"A polygonal number is the number of dots arranged in the shape of a regular polygon. For example, 15 is a triangular number because dots can be arranged in the shape of a triangle with rows of 1, 2, 3, 4, and 5 dots. The number 16 is a square number because dots can be arranged in four rows of four. \r\nA Blum integer is a semiprime—that is, the product of two distinct primes—whose factors have the form  for some integer . The number 21 is a Blum integer because its two prime factors, 3 and 7, have the form  with  and . \r\nRecently JessicaR had occasion to point out the properties of the number 57 to me. She observed, among other things, that 57 is both a Blum integer () and an icosagonal (i.e., 20-gonal) number. \r\nWrite a function that takes as input a maximum value  and a number of sides  and returns the largest n-gonal number (i.e., polygonal number with  sides) that is a Blum integer. If there are no numbers in the range 1 to  that work, return y = [].","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 258px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 129px; transform-origin: 407px 129px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 6.60833px 8px; transform-origin: 6.60833px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Polygonal_number\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003epolygonal number\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 301.458px 8px; transform-origin: 301.458px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is the number of dots arranged in the shape of a regular polygon. For example, 15 is a triangular number because dots can be arranged in the shape of a triangle with rows of 1, 2, 3, 4, and 5 dots. The number 16 is a square number because dots can be arranged in four rows of four. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 6.60833px 8px; transform-origin: 6.60833px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/60561\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003eBlum integer\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 275.75px 8px; transform-origin: 275.75px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is a semiprime—that is, the product of two distinct primes—whose factors have the form \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAkCAYAAAAXSR0AAAAD4UlEQVRoQ+2ZOasVQRCF3/sFrpEYuQRioKCigQoK7iCIimsgGLgEZioqZupTAyNxw9glFRQX0EAjNVAQDFwQMXRB/QF6DnRB3bF7unumZrwPeuDw7r3T69fVVdX9RkfKY0pg1LS10thIAWpsBAVoAWpMwLi5YqFDAHQKxjAHegt9i4xnKd5Ph5ZDN6BnxuPvoznOgU/KfBsFpRdofCE0H3odmNER/L4SWqPeT01YgD4ApfQxD4WOQdsqhR/g+0HoY6iR3C1PUOdcY3VApb/3+DATegktSpnJEJQhzCfQd+iaG89WZ0T8+gOaHTKOHKA0/adqwilA/7jyR/H3/BDAig2B7uyds86rlcLb8f1mbD6pQKWjh2hQtkEMqF6AZajXhf+UPmg1k2O0Et5zB/6EqjClquy42/iBgP95UoHeQs2J0CllpTGg2j2k9pMw54Ei1kD31cBkx/chxoUz0ImmQNnJYWg1NC0DqHROR742l1RieWugsW7FQoPGFLMccdAb3ZbV27jOQukivrrRdek/+wQqfQWtk/ONAWWKRL8p5p0KdD3q3HVABTzrroOOu9/phy66hYpZRuh9X0DFsM5iILXBtQ7oabfNuV0lgU8FyroEVw0WUt8qSHUNdAbmsAWSVJELSwu9oJgMLHYIKAd6B1oB6eQ9Fagk/zoacpWvQ3qBmlqm1OsSKKP4HojuiwcZ/TAu7PJB9QGty8VSgHJVP7je9+MvUxDW2wmdDK1sDVk5+vmKzMWPVyDuBPr50PO7Yhi5C0kmeyFtqTK3gbZ8QJki8fHlWSlAdQJM/7kE2gQ1jfRyOMiFoMsH88bMRnVs8GYvVaBMkcag3dAvT2diEXy1A/riyuiLg0v47QBEK2VA4+c2E2L6FXr0duQEQ89jvLA6qYk78x4mqkAld8xcuIGLEp6BJ7kG2Kl8jh0Ecvtk+S59aGg8cmBJAsrovCDRInjhIdFfbmAYeF65+sw/30CSPtXmb01o/meg3l0Xy0Or84z5ULoMBgk+vGXiNZecLmpvacYRUHFpGzDme9VxWwNlQOPlCf3nLNeZhqwjIwfWJOrrOfS95SUDeo5BJKdNdcYSs1CJyHp7yyDoS2mlzOlWQXQPdBVtHmugEnB8F8mcB2MM57EZ8l6uW1qohl3dDjrdkBx1MQYV+xdKDLY1UHFP0u9lfPgETXA7j34zeEpipVygtCpJbqv/CpCTBdv15ZyEegiiX2271WXC1kB5KGECrwMzU67P0KMUA8gFGrOYvt/LWZv9WuWZreYw3oG2mnwXlQtQY6oFaAFqTMC4uWKhBagxAePmioUWoMYEjJv7C2ea6CXYSgVmAAAAAElFTkSuQmCC\" width=\"42\" height=\"18\" alt=\"4k+3\" style=\"width: 42px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 31.1083px 8px; transform-origin: 31.1083px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e for some integer \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ek\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 273.808px 8px; transform-origin: 273.808px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. The number 21 is a Blum integer because its two prime factors, 3 and 7, have the form \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAkCAYAAAAXSR0AAAAD4UlEQVRoQ+2ZOasVQRCF3/sFrpEYuQRioKCigQoK7iCIimsgGLgEZioqZupTAyNxw9glFRQX0EAjNVAQDFwQMXRB/QF6DnRB3bF7unumZrwPeuDw7r3T69fVVdX9RkfKY0pg1LS10thIAWpsBAVoAWpMwLi5YqFDAHQKxjAHegt9i4xnKd5Ph5ZDN6BnxuPvoznOgU/KfBsFpRdofCE0H3odmNER/L4SWqPeT01YgD4ApfQxD4WOQdsqhR/g+0HoY6iR3C1PUOdcY3VApb/3+DATegktSpnJEJQhzCfQd+iaG89WZ0T8+gOaHTKOHKA0/adqwilA/7jyR/H3/BDAig2B7uyds86rlcLb8f1mbD6pQKWjh2hQtkEMqF6AZajXhf+UPmg1k2O0Et5zB/6EqjClquy42/iBgP95UoHeQs2J0CllpTGg2j2k9pMw54Ei1kD31cBkx/chxoUz0ImmQNnJYWg1NC0DqHROR742l1RieWugsW7FQoPGFLMccdAb3ZbV27jOQukivrrRdek/+wQqfQWtk/ONAWWKRL8p5p0KdD3q3HVABTzrroOOu9/phy66hYpZRuh9X0DFsM5iILXBtQ7oabfNuV0lgU8FyroEVw0WUt8qSHUNdAbmsAWSVJELSwu9oJgMLHYIKAd6B1oB6eQ9Fagk/zoacpWvQ3qBmlqm1OsSKKP4HojuiwcZ/TAu7PJB9QGty8VSgHJVP7je9+MvUxDW2wmdDK1sDVk5+vmKzMWPVyDuBPr50PO7Yhi5C0kmeyFtqTK3gbZ8QJki8fHlWSlAdQJM/7kE2gQ1jfRyOMiFoMsH88bMRnVs8GYvVaBMkcag3dAvT2diEXy1A/riyuiLg0v47QBEK2VA4+c2E2L6FXr0duQEQ89jvLA6qYk78x4mqkAld8xcuIGLEp6BJ7kG2Kl8jh0Ecvtk+S59aGg8cmBJAsrovCDRInjhIdFfbmAYeF65+sw/30CSPtXmb01o/meg3l0Xy0Or84z5ULoMBgk+vGXiNZecLmpvacYRUHFpGzDme9VxWwNlQOPlCf3nLNeZhqwjIwfWJOrrOfS95SUDeo5BJKdNdcYSs1CJyHp7yyDoS2mlzOlWQXQPdBVtHmugEnB8F8mcB2MM57EZ8l6uW1qohl3dDjrdkBx1MQYV+xdKDLY1UHFP0u9lfPgETXA7j34zeEpipVygtCpJbqv/CpCTBdv15ZyEegiiX2271WXC1kB5KGECrwMzU67P0KMUA8gFGrOYvt/LWZv9WuWZreYw3oG2mnwXlQtQY6oFaAFqTMC4uWKhBagxAePmioUWoMYEjJv7C2ea6CXYSgVmAAAAAElFTkSuQmCC\" width=\"42\" height=\"18\" alt=\"4k+3\" style=\"width: 42px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 16.3333px 8px; transform-origin: 16.3333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e with \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAkCAYAAAAq23xmAAADEUlEQVRoQ+1YO08VURD2/gKDWlKhFlZYSKBQChLjg4pKkIaOR2EpiUBFMNHSGB+JtqKxhqiFDXRQaEJCwaOkQvwJ+n3kzM3s3vPYe3fv7t7kbDLZzT175s58M/PNnG1ciJcXgUbEx49ABCiQIRGgCFA+EokZVEAG3YaOfsgo5BNkO19MKt99GRbcMFbs4/7HZ5Evg55i4xjknlJwJaSwcvfdBjDQyxAC9BVyETIPeQv5CDm2bc1SYofYeBWyCxmqMQA+0yaxuA75DplWQR7E8y/IX8gtG0hZAPpn/nkR95c9CJCAQNNvQn6nfGClvHAlQAggpuWWUXgH917kn2+wmzThqoABrB0ZH+dwf68BDAEk6HJP6N06JpfOnucwcMlhpJNGQk4L+qzd+3VEIGDTGtafmXemcP/seJ+/PzJr5NsmYfsAItufmk29yj8SYBf/CF66UhJA+gB6iN0bRoOQGznpgYrKFzy/zshNev7Ik4wnOsIBRWdY70v5YNuiAUqUog8gSU+2wEtKqxB3u6StCT8PQC1E6lEmHbidDGLQORacXz6AdrDO2UBvIOl9gJCPvBOoxWjuZTvNe72Cgs2MSgSgdJDT23XwMgFka31U8hiy0gE4Gf0p/DUN0HWP3ZpOMgEkk6ek5ggeJkzmFO5FFxV2rcTewGieUzhA/TDPCWS76FSRqjvpYgmOc3GQZn/Wb5ZOEHKsii4mgZZKSB8zxGbdxcY1x9kA0tMn5589iLR73zQaAqiKLqapwtf9JNNaDq02gGbh6TvjrUyVMopTgY/sfCBV0cWYtQemAvhZY8FhoFRMC43YAJKxm/xzzSjUoOlIMIXr3tWkfFzBtQ3ETRxtAAnz63LSkZA0vAstzApXVEIlV+a6zHS2MpPysh6n0gBpnkiQFbzRSMvngWH83u7AWCYw8l8MMIHg4CtnLf62CmG3dnJrGiCS2ozRaju9E6QnEJ52615atkDQP35b5yDM6yeEXypc3a0nv/GUmoGh70GlGlPHP4sABaISAYoA5SvcmEExg2IG5UMgZlA+/P4DshKoJYbxGLEAAAAASUVORK5CYII=\" width=\"36\" height=\"18\" alt=\"k = 0\" style=\"width: 36px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 15.5583px 8px; transform-origin: 15.5583px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAkCAYAAAAq23xmAAACVklEQVRoQ+2YOy9FQRSF3V8gHqXKo1BREAoUEvGqVEQlUXglSs8oSSgFIaH1+AEELR0RQudRqrz+AWsle5LJjZzjzGzXcTKSnZncmJk936xZM3NyReEvkkAu8IkmEADFKCQACoD8TCQoSEFBLeijAtGG2EWc+61JalqXIZNixFNURlEKmkLDdkSn1UE56q+pmaJbIgQzjJhBzCK2XAGZdg+oVCEuEY1uOaWmFRedYEoko1ENQJ/S2TTKldRMNVkilaKaW5S0ijEtQPSfM+msFWUW/Meek7eCKMllAZSVE08V0DHg0KRPEF3JVJ3a/1YDRLd/yYD/5K+UGqAe9HwovdejvEGw827EnPx+gHLth95E4LUKunpGH5F3l5gx1AAtCoh3lKXWoGaApKZtJ+bDKdZYCwXoAgM1IKiSARm0DuW2+FHSCyPbGsP3AbSKxkceHagoiPeGR0nCrBg7HkQsIJLC8ZiPelMVQFTMnqRG/2lG9Ily1DMucIcqgDaQNG+bVNGp1O2tVuA5qQ6nAugNKZn3Ck3a1M1p5pJxZk4xmum1EOD76w5hjvsl1Odd6KBNZk6xEUxmUyDwFc87h3nRU001jiadmVNsHwD6xX+qBZQNzb6H0Kv+26nm7UHm84a9negf9+JFVBHvRx0IqmLcccv9VTMvQHbjXszAvpDZTw9zR2py3G5/BYcLvS47hDnwZJ6ImkP+Jwzef4Yk++9e74Q0Kb7037aW+YScvzgf+OEKsfMdqKx84/k1RQZAMWgDoADIb/cFBQUFBQX5EQgK8uMXPCiG3xe46H8lcng8nQAAAABJRU5ErkJggg==\" width=\"36\" height=\"18\" alt=\"k = 1\" style=\"width: 36px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 3.88333px 8px; transform-origin: 3.88333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 29.175px 8px; transform-origin: 29.175px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eRecently \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/profile/authors/8608872\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003eJessicaR\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 326.425px 8px; transform-origin: 326.425px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e had occasion to point out the properties of the number 57 to me. She observed, among other things, that 57 is both a Blum integer (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAkCAYAAAAXSR0AAAADv0lEQVRoQ+2ZOYsWQRCGd3+A4JEZiUesiIqBJoIHmigqChqYecYGipEXRoKBxy/Q/QFeCBpoJCqKgYJHIGjkgf4BfV/ogv7666O6p75dF3rgZXZ3umu6nqmuqpmdnuqHKYFpU2vd2FQHahwEHWgHakzA2FyP0DkCuhr3XQB9gz4br2E2zdGPNxU3XI6xS934dzj/KM3NRegSTD4PHYQWeYY+4ecj0LOS8f/oOn24AL1w/pSWtgkDrkL09RW0DDoOzUBnckGVAkqYD6AV0A3oN7QWOuCtZPM8gLoTa7zm/ODSCYRwc8dRXLwJHYNueQMZ3a/d77twvhczkgJKmNza5yA/zGn0CcSIfQjtKCxuLi9fxM2/uAUQkAYoH8Bd6Be0KvCd809DVzLXo30ow/0UlHqS13GN4c+bLp5LYhX3/qsE+hHjuCtTkcycyjTA4xJ0NlxDLEL5lN5DqeIjT4n5aH2FUxLdhzEnul0Stvhg+RDXZdZUWoYGqL+lw+3u2xfo0ShuaZskQnM3jTko83gtmYOCiYR5OxcRJZLuugao5E5OyfnGdLjd2V2D80jXUAuUxeoD9Bw6BBXbiMDhGqhWMLkEDVDZeSWgvg9j4GuASuVnDjnZAFPYaqBawmwBGs2PzoEseA1Qgtzq8pj0o6zwJwbktBxUa5haoCzGTx20XH0YBFQq/kIvb0ikMSkPKRQxqJOAqQXKcT8hCZqx/OgcN9vytCcVV26qaZSDNDryq784bjO+hfDIbbmcvdQ1TQ7lXL8wcReGdcLvwzl+rLhqtny4SPZi3BKEmmqAa5z2oU4CZk2EcixfCOTB0j95U9yCn5n+6Dd7VR48j7SXLUDDm6a2hhaqHxXRp641lBmnjVAxwUhka0SIPF5Cb6FH0Hf3t2iebQXqJ/AhQP2cye5Bnry2T9WyrgWasltsrYYCHfL6GStAmpZKC9EfZwFUenBueUYnv2OM9eGtQAVGa/HIVfNJQLUAegcA5Wtbcle2AuXr10poL1TzwZZRo2mNrKEOBern+Ww6igGVKpf6kCzOtuQ5DUzZqpZQhwAVHkxvxQ87MaBhG8N+7LHzcj/OBH15QpEZ5kcLqH4h4dq3QZp/47DS89snqz37bZXPMaBMvvugPZ53bBv4sZZtg2YxscIhcGrzbus87obdEN/ywoMBwkAJ0xUhbnS+b8CZPeh9SP3vntYcGgOm+RudZHKvPVrntdznDyZ9jcBW2ZptoKpFzedBHajx0+tAO1BjAsbmeoR2oMYEjM31CO1AjQkYm/sHoPv6JXrWKsoAAAAASUVORK5CYII=\" width=\"42\" height=\"18\" alt=\"3x19\" style=\"width: 42px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 137.317px 8px; transform-origin: 137.317px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e) and an icosagonal (i.e., 20-gonal) number. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 165.95px 8px; transform-origin: 165.95px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function that takes as input a maximum value \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ex\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 73.125px 8px; transform-origin: 73.125px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and a number of sides \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003en\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 124.867px 8px; transform-origin: 124.867px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and returns the largest n-gonal number (i.e., polygonal number with \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003en\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 218.967px 8px; transform-origin: 218.967px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e sides) that is a Blum integer. If there are no numbers in the range 1 to \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ex\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 54.4417px 8px; transform-origin: 54.4417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e that work, return \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 12.6083px 8px; transform-origin: 12.6083px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; \"\u003ey = []\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.94167px 8px; transform-origin: 1.94167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = ngonalBlum(x,n)\r\n  y = mod(n*(n-1)/2,4)==3;\r\nend","test_suite":"%%\r\nx = 60;\r\nn = 20;\r\ny = ngonalBlum(x,n);\r\ny_correct = 57;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = randi(7e6);\r\ns = [4 5 6 9 10 13 14 17 18 22];\r\nn = randi(9);\r\ny = ngonalBlum(x,s(n));\r\nassert(isempty(y))\r\n\r\n%%\r\nx = 1000;\r\nn = 7;\r\ny = ngonalBlum(x,n);\r\ny_correct = 469;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 5000;\r\nn = 8;\r\ny = ngonalBlum(x,n);\r\ny_correct = 1541;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 70000;\r\nn = 11;\r\ny = ngonalBlum(x,n);\r\ny_correct = 39433;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 500000;\r\nn = 12;\r\ny = ngonalBlum(x,n);\r\ny_correct = 470017;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 4000000;\r\nn = 12;\r\ny = ngonalBlum(x,n);\r\ny_correct = 3383353;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 75000;\r\nn = 15;\r\ny = ngonalBlum(x,n);\r\ny_correct = 13501;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 1e6;\r\nn = 15;\r\ny = ngonalBlum(x,n);\r\ny_correct = 831097;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 1e7;\r\nn = 16;\r\ny = ngonalBlum(x,n);\r\ny_correct = 9591661;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 4500000;\r\nn = 19;\r\ny = ngonalBlum(x,n);\r\ny_correct = 4088701;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 1e6*(1:10);\r\nn = 20;\r\ny = arrayfun(@(z) ngonalBlum(z,n),x);\r\ny_correct = [983401 1925617 2848217 3903257 4962497 4962497 6696017 7593697 8688737 9707377];\r\nassert(isequal(y,y_correct));\r\n\r\n%%\r\nx = randi([22 1e8],1,14);\r\nn = 21;\r\ny = arrayfun(@(z) ngonalBlum(z,n),x);\r\ny_correct = n*ones(size(x));\r\nassert(isequal(y,y_correct));\r\n\r\n%%\r\nx = 19670620;\r\nn = [3 7 8 11 12 15 16 19 20 21 23 24]; \r\ny = sum(arrayfun(@(m) ngonalBlum(x,m),n));\r\ny_correct = 199508128;\r\nassert(isequal(y,y_correct));","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2024-06-28T05:54:37.000Z","deleted_by":null,"deleted_at":null,"solvers_count":7,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2024-06-28T05:53:46.000Z","updated_at":"2025-10-01T14:42:05.000Z","published_at":"2024-06-28T05:54:37.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Polygonal_number\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003epolygonal number\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is the number of dots arranged in the shape of a regular polygon. For example, 15 is a triangular number because dots can be arranged in the shape of a triangle with rows of 1, 2, 3, 4, and 5 dots. The number 16 is a square number because dots can be arranged in four rows of four. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/60561\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eBlum integer\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:rPr/\u003e\u003cw:t\u003e is a semiprime—that is, the product of two distinct primes—whose factors have the form \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"4k+3\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e4k+3\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e for some integer \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"k\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ek\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. The number 21 is a Blum integer because its two prime factors, 3 and 7, have the form \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"4k+3\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e4k+3\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e with \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"k = 0\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ek = 0\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"k = 1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ek = 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eRecently \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/profile/authors/8608872\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eJessicaR\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:rPr/\u003e\u003cw:t\u003e had occasion to point out the properties of the number 57 to me. She observed, among other things, that 57 is both a Blum integer (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"3x19\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e3\\\\times19\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e) and an icosagonal (i.e., 20-gonal) number. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function that takes as input a maximum value \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and a number of sides \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"n\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and returns the largest n-gonal number (i.e., polygonal number with \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"n\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e sides) that is a Blum integer. If there are no numbers in the range 1 to \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e that work, return \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ey = []\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":60571,"title":"Find polygonal numbers that are Blum integers","description":"A polygonal number is the number of dots arranged in the shape of a regular polygon. For example, 15 is a triangular number because dots can be arranged in the shape of a triangle with rows of 1, 2, 3, 4, and 5 dots. The number 16 is a square number because dots can be arranged in four rows of four. \r\nA Blum integer is a semiprime—that is, the product of two distinct primes—whose factors have the form  for some integer . The number 21 is a Blum integer because its two prime factors, 3 and 7, have the form  with  and . \r\nRecently JessicaR had occasion to point out the properties of the number 57 to me. She observed, among other things, that 57 is both a Blum integer () and an icosagonal (i.e., 20-gonal) number. \r\nWrite a function that takes as input a maximum value  and a number of sides  and returns the largest n-gonal number (i.e., polygonal number with  sides) that is a Blum integer. If there are no numbers in the range 1 to  that work, return y = [].","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 258px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 129px; transform-origin: 407px 129px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 6.60833px 8px; transform-origin: 6.60833px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Polygonal_number\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003epolygonal number\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 301.458px 8px; transform-origin: 301.458px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is the number of dots arranged in the shape of a regular polygon. For example, 15 is a triangular number because dots can be arranged in the shape of a triangle with rows of 1, 2, 3, 4, and 5 dots. The number 16 is a square number because dots can be arranged in four rows of four. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 6.60833px 8px; transform-origin: 6.60833px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eA \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/60561\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003eBlum integer\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 275.75px 8px; transform-origin: 275.75px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is a semiprime—that is, the product of two distinct primes—whose factors have the form \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAkCAYAAAAXSR0AAAAD4UlEQVRoQ+2ZOasVQRCF3/sFrpEYuQRioKCigQoK7iCIimsgGLgEZioqZupTAyNxw9glFRQX0EAjNVAQDFwQMXRB/QF6DnRB3bF7unumZrwPeuDw7r3T69fVVdX9RkfKY0pg1LS10thIAWpsBAVoAWpMwLi5YqFDAHQKxjAHegt9i4xnKd5Ph5ZDN6BnxuPvoznOgU/KfBsFpRdofCE0H3odmNER/L4SWqPeT01YgD4ApfQxD4WOQdsqhR/g+0HoY6iR3C1PUOdcY3VApb/3+DATegktSpnJEJQhzCfQd+iaG89WZ0T8+gOaHTKOHKA0/adqwilA/7jyR/H3/BDAig2B7uyds86rlcLb8f1mbD6pQKWjh2hQtkEMqF6AZajXhf+UPmg1k2O0Et5zB/6EqjClquy42/iBgP95UoHeQs2J0CllpTGg2j2k9pMw54Ei1kD31cBkx/chxoUz0ImmQNnJYWg1NC0DqHROR742l1RieWugsW7FQoPGFLMccdAb3ZbV27jOQukivrrRdek/+wQqfQWtk/ONAWWKRL8p5p0KdD3q3HVABTzrroOOu9/phy66hYpZRuh9X0DFsM5iILXBtQ7oabfNuV0lgU8FyroEVw0WUt8qSHUNdAbmsAWSVJELSwu9oJgMLHYIKAd6B1oB6eQ9Fagk/zoacpWvQ3qBmlqm1OsSKKP4HojuiwcZ/TAu7PJB9QGty8VSgHJVP7je9+MvUxDW2wmdDK1sDVk5+vmKzMWPVyDuBPr50PO7Yhi5C0kmeyFtqTK3gbZ8QJki8fHlWSlAdQJM/7kE2gQ1jfRyOMiFoMsH88bMRnVs8GYvVaBMkcag3dAvT2diEXy1A/riyuiLg0v47QBEK2VA4+c2E2L6FXr0duQEQ89jvLA6qYk78x4mqkAld8xcuIGLEp6BJ7kG2Kl8jh0Ecvtk+S59aGg8cmBJAsrovCDRInjhIdFfbmAYeF65+sw/30CSPtXmb01o/meg3l0Xy0Or84z5ULoMBgk+vGXiNZecLmpvacYRUHFpGzDme9VxWwNlQOPlCf3nLNeZhqwjIwfWJOrrOfS95SUDeo5BJKdNdcYSs1CJyHp7yyDoS2mlzOlWQXQPdBVtHmugEnB8F8mcB2MM57EZ8l6uW1qohl3dDjrdkBx1MQYV+xdKDLY1UHFP0u9lfPgETXA7j34zeEpipVygtCpJbqv/CpCTBdv15ZyEegiiX2271WXC1kB5KGECrwMzU67P0KMUA8gFGrOYvt/LWZv9WuWZreYw3oG2mnwXlQtQY6oFaAFqTMC4uWKhBagxAePmioUWoMYEjJv7C2ea6CXYSgVmAAAAAElFTkSuQmCC\" width=\"42\" height=\"18\" alt=\"4k+3\" style=\"width: 42px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 31.1083px 8px; transform-origin: 31.1083px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e for some integer \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ek\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 273.808px 8px; transform-origin: 273.808px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. The number 21 is a Blum integer because its two prime factors, 3 and 7, have the form \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAkCAYAAAAXSR0AAAAD4UlEQVRoQ+2ZOasVQRCF3/sFrpEYuQRioKCigQoK7iCIimsgGLgEZioqZupTAyNxw9glFRQX0EAjNVAQDFwQMXRB/QF6DnRB3bF7unumZrwPeuDw7r3T69fVVdX9RkfKY0pg1LS10thIAWpsBAVoAWpMwLi5YqFDAHQKxjAHegt9i4xnKd5Ph5ZDN6BnxuPvoznOgU/KfBsFpRdofCE0H3odmNER/L4SWqPeT01YgD4ApfQxD4WOQdsqhR/g+0HoY6iR3C1PUOdcY3VApb/3+DATegktSpnJEJQhzCfQd+iaG89WZ0T8+gOaHTKOHKA0/adqwilA/7jyR/H3/BDAig2B7uyds86rlcLb8f1mbD6pQKWjh2hQtkEMqF6AZajXhf+UPmg1k2O0Et5zB/6EqjClquy42/iBgP95UoHeQs2J0CllpTGg2j2k9pMw54Ei1kD31cBkx/chxoUz0ImmQNnJYWg1NC0DqHROR742l1RieWugsW7FQoPGFLMccdAb3ZbV27jOQukivrrRdek/+wQqfQWtk/ONAWWKRL8p5p0KdD3q3HVABTzrroOOu9/phy66hYpZRuh9X0DFsM5iILXBtQ7oabfNuV0lgU8FyroEVw0WUt8qSHUNdAbmsAWSVJELSwu9oJgMLHYIKAd6B1oB6eQ9Fagk/zoacpWvQ3qBmlqm1OsSKKP4HojuiwcZ/TAu7PJB9QGty8VSgHJVP7je9+MvUxDW2wmdDK1sDVk5+vmKzMWPVyDuBPr50PO7Yhi5C0kmeyFtqTK3gbZ8QJki8fHlWSlAdQJM/7kE2gQ1jfRyOMiFoMsH88bMRnVs8GYvVaBMkcag3dAvT2diEXy1A/riyuiLg0v47QBEK2VA4+c2E2L6FXr0duQEQ89jvLA6qYk78x4mqkAld8xcuIGLEp6BJ7kG2Kl8jh0Ecvtk+S59aGg8cmBJAsrovCDRInjhIdFfbmAYeF65+sw/30CSPtXmb01o/meg3l0Xy0Or84z5ULoMBgk+vGXiNZecLmpvacYRUHFpGzDme9VxWwNlQOPlCf3nLNeZhqwjIwfWJOrrOfS95SUDeo5BJKdNdcYSs1CJyHp7yyDoS2mlzOlWQXQPdBVtHmugEnB8F8mcB2MM57EZ8l6uW1qohl3dDjrdkBx1MQYV+xdKDLY1UHFP0u9lfPgETXA7j34zeEpipVygtCpJbqv/CpCTBdv15ZyEegiiX2271WXC1kB5KGECrwMzU67P0KMUA8gFGrOYvt/LWZv9WuWZreYw3oG2mnwXlQtQY6oFaAFqTMC4uWKhBagxAePmioUWoMYEjJv7C2ea6CXYSgVmAAAAAElFTkSuQmCC\" width=\"42\" height=\"18\" alt=\"4k+3\" style=\"width: 42px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 16.3333px 8px; transform-origin: 16.3333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e with \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAkCAYAAAAq23xmAAADEUlEQVRoQ+1YO08VURD2/gKDWlKhFlZYSKBQChLjg4pKkIaOR2EpiUBFMNHSGB+JtqKxhqiFDXRQaEJCwaOkQvwJ+n3kzM3s3vPYe3fv7t7kbDLZzT175s58M/PNnG1ciJcXgUbEx49ABCiQIRGgCFA+EokZVEAG3YaOfsgo5BNkO19MKt99GRbcMFbs4/7HZ5Evg55i4xjknlJwJaSwcvfdBjDQyxAC9BVyETIPeQv5CDm2bc1SYofYeBWyCxmqMQA+0yaxuA75DplWQR7E8y/IX8gtG0hZAPpn/nkR95c9CJCAQNNvQn6nfGClvHAlQAggpuWWUXgH917kn2+wmzThqoABrB0ZH+dwf68BDAEk6HJP6N06JpfOnucwcMlhpJNGQk4L+qzd+3VEIGDTGtafmXemcP/seJ+/PzJr5NsmYfsAItufmk29yj8SYBf/CF66UhJA+gB6iN0bRoOQGznpgYrKFzy/zshNev7Ik4wnOsIBRWdY70v5YNuiAUqUog8gSU+2wEtKqxB3u6StCT8PQC1E6lEmHbidDGLQORacXz6AdrDO2UBvIOl9gJCPvBOoxWjuZTvNe72Cgs2MSgSgdJDT23XwMgFka31U8hiy0gE4Gf0p/DUN0HWP3ZpOMgEkk6ek5ggeJkzmFO5FFxV2rcTewGieUzhA/TDPCWS76FSRqjvpYgmOc3GQZn/Wb5ZOEHKsii4mgZZKSB8zxGbdxcY1x9kA0tMn5589iLR73zQaAqiKLqapwtf9JNNaDq02gGbh6TvjrUyVMopTgY/sfCBV0cWYtQemAvhZY8FhoFRMC43YAJKxm/xzzSjUoOlIMIXr3tWkfFzBtQ3ETRxtAAnz63LSkZA0vAstzApXVEIlV+a6zHS2MpPysh6n0gBpnkiQFbzRSMvngWH83u7AWCYw8l8MMIHg4CtnLf62CmG3dnJrGiCS2ozRaju9E6QnEJ52615atkDQP35b5yDM6yeEXypc3a0nv/GUmoGh70GlGlPHP4sABaISAYoA5SvcmEExg2IG5UMgZlA+/P4DshKoJYbxGLEAAAAASUVORK5CYII=\" width=\"36\" height=\"18\" alt=\"k = 0\" style=\"width: 36px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 15.5583px 8px; transform-origin: 15.5583px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAkCAYAAAAq23xmAAACVklEQVRoQ+2YOy9FQRSF3V8gHqXKo1BREAoUEvGqVEQlUXglSs8oSSgFIaH1+AEELR0RQudRqrz+AWsle5LJjZzjzGzXcTKSnZncmJk936xZM3NyReEvkkAu8IkmEADFKCQACoD8TCQoSEFBLeijAtGG2EWc+61JalqXIZNixFNURlEKmkLDdkSn1UE56q+pmaJbIgQzjJhBzCK2XAGZdg+oVCEuEY1uOaWmFRedYEoko1ENQJ/S2TTKldRMNVkilaKaW5S0ijEtQPSfM+msFWUW/Meek7eCKMllAZSVE08V0DHg0KRPEF3JVJ3a/1YDRLd/yYD/5K+UGqAe9HwovdejvEGw827EnPx+gHLth95E4LUKunpGH5F3l5gx1AAtCoh3lKXWoGaApKZtJ+bDKdZYCwXoAgM1IKiSARm0DuW2+FHSCyPbGsP3AbSKxkceHagoiPeGR0nCrBg7HkQsIJLC8ZiPelMVQFTMnqRG/2lG9Ily1DMucIcqgDaQNG+bVNGp1O2tVuA5qQ6nAugNKZn3Ck3a1M1p5pJxZk4xmum1EOD76w5hjvsl1Odd6KBNZk6xEUxmUyDwFc87h3nRU001jiadmVNsHwD6xX+qBZQNzb6H0Kv+26nm7UHm84a9negf9+JFVBHvRx0IqmLcccv9VTMvQHbjXszAvpDZTw9zR2py3G5/BYcLvS47hDnwZJ6ImkP+Jwzef4Yk++9e74Q0Kb7037aW+YScvzgf+OEKsfMdqKx84/k1RQZAMWgDoADIb/cFBQUFBQX5EQgK8uMXPCiG3xe46H8lcng8nQAAAABJRU5ErkJggg==\" width=\"36\" height=\"18\" alt=\"k = 1\" style=\"width: 36px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 3.88333px 8px; transform-origin: 3.88333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21px; text-align: left; transform-origin: 384px 21px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 29.175px 8px; transform-origin: 29.175px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eRecently \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/profile/authors/8608872\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003eJessicaR\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 326.425px 8px; transform-origin: 326.425px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e had occasion to point out the properties of the number 57 to me. She observed, among other things, that 57 is both a Blum integer (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAkCAYAAAAXSR0AAAADv0lEQVRoQ+2ZOYsWQRCGd3+A4JEZiUesiIqBJoIHmigqChqYecYGipEXRoKBxy/Q/QFeCBpoJCqKgYJHIGjkgf4BfV/ogv7666O6p75dF3rgZXZ3umu6nqmuqpmdnuqHKYFpU2vd2FQHahwEHWgHakzA2FyP0DkCuhr3XQB9gz4br2E2zdGPNxU3XI6xS934dzj/KM3NRegSTD4PHYQWeYY+4ecj0LOS8f/oOn24AL1w/pSWtgkDrkL09RW0DDoOzUBnckGVAkqYD6AV0A3oN7QWOuCtZPM8gLoTa7zm/ODSCYRwc8dRXLwJHYNueQMZ3a/d77twvhczkgJKmNza5yA/zGn0CcSIfQjtKCxuLi9fxM2/uAUQkAYoH8Bd6Be0KvCd809DVzLXo30ow/0UlHqS13GN4c+bLp5LYhX3/qsE+hHjuCtTkcycyjTA4xJ0NlxDLEL5lN5DqeIjT4n5aH2FUxLdhzEnul0Stvhg+RDXZdZUWoYGqL+lw+3u2xfo0ShuaZskQnM3jTko83gtmYOCiYR5OxcRJZLuugao5E5OyfnGdLjd2V2D80jXUAuUxeoD9Bw6BBXbiMDhGqhWMLkEDVDZeSWgvg9j4GuASuVnDjnZAFPYaqBawmwBGs2PzoEseA1Qgtzq8pj0o6zwJwbktBxUa5haoCzGTx20XH0YBFQq/kIvb0ikMSkPKRQxqJOAqQXKcT8hCZqx/OgcN9vytCcVV26qaZSDNDryq784bjO+hfDIbbmcvdQ1TQ7lXL8wcReGdcLvwzl+rLhqtny4SPZi3BKEmmqAa5z2oU4CZk2EcixfCOTB0j95U9yCn5n+6Dd7VR48j7SXLUDDm6a2hhaqHxXRp641lBmnjVAxwUhka0SIPF5Cb6FH0Hf3t2iebQXqJ/AhQP2cye5Bnry2T9WyrgWasltsrYYCHfL6GStAmpZKC9EfZwFUenBueUYnv2OM9eGtQAVGa/HIVfNJQLUAegcA5Wtbcle2AuXr10poL1TzwZZRo2mNrKEOBern+Ww6igGVKpf6kCzOtuQ5DUzZqpZQhwAVHkxvxQ87MaBhG8N+7LHzcj/OBH15QpEZ5kcLqH4h4dq3QZp/47DS89snqz37bZXPMaBMvvugPZ53bBv4sZZtg2YxscIhcGrzbus87obdEN/ywoMBwkAJ0xUhbnS+b8CZPeh9SP3vntYcGgOm+RudZHKvPVrntdznDyZ9jcBW2ZptoKpFzedBHajx0+tAO1BjAsbmeoR2oMYEjM31CO1AjQkYm/sHoPv6JXrWKsoAAAAASUVORK5CYII=\" width=\"42\" height=\"18\" alt=\"3x19\" style=\"width: 42px; height: 18px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 137.317px 8px; transform-origin: 137.317px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e) and an icosagonal (i.e., 20-gonal) number. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 165.95px 8px; transform-origin: 165.95px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function that takes as input a maximum value \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ex\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 73.125px 8px; transform-origin: 73.125px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and a number of sides \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003en\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 124.867px 8px; transform-origin: 124.867px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and returns the largest n-gonal number (i.e., polygonal number with \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003en\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 218.967px 8px; transform-origin: 218.967px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e sides) that is a Blum integer. If there are no numbers in the range 1 to \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ex\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 54.4417px 8px; transform-origin: 54.4417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e that work, return \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 12.6083px 8px; transform-origin: 12.6083px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; \"\u003ey = []\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.94167px 8px; transform-origin: 1.94167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = ngonalBlum(x,n)\r\n  y = mod(n*(n-1)/2,4)==3;\r\nend","test_suite":"%%\r\nx = 60;\r\nn = 20;\r\ny = ngonalBlum(x,n);\r\ny_correct = 57;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = randi(7e6);\r\ns = [4 5 6 9 10 13 14 17 18 22];\r\nn = randi(9);\r\ny = ngonalBlum(x,s(n));\r\nassert(isempty(y))\r\n\r\n%%\r\nx = 1000;\r\nn = 7;\r\ny = ngonalBlum(x,n);\r\ny_correct = 469;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 5000;\r\nn = 8;\r\ny = ngonalBlum(x,n);\r\ny_correct = 1541;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 70000;\r\nn = 11;\r\ny = ngonalBlum(x,n);\r\ny_correct = 39433;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 500000;\r\nn = 12;\r\ny = ngonalBlum(x,n);\r\ny_correct = 470017;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 4000000;\r\nn = 12;\r\ny = ngonalBlum(x,n);\r\ny_correct = 3383353;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 75000;\r\nn = 15;\r\ny = ngonalBlum(x,n);\r\ny_correct = 13501;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 1e6;\r\nn = 15;\r\ny = ngonalBlum(x,n);\r\ny_correct = 831097;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 1e7;\r\nn = 16;\r\ny = ngonalBlum(x,n);\r\ny_correct = 9591661;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 4500000;\r\nn = 19;\r\ny = ngonalBlum(x,n);\r\ny_correct = 4088701;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nx = 1e6*(1:10);\r\nn = 20;\r\ny = arrayfun(@(z) ngonalBlum(z,n),x);\r\ny_correct = [983401 1925617 2848217 3903257 4962497 4962497 6696017 7593697 8688737 9707377];\r\nassert(isequal(y,y_correct));\r\n\r\n%%\r\nx = randi([22 1e8],1,14);\r\nn = 21;\r\ny = arrayfun(@(z) ngonalBlum(z,n),x);\r\ny_correct = n*ones(size(x));\r\nassert(isequal(y,y_correct));\r\n\r\n%%\r\nx = 19670620;\r\nn = [3 7 8 11 12 15 16 19 20 21 23 24]; \r\ny = sum(arrayfun(@(m) ngonalBlum(x,m),n));\r\ny_correct = 199508128;\r\nassert(isequal(y,y_correct));","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2024-06-28T05:54:37.000Z","deleted_by":null,"deleted_at":null,"solvers_count":7,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2024-06-28T05:53:46.000Z","updated_at":"2025-10-01T14:42:05.000Z","published_at":"2024-06-28T05:54:37.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Polygonal_number\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003epolygonal number\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is the number of dots arranged in the shape of a regular polygon. For example, 15 is a triangular number because dots can be arranged in the shape of a triangle with rows of 1, 2, 3, 4, and 5 dots. The number 16 is a square number because dots can be arranged in four rows of four. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/60561\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eBlum integer\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:rPr/\u003e\u003cw:t\u003e is a semiprime—that is, the product of two distinct primes—whose factors have the form \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"4k+3\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e4k+3\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e for some integer \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"k\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ek\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. The number 21 is a Blum integer because its two prime factors, 3 and 7, have the form \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"4k+3\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e4k+3\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e with \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"k = 0\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ek = 0\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"k = 1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ek = 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eRecently \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/profile/authors/8608872\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eJessicaR\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:rPr/\u003e\u003cw:t\u003e had occasion to point out the properties of the number 57 to me. She observed, among other things, that 57 is both a Blum integer (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"3x19\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e3\\\\times19\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e) and an icosagonal (i.e., 20-gonal) number. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function that takes as input a maximum value \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and a number of sides \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"n\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and returns the largest n-gonal number (i.e., polygonal number with \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"n\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e sides) that is a Blum integer. If there are no numbers in the range 1 to \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e that work, return \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ey = []\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"term":"tag:\"semiprime\"","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"tag:\"semiprime\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"semiprime\"","","\"","semiprime","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007fbf0c67ac00\u003e":null,"#\u003cMathWorks::Search::Field:0x00007fbf0c67ab60\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007fbf0c67a2a0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007fbf0c67ae80\u003e":1,"#\u003cMathWorks::Search::Field:0x00007fbf0c67ade0\u003e":50,"#\u003cMathWorks::Search::Field:0x00007fbf0c67ad40\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007fbf0c67aca0\u003e":"tag:\"semiprime\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007fbf0c67aca0\u003e":"tag:\"semiprime\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"cody-search","password":"78X075ddcV44","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"semiprime\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"semiprime\"","","\"","semiprime","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007fbf0c67ac00\u003e":null,"#\u003cMathWorks::Search::Field:0x00007fbf0c67ab60\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007fbf0c67a2a0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007fbf0c67ae80\u003e":1,"#\u003cMathWorks::Search::Field:0x00007fbf0c67ade0\u003e":50,"#\u003cMathWorks::Search::Field:0x00007fbf0c67ad40\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007fbf0c67aca0\u003e":"tag:\"semiprime\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007fbf0c67aca0\u003e":"tag:\"semiprime\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":60571,"difficulty_rating":"medium"}]}}