{"group":{"group":{"id":59890,"name":"Polynomials","lockable":false,"created_at":"2023-01-16T05:45:16.000Z","updated_at":"2026-02-05T15:25:03.000Z","description":"Your friendly neighboourhood series of terms.\nWith great powers, comes great response-terms.\n\n(Image credit - https://www.desmos.com/calculator/9sh9x7orh5)\n","is_default":false,"created_by":223089,"badge_id":62,"featured":false,"trending":false,"solution_count_in_trending_period":1,"trending_last_calculated":"2025-12-14T00:00:00.000Z","image_id":7177,"published":true,"community_created":true,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"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\u003eYour friendly neighboourhood series of terms.\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\u003eWith great powers, comes great response-terms.\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\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\u003e(Image credit - \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.desmos.com/calculator/9sh9x7orh5\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehttps://www.desmos.com/calculator/9sh9x7orh5\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\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\"}]}","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: 141px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 289.5px 70.5px; transform-origin: 289.5px 70.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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: 266.5px 10.5px; text-align: left; transform-origin: 266.5px 10.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: 140.958px 8px; transform-origin: 140.958px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eYour friendly neighboourhood series of terms.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 266.5px 10.5px; text-align: left; transform-origin: 266.5px 10.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: 151.3px 8px; transform-origin: 151.3px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWith great powers, comes great response-terms.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 266.5px 10.5px; text-align: left; transform-origin: 266.5px 10.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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 266.5px 10.5px; text-align: left; transform-origin: 266.5px 10.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: 47.0583px 8px; transform-origin: 47.0583px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e(Image credit - \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.desmos.com/calculator/9sh9x7orh5\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003ehttps://www.desmos.com/calculator/9sh9x7orh5\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: 2.33333px 8px; transform-origin: 2.33333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 266.5px 10.5px; text-align: left; transform-origin: 266.5px 10.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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","published_at":"2026-02-05T15:25:03.000Z"},"current_player":null},"problems":[{"id":1583,"title":"generate a matrix of Legendre polynomials","description":"input = x - the degree of the polynomial\r\noutput = matrix of Legendre polynomials","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: 51px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 25.5px; transform-origin: 407px 25.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 123px 8px; transform-origin: 123px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003einput = x - the degree of the polynomial\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 126px 8px; transform-origin: 126px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eoutput = matrix of Legendre polynomials\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = leg_poly(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 2;\r\ny_correct = [0 1; 1 0];\r\nassert(isequal(leg_poly(x),y_correct))\r\n\r\n%%\r\nx = 3;\r\ny_correct = [0 0 1; 0 1 0; 1.5 0 -0.5];\r\nassert(all(abs(leg_poly(x)-y_correct)\u003c1e-4,'all'))\r\n\r\n%%\r\nx = 4;\r\ny_correct = [0 0 0 1; 0 0 1 0; 0 1.5 0 -0.5; 2.5 0 -1.5 0];\r\nassert(all(abs(leg_poly(x)-y_correct)\u003c1e-4,'all'))\r\n\r\n%%\r\nx = 1;\r\ny_correct = 1;\r\nassert(all(abs(leg_poly(x)-y_correct)\u003c1e-4,'all'))\r\n\r\n%%\r\nx = 6;\r\ny_correct = [0 0 0 0 0 1; 0 0 0 0 1 0; 0 0 0 1.5 0 -0.5; 0 0 2.5 0 -1.5 0; 0 4.375 0 -3.75 0 0.375; 7.875 0 -8.75 0 1.875 0]\r\nassert(all(abs(leg_poly(x)-y_correct)\u003c1e-4,'all'))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":4,"created_by":14267,"edited_by":223089,"edited_at":"2023-02-27T05:04:12.000Z","deleted_by":null,"deleted_at":null,"solvers_count":22,"test_suite_updated_at":"2023-02-27T05:04:12.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2013-06-06T13:55:33.000Z","updated_at":"2026-01-18T14:21:40.000Z","published_at":"2013-06-06T13:55:33.000Z","restored_at":null,"restored_by":null,"spam":null,"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\u003einput = x - the degree of the polynomial\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\u003eoutput = matrix of Legendre polynomials\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\"}]}"},{"id":43753,"title":"Laguerre Polynomials","description":"Create a square lower diagonal matrix containing the first n Laguerre Polynomial coefficients. For n=6, the Laguerre Matrix is:\r\n\r\n  1\t0\t0\t0\t0\t0\t0\r\n  1\t1\t0\t0\t0\t0\t0\r\n  2\t4\t1\t0\t0\t0\t0\r\n  6\t18\t9\t1\t0\t0\t0\r\n  24\t96\t72\t16\t1\t0\t0\r\n  120\t600\t600\t200\t25\t1\t0\r\n  720\t4320\t5400\t2400\t450\t36\t1\r\n\r\nSee \u003chttps://en.wikipedia.org/wiki/Laguerre_polynomials Laguerre Polynomials\u003e for more information.","description_html":"\u003cp\u003eCreate a square lower diagonal matrix containing the first n Laguerre Polynomial coefficients. For n=6, the Laguerre Matrix is:\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003e1\t0\t0\t0\t0\t0\t0\r\n1\t1\t0\t0\t0\t0\t0\r\n2\t4\t1\t0\t0\t0\t0\r\n6\t18\t9\t1\t0\t0\t0\r\n24\t96\t72\t16\t1\t0\t0\r\n120\t600\t600\t200\t25\t1\t0\r\n720\t4320\t5400\t2400\t450\t36\t1\r\n\u003c/pre\u003e\u003cp\u003eSee \u003ca href = \"https://en.wikipedia.org/wiki/Laguerre_polynomials\"\u003eLaguerre Polynomials\u003c/a\u003e for more information.\u003c/p\u003e","function_template":"function y = laguerre(n)\r\n  y = x;\r\nend","test_suite":"%%\r\nx = 6;\r\ny_correct = [1,0,0,0,0,0,0;1,1,0,0,0,0,0;2,4,1,0,0,0,0;6,18,9,1,0,0,0;24,96,72,16,1,0,0;120,600,600,200,25,1,0;720,4320,5400,2400,450,36,1];\r\nassert(isequal(laguerre(x),y_correct))\r\n%%\r\nx = 1;\r\ny_correct = [1,0;1,1];\r\nassert(isequal(laguerre(x),y_correct))\r\n%%\r\nx = 3;\r\ny_correct = [1,0,0,0;1,1,0,0;2,4,1,0;6,18,9,1];\r\nassert(isequal(laguerre(x),y_correct))\r\n%%\r\nx = 10;\r\ny_correct = [1,0,0,0,0,0,0,0,0,0,0;1,1,0,0,0,0,0,0,0,0,0;2,4,1,0,0,0,0,0,0,0,0;6,18,9,1,0,0,0,0,0,0,0;24,96,72,16,1,0,0,0,0,0,0;120,600,600,200,25,1,0,0,0,0,0;720,4320,5400,2400,450,36,1,0,0,0,0;5040,35280,52920,29400,7350,882,49,1,0,0,0;40320,322560,564480,376320,117600,18816,1568,64,1,0,0;362880,3265920,6531840,5080320,1905120,381024,42336,2592,81,1,0;3628800,36288000,81648000,72576000,31752000,7620480,1058400,86400,4050,100,1];\r\nassert(isequal(laguerre(x),y_correct))","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":93456,"edited_by":223089,"edited_at":"2022-09-02T13:57:46.000Z","deleted_by":null,"deleted_at":null,"solvers_count":25,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-12-07T22:24:15.000Z","updated_at":"2026-01-02T17:37:55.000Z","published_at":"2016-12-07T22:24:15.000Z","restored_at":null,"restored_by":null,"spam":null,"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\u003eCreate a square lower diagonal matrix containing the first n Laguerre Polynomial coefficients. For n=6, the Laguerre Matrix is:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[1  0  0  0  0  0  0\\n1  1  0  0  0  0  0\\n2  4  1  0  0  0  0\\n6  18  9  1  0  0  0\\n24  96  72  16  1  0  0\\n120  600  600  200  25  1  0\\n720  4320  5400  2400  450  36  1]]\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSee\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Laguerre_polynomials\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eLaguerre Polynomials\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e for more information.\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\"}]}"},{"id":44226,"title":"Logistic map","description":"The sequence defined by x_n = 4*r*x_{n-1}*(1-x_{n-1}) and a given 0 \u003c x_1 \u003c 1 turns each x_n into a polynomial of r.\r\nWrite a function f(x_1, r, n) that returns the coefficients p of this polynomial as a row vector (starting with highest degree) and the value v of this polynomial at r.","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: 72px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 36px; transform-origin: 407px 36px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 365.5px 8px; transform-origin: 365.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe sequence defined by x_n = 4*r*x_{n-1}*(1-x_{n-1}) and a given 0 \u0026lt; x_1 \u0026lt; 1 turns each x_n into a polynomial of r.\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: pre-wrap; 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: 380px 8px; transform-origin: 380px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function f(x_1, r, n) that returns the coefficients p of this polynomial as a row vector (starting with highest degree) and the value v of this polynomial at r.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [p, v] = f(x, r, n)\r\n  p = x;\r\n  v = x;\r\nend","test_suite":"%%\r\nx = 0.5;\r\nr = 0.999;\r\nn = 1;\r\nx_correct = 0.5;\r\np_correct = 0.5;\r\n[p, x] = f(x, r, n);\r\nassert(isequal(p,p_correct));\r\nassert(x==x_correct);\r\n\r\n%%\r\nx = 0.5;\r\nr = 0.999;\r\nn = 2;\r\nx_correct = 0.999;\r\np_correct = [1 0];\r\n[p, x] = f(x, r, n);\r\nassert(isequal(p,p_correct));\r\nassert(x==x_correct);\r\n\r\n%%\r\nx = 0.5;\r\nr = 0.999;\r\nn = 3;\r\nx_correct = 0.00399;\r\np_correct = [-4 4 0 0];\r\n[p, x] = f(x, r, n);\r\nassert(isequal(p,p_correct));\r\nassert(abs(x-x_correct)\u003c1E-5);\r\n\r\n%%\r\nx = 0.5;\r\nr = 0.999;\r\nn = 5;\r\nx_correct = 0.06248;\r\n[p, x] = f(x, r, n);\r\nassert(isequal(p(1:3),[-16384 65536 -98304]));\r\nassert(abs(x-x_correct)\u003c1E-5);\r\n\r\n%%\r\nx = 0.5;\r\nr = 0.999;\r\nn = 6;\r\nx_correct = 0.23407;\r\n[p, x] = f(x, r, n);\r\nassert(abs(sum(p(1:3))+2.25485E10)\u003c1E5);\r\nassert(abs(x-x_correct)\u003c1E-5);\r\n\r\n%%\r\nx = 0.5;\r\nr = 0.9999;\r\nn = 7;\r\nx_correct = 0.09891;\r\n[p, x] = f(x, r, n);\r\nassert(abs(sum(p))==4194304);\r\nassert(abs(x-x_correct)\u003c1E-5);\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":2,"created_by":135136,"edited_by":223089,"edited_at":"2023-02-09T10:13:38.000Z","deleted_by":null,"deleted_at":null,"solvers_count":12,"test_suite_updated_at":"2023-02-09T10:13:38.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2017-05-27T17:11:41.000Z","updated_at":"2026-01-25T12:30:24.000Z","published_at":"2017-05-27T17:18:57.000Z","restored_at":null,"restored_by":null,"spam":null,"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\u003eThe sequence defined by x_n = 4*r*x_{n-1}*(1-x_{n-1}) and a given 0 \u0026lt; x_1 \u0026lt; 1 turns each x_n into a polynomial of r.\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 f(x_1, r, n) that returns the coefficients p of this polynomial as a row vector (starting with highest degree) and the value v of this polynomial at r.\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\"}]}"},{"id":52303,"title":"Bessel Polynomials","description":"Return the n-th Bessel polynomial\r\nAssume that n is a non-negative finite integer.\r\n\r\nbessel_poly(0)\r\nans = 1\r\n\r\nbessel_poly(1)\r\nans = [1 1]\r\n\r\nbessel_poly(2)\r\nans = [3 3 1]","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: 254.467px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 127.233px; transform-origin: 407px 127.233px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 33.5px 8px; transform-origin: 33.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eReturn the\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \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: 4px 8px; transform-origin: 4px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003en\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: 8.5px 8px; transform-origin: 8.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e-th\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Bessel_polynomials\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eBessel\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: 35.5px 8px; transform-origin: 35.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e polynomial\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 39px 8px; transform-origin: 39px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAssume that\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \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: 4px 8px; transform-origin: 4px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003en\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: 99px 8px; transform-origin: 99px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is a non-negative finite integer.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 163.467px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404px 81.7333px; transform-origin: 404px 81.7333px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 56px 8.5px; transform-origin: 56px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ebessel_poly(0)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 28px 8.5px; transform-origin: 28px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eans = 1\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 56px 8.5px; transform-origin: 56px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ebessel_poly(1)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 44px 8.5px; transform-origin: 44px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eans = [1 1]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 56px 8.5px; transform-origin: 56px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003ebessel_poly(2)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 52px 8.5px; transform-origin: 52px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eans = [3 3 1]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = bessel_poly(x)\r\n%Wear a mask\r\n%Stay home, stay safe\r\nend","test_suite":"%%\r\nx = 1;\r\ny = [1 1];\r\nassert(isequal(bessel_poly(x),y))\r\n\r\n%%\r\nx = 2;\r\ny = [3 3 1];\r\nassert(isequal(bessel_poly(x),y))\r\n\r\n%%\r\nx = 5;\r\ny = [945 945 420 105 15 1];\r\nassert(isequal(bessel_poly(x),y))\r\n\r\n%%\r\nx = 4;\r\ny = [105 105 45 10 1];\r\nassert(isequal(bessel_poly(x),y))\r\n\r\n%%\r\nx = 7;\r\ny = [135135 135135 62370 17325 3150 378 28 1];\r\nassert(isequal(bessel_poly(x),y))\r\n\r\n%%\r\nx = 3;\r\ny = [15 15 6 1];\r\nassert(isequal(bessel_poly(x),y))\r\n\r\n%%\r\nx = 0;\r\ny = 1;\r\nassert(isequal(bessel_poly(x),y))","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":223089,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":17,"test_suite_updated_at":"2021-07-14T18:48:29.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2021-07-14T18:29:16.000Z","updated_at":"2025-12-25T08:43:09.000Z","published_at":"2021-07-14T18:46:50.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\u003eReturn the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e-th\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Bessel_polynomials\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eBessel\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e polynomial\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\u003eAssume that\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is a non-negative finite integer.\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[bessel_poly(0)\\nans = 1\\n\\nbessel_poly(1)\\nans = [1 1]\\n\\nbessel_poly(2)\\nans = [3 3 1]]]\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\"}]}"},{"id":55205,"title":"Nuemann Polynomials","description":"Return the coefficients of nth (n\u003e=0) Nuemann polynomial, (a sequence in 1/t) as polynomials in alpha.\r\nThe expected output is a cell array, with each element as a polynomial in increasing powers of alpha. For example - \r\n%Note - The coefficient of 1/t^0 will always be 0\r\n\r\nn=1;\r\nO1(alpha)(t)=2*(1+alpha)/t^2\r\nOutput =  {[0], [2 2]}\r\n%explanation - Coefficient of 1/t^1 1/t^2 in which each element is polynomial in alpha\r\n\r\nn=3;\r\nO3(alpha)(t)=2*(1+alpha)*(3+alpha)/t^2 + 8*(1+alpha)*(2+alpha)*(3+alpha)/t^4\r\nOutput = {[0], [2 8 6], [0], [8 48 88 48]}\r\n%explanation - Coefficient of 1/t^1 1/t^2 1/t^3 1/t^4\r\n","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: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 316.767px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 408px 158.383px; transform-origin: 408px 158.383px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 79.2167px 8px; transform-origin: 79.2167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eReturn the coefficients of \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: 33.8417px 8px; transform-origin: 33.8417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003enth (n\u0026gt;=0)\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\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Neumann_polynomial\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eNuemann polynomial\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: 51.7333px 8px; transform-origin: 51.7333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, (a sequence in \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: 8.16667px 8px; transform-origin: 8.16667px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e1/t\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: 13.6083px 8px; transform-origin: 13.6083px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e) as \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: 69.2px 8px; transform-origin: 69.2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003epolynomials in alpha\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\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 78.5667px 8px; transform-origin: 78.5667px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe expected output is a \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: 34.1px 8px; transform-origin: 34.1px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ecell array, \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: 248.575px 8px; transform-origin: 248.575px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ewith each element as a polynomial in increasing powers of alpha. For example - \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 224.767px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 405px 112.383px; transform-origin: 405px 112.383px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 188.65px 8.5px; tab-size: 4; transform-origin: 188.65px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e%Note - The coefficient of 1/t^0 will always be 0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 15.4px 8.5px; tab-size: 4; transform-origin: 15.4px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003en=1;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 107.8px 8.5px; tab-size: 4; transform-origin: 107.8px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eO1(alpha)(t)=2*(1+alpha)/t^2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 84.7px 8.5px; tab-size: 4; transform-origin: 84.7px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOutput =  {[0], [2 2]}\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 331.1px 8.5px; tab-size: 4; transform-origin: 331.1px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e%explanation - Coefficient of 1/t^1 1/t^2 in which each element is polynomial in alpha\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 15.4px 8.5px; tab-size: 4; transform-origin: 15.4px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003en=3;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 292.6px 8.5px; tab-size: 4; transform-origin: 292.6px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eO3(alpha)(t)=2*(1+alpha)*(3+alpha)/t^2 + 8*(1+alpha)*(2+alpha)*(3+alpha)/t^4\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 161.7px 8.5px; tab-size: 4; transform-origin: 161.7px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOutput = {[0], [2 8 6], [0], [8 48 88 48]}\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 204.05px 8.5px; tab-size: 4; transform-origin: 204.05px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e%explanation - Coefficient of 1/t^1 1/t^2 1/t^3 1/t^4\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 385px 10.5px; text-align: left; transform-origin: 385px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; 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: 0px 8px; transform-origin: 0px 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 = nuemannpoly(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('nuemannpoly.m');\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'switch')))\r\nassert(isempty(strfind(filetext, 'elseif')))\r\nassert(isempty(strfind(filetext, 'str2num')))\r\n\r\n%%\r\nx=1;\r\ny={[0], [2 2]};\r\nassert(isequal(nuemannpoly(x),y))\r\n\r\n%%\r\nx=2;\r\ny={[1 2], [0], [4 12 8]};\r\nassert(isequal(nuemannpoly(x),y))\r\n\r\n%%\r\nx=3;\r\ny={[0], [2 8 6], [0], [8 48 88 48]};\r\nassert(isequal(nuemannpoly(x),y))\r\n\r\n%%\r\nx=4;\r\ny={0.5*[1 5 4], [0], 4*[1 7 14 8], [0], 16*[1 10 35 50 24]};\r\nassert(isequal(nuemannpoly(x),y))\r\n\r\n%%\r\nx=5;\r\ny={[0], [1 8 17 10], [0], 8*[1 11 41 61 30], [0], 32*[1 15 85 225 274 120]};\r\nassert(isequal(nuemannpoly(x),y))\r\n\r\n%%\r\nx=7;\r\ny={[0], [1 13 53 83 42]/3, [0], 4*[1 17 105 295 374 168],...\r\n   [0], 32*[1 22 190 820 1849 2038 840], [0], 128*[1 28 322 1960 6769 13132 13068 5040]};\r\nassert(isequal(nuemannpoly(x),y))\r\n\r\n%%\r\nx=10;\r\ny={[1 20 135 400 524 240]/120, [0], [1 25 235 1075 2524 2860 1200]/6 , [0],...\r\n   8*[1 31 385 2485 8974 18004 18360 7200]/3, [0],...\r\n   32*[1 38 602 5180 26369 80822 144388 135720 50400], [0],...\r\n   256*[1 46 906 9996 67809 291774 790964 1290824 1136160 403200], [0],...\r\n   1024*[1 55 1320 18150 157773 902055 3416930 8409500 12753576 10628640 3628800]};\r\nassert(isequal(nuemannpoly(x),y))","published":true,"deleted":false,"likes_count":2,"comments_count":6,"created_by":223089,"edited_by":223089,"edited_at":"2025-09-27T03:40:14.000Z","deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":"2025-09-27T03:40:14.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2022-07-17T07:16:57.000Z","updated_at":"2026-01-25T13:29:12.000Z","published_at":"2022-07-17T10:44:29.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\u003eReturn the coefficients of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003enth (n\u0026gt;=0)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Neumann_polynomial\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eNuemann polynomial\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, (a sequence in \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e1/t\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e) as \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003epolynomials in alpha\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\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\u003eThe expected output is a \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ecell array, \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003ewith each element as a polynomial in increasing powers of alpha. For example - \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[%Note - The coefficient of 1/t^0 will always be 0\\n\\nn=1;\\nO1(alpha)(t)=2*(1+alpha)/t^2\\nOutput =  {[0], [2 2]}\\n%explanation - Coefficient of 1/t^1 1/t^2 in which each element is polynomial in alpha\\n\\nn=3;\\nO3(alpha)(t)=2*(1+alpha)*(3+alpha)/t^2 + 8*(1+alpha)*(2+alpha)*(3+alpha)/t^4\\nOutput = {[0], [2 8 6], [0], [8 48 88 48]}\\n%explanation - Coefficient of 1/t^1 1/t^2 1/t^3 1/t^4]]\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\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\"}]}"},{"id":55270,"title":"Cyclotomic Polynomials","description":"Given a Natural number (N), return the corresponding Cyclotomic Polynomial.","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: 21px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 10.5px; transform-origin: 407px 10.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 171px 8px; transform-origin: 171px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eGiven a Natural number (N), return the corresponding \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Cyclotomic_polynomial\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eCyclotomic Polynomial\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: 2px 8px; transform-origin: 2px 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 = cyclcopoly(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('cyclcopoly.m');\r\nassert(isempty(strfind(filetext, 'assignin')))\r\nassert(isempty(strfind(filetext, 'switch')))\r\nassert(isempty(strfind(filetext, 'else')))\r\n\r\n%%\r\nx = 1;\r\ny = [1 -1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 2;\r\ny = ones(1,x);\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 3;\r\ny = ones(1,x);\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 4;\r\ny = [1 0 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 6;\r\ny = [1 -1 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 7;\r\ny = ones(1,x);\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 8;\r\ny = [1 0 0 0 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 9;\r\ny = [1 0 0 1 0 0 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 10;\r\ny = [1 -1 1 -1 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 12;\r\ny = [1 0 -1 0 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 14;\r\ny = [1 -1 1 -1 1 -1 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 15;\r\ny = [1 -1 0 1 -1 1 0 -1 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 16;\r\ny = [1 0 0 0 0 0 0 0 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 18;\r\ny = [1 0 0 -1 0 0 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 24;\r\ny = [1 0 0 0 -1 0 0 0 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 25;\r\ny = [1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 27;\r\ny = [1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 28;\r\ny = [1 0 -1 0 1 0 -1 0 1 0 -1 0 1];\r\nassert(isequal(cyclcopoly(x),y))\r\n\r\n%%\r\nx = 105;\r\ny = [1 1 1 0 0 -1 -1 -2 -1 -1 0 0 1 1 1 1 1 1 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 1 1 1 1 1 1 0 0 -1 -1 -2 -1 -1 0 0 1 1 1]; \r\nassert(isequal(cyclcopoly(x),y))\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":223089,"edited_by":223089,"edited_at":"2022-10-12T05:04:52.000Z","deleted_by":null,"deleted_at":null,"solvers_count":9,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2022-08-01T15:05:58.000Z","updated_at":"2026-01-25T13:40:43.000Z","published_at":"2022-08-01T15:05:58.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\u003eGiven a Natural number (N), return the corresponding \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Cyclotomic_polynomial\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eCyclotomic Polynomial\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\"}]}"},{"id":55335,"title":"Generate Bernoulli polynomials","description":"The Bernoulli polynomial  is a polynomial of order  with the properties that  and for  \r\n,\r\nwhere the prime denotes differentiation with respect to , and\r\n.\r\nTherefore, , , , etc. Notice that  is the th Bernoulli number.\r\nWrite a function to generate the Bernoulli polynomial of order . Use MATLAB's approach for specifying the coefficients. For example, the function should return [1 -1/2] for  and [1 -1 1/6] for .","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: 201px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 100.5px; transform-origin: 407px 100.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 22px; 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 11px; text-align: left; transform-origin: 384px 11px; white-space: pre-wrap; 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: 78.5917px 8px; transform-origin: 78.5917px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe Bernoulli polynomial \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAoCAYAAACy29cjAAAE00lEQVRoQ+2Zu8tVRxTF/f6CGGMlBMRHJyiJj0Ybi2giWCka0lgEfIEgSMSopFADGkWw8IWFjZoQ0wQSooKNFgYTSCqbaGGtEZM/QNdPZsswzGOfc+6NQc6Bxf3uPTN79qzZs/ae+WZmjU+TgZlmi7HBrJEkRxCMJL0FJL2nORwRDgtPHfNpNflEDd4XLrQaxu//z5EEQVeE/cKfXSbVaPuF3s8Xdnlttkha7TD074QnwZAQ9IuwV7jr8KFrk7Pq8Ew46OnoIeljGfoyMfZbCH8ms1x4KFwUrguPPAM32nwbbLom0XO8v9Rvj/Bzq3+LJOvPqq4LX27oc31kmH3+U/gOeVsGErVV/VnpxWEhWnPo+55d8qNnHC9Jf8vYu8GbHfpMhY9J7Qzvv9bnkAhghYnKE31n36HffbUFVX3ykLRARthO9izTH6mQIobHo2ha0cHRuClRdE2YO+UosjFd43lIMkMYhqxFGQJikkptPLyxqqT6eDt7+vVtg6Y+EXK747VND0mIKDrDc07IhWa83VLN8k7AIpaU/19sNfOruTAekmI9+lSWIS1+mByCbZq1QX83M0aGOYvYNXrXNe3jwzzhQYjE2DwCXStTbIGLXLRIWqoB/ohGTLUCB04LlAE8ORK9kWRbNqd5ORv4tl34SFgYGsRJg/c/hHfURPiYK0+a47ZISgX5Kw20JDi0OQyMBn0j3Co44SXJyoyWT2aP6HkeIoeMCFH4skp4RyC6kQekYk5AzheIPi8UI7jlUFwfWQHJQIi3rR6OUBIMPTp0JSmecLyY+PWdcEpIpSFHErvhjlAU7xpJpvxmON0GcRFJOG8UumpJ7PQQkmyi2GMxbwreWs36FhNGjaSUBEI2fY7pBzuyWKj3Pa0PIQm/XgTnWLCcr7ko4rdBJMUEEL5kn/RJhb1vZsPuUJKsP5HUpZhtZtVaJJkYMoFasWUrSLshRxJblL7VttVzRFKXc5/pWWfh9hxFICWNpGrlWor38Hszy1T6W19r0iWibXE610meowgOxe347q1xcvM1wrsSbf2sBOga0WxTklRxi5bY8xxFcCbekrXjCOJomY9J8eRKBuyRmby3hkzuV8HuhXK6REV9UsgVkpbBqzJRIik+iuQM2N2zXY/kMhtRtk3gHgoCPxO4jl0pcITJaQChj81admJr8dwTLgnfC3bWS+ulfXpXu4G0DE4UFi8LcySl+5tsQaX9T3COm0omYmc1isnSRb05TQ3ygUC5sEngWqV0DoTw0vEmrodwJ826qUaWsnKYyqtic7ZQvXWISUKsYZ7P1nNbDR4LHEVqdZGFP5F0VGDL2VYu6RfR9GHBcYtgfMSH3G0BC7O28t7mZsmpqaOtY0mLrNr7uGKPtyxbGeTupbBnOnMoEDrEh1pfFvB3oVmZT5Mk2+9x3WLboXQvZZOyEzwn/En8YyElC0n5XHAVndMkyeqP+ExkeuepYyCZrIXg9z3q5CKJBUDw0SGX3WmSxI0fdzhx5jA9oqrmP7OtVM+EEPlJEYW9A8JuL0GwPC2STI/ScxRHGLIXtdBVwXNrgC3XijvEC7HuvH2nRRKpGuG9LMR3Opa5zuj3Ple8Dh4m32RaJE3e0zdocSTJQf5I0kiSgwFHkzGSRpIcDDiajJHkIOkl3/gcOG9yxJsAAAAASUVORK5CYII=\" alt=\"B_n(x)\" style=\"width: 36.5px; height: 20px;\" width=\"36.5\" height=\"20\"\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: 76.2417px 8px; transform-origin: 76.2417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is a polynomial of order \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: 74.675px 8px; transform-origin: 74.675px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e with the properties that \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,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\" alt=\"B_0(x) = 1\" style=\"width: 62.5px; height: 20px;\" width=\"62.5\" height=\"20\"\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: 25.6667px 8px; transform-origin: 25.6667px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and for \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAkCAYAAADFGRdYAAADeklEQVRoQ+2YuYoVQRSGZx5AXCMxcgkGBA3USARNFH0AHUwExS0WdzAQdzTTcYKByVQ0VRRBA0MNZiIDl9DI5RH0/6XOcLruqbqna/reG9wqOPSd7tNV1V//Z+mZnKijL4HJvh7VYaJCcoigQqqQHAQcLlVJFVKSwFpcmQpXP+P4K8dq3JS0GzCuwgjpOWwl7AxsBjYH+27BGidIRwDgCewN7KhSzzb8XoD9ge2wQI0LJAFBoWyHLUaKOY+/78A+wXbGahoFpI0pWTtyaKnLa9y4PwUB57mnb2Hy0zjO6oVGAekvNnAzlwNKSSTu0yriulcSfl9xfpMFchSQfmMjq8NGhwHrBta6HNabxvFpAhLPHw7XCGspiXsgsRJsgOk4pjzXw34UhA7nOw67qGCxulDica7oQlQSapzLykeyhuQl/t2AaUE6CKetsH2wXeFBJE4J5xGM8c3BirC38OEsWKw8FwrnSwHVyvVCaoSlBUlUMo9VKTsOHlfA3sNuh3OsBhy5OE9tXJ8fNCzmQBleSM9wA1uG/yMXbh9xnX0D3+5ZGMujqIZN2YcwRy7OPZDEZ1CwBBJVvyazIf1MLkjc8M8wIUPtBOw+TJLeKfx+HK6vwzHb1rchBd+uYWlIWzJ7ZZp5GfbqgqRvoJKY6akmGcxLbOd57UBLCF53gXUSN0jYU83XYK+8k8BvYOEmELgXNlmbo01JMmSSvdtiw21dmR/PhRci9zIHPsgoIl6jpLo1GspUTpLGigseit5cvxa/LQjLP4bDfHIJ9hZmfoRmFtUv3Ju4G89sQdIQGrEZNiL5qF8iLIHFtTk/Q5lD4LxooZx4Xfmw5fmeTw7lLIrr+dC1IOmkHKuIc8pkbAB1niqBIvfIvzB0/0XlLAeOzM3c9gXGLj+3Z0khPcKwIGmiccnUVU9KPyveLVhJtxzDYf671xEc/dKkm6ZKrAqnC1VPSFqQpBpY1LV0Wfqvh5BIfTSm1BXDYdXSLcZyVJm6V/o+K+REGGYhiiFpolao6VDkg/HNL3WmzifT1WYYcHTYcW02yBIFjAy+aObA5JdDDIkPfCzMavU/nPQhbBVsHpb6os7xolKHCSfeC59xD4wVlOMdjP1eMl14/gvgFIjbjZssgeteoGvHUUDq+hkGPl+F5EBcIVVIDgIOl6qkCslBwOFSlVQhOQg4XP4Bu/bLJWBU5hIAAAAASUVORK5CYII=\" alt=\"n \u003e 0\" style=\"width: 36.5px; height: 18px;\" width=\"36.5\" height=\"18\"\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\u003cdiv style=\"block-size: 22px; 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 11px; text-align: left; transform-origin: 384px 11px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,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\" alt=\"B'_n(x) = n B_{n-1}(x)\" style=\"width: 113.5px; height: 20px;\" width=\"113.5\" height=\"20\"\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\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 169.858px 8px; transform-origin: 169.858px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ewhere the prime denotes differentiation with respect 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: 15.5583px 8px; transform-origin: 15.5583px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, and\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 27px; 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 13.5px; text-align: left; transform-origin: 384px 13.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"vertical-align:-8px\"\u003e\u003cimg src=\"data:image/png;base64,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\" alt=\"Integral[B_n(x),{x,0,1}] = 0\" style=\"width: 80px; height: 27px;\" width=\"80\" height=\"27\"\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\u003cdiv style=\"block-size: 22px; 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 11px; text-align: left; transform-origin: 384px 11px; white-space: pre-wrap; 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: 34.225px 8px; transform-origin: 34.225px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eTherefore, \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,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\" alt=\"B_1(x) = x-1/2\" style=\"width: 81px; height: 20px;\" width=\"81\" height=\"20\"\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\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,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\" alt=\"B_2(x) = x^2 – x + 1/6\" style=\"width: 121.5px; height: 21px;\" width=\"121.5\" height=\"21\"\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\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASoAAAAqCAYAAAAETRabAAANHElEQVR4Xu2d6+t/2RTHZ/4Adw+HfhkeKEUGI/GAwoREyDX9yjSuKcZl3PLA/ZZSGDL1S4QiEtPMKB6Q3CPkgUsT8cgl/gHWK+fNan/3/ezz+ZzP97tPrb7f3++cs/faa6/13muvtfb5Xn3VvKYEpgSmBHYugat3zt9kb0pgSmBK4KoJVFMJpgSmBHYvgQlUu5+iyeCUwJTABKqLpwP3syE/2eiBy9Bvs59/OydieJCN4zHL2P5pP798jsZ2TqaobxgTqPrkdqpvPdwY/47R75cBPMp+/sPomUbfO9VBLXy/wH5+wejOBazus4ztJfbz9o6xPd7eeZzRBzveveivvNwE8KdOuUdlt3egYvV/l9E7Bq2MT7N2HmD0qQuqST+2cb/TKRAKdavRl4ww9FO9AJUrRtc7PfmE/f7KBawe0qE/X7R3/m70qlMVyhH5ltyQ4ZBrz0AFSH3e6M1Gvxgy2v828iajSxdQATHma4xC5fm3/d9PjB49UMaHbgpQ+oZR6DlhMHhWT4/cy/GI7v3V6BGDde/QcjlGfzgDnzO678jOS0CFUZcuYgHfMvpD6cGG+yjKHUavM9piS4Jis+V5WwNP5/FRGeQrbHBbeJm0j5fzsEV4399oPjGO2PYOHXqqUStQ4V2+2+jBmUn38TAe+5XRD43OS7yvV9+xLa6cJ0oI4rFG96rVixJQ0Y4QkpWJCwP/pBEARUe419wjNsDkjgAWVn3iKFsCye+s/dca9cQveidxb++xED3SaItt33us3bdGBoz3dqPRSC85JVcB1f3tgRYAYYt8V0L/AN/XJ8aGbfTGxPamGz38aOFLLQyAO0DG4hFeWb2oASoa1ITzexjPoHM6UfDyiSuVEKNhMD1xhRbhshX6+gH6aeHpUM96Y2PR+bDRSI+Y+WMe32+EF3VPo2cYsahxsQj5eNJW42Zb2xp/Q5/h79qETGQLPMNihyxJSvir1YPbavyHbjfniSKn3xqBE+AFCwceK3LWhUyfY3RmEasFKiZc1wvtlzDO4VfPVsUIhcnkf9roENkWVk7oIgVMUZiXGV0yEnDgDd8wSKtR1suLTEPwU/CerrY2Zi14gEgLCMMjHl8sZif+QxsA3N5r9PxFhiOBmG3SPYz+0jiOQdPZ1ExuJ8S9pxiFjgwOw0eNBPZR/KgBKgT1c8dubKVhC/GB5Zk1gVmlmFtd9SZpuocP3V8vn1u9p3IFVrmUB9HaN8AP6MW2Wtoa0OZWcTHaph/iRW83as08sVB+yCgWs8vdo1/uy0N4gv0+IgwiD25LebXOcex5eaKxBETuHm3pPr+zfT6zm6oBKr8KpkDIAxWrSS4ImRMKSo6Cj1rdSxOwdTC51P8e7gusR3g4yJPMYi7+JO98lCHHZMjWEx5aEwRalGMLpVb+XHbU28ooYDkVoMp5ouAD8exczJkFRR7pGbCrASofn8K9jXXmO+nd+glVKUc4xLZPCn5ocNwDOHkeMMDvGm0JHOpPQLDG6y7JD4Nhe9GTICCEgUcUexc5ceW8JMmS5y4aUGFHn0ksDsjzR0a5Lbh3drqAysenYsrsJwe3rTeYrpW91WB8mpgjE14Y3Huu0R+NUlsAFQbWgHbJSI5x36d6Q4BXdXWuLEBZ3a2TF8hGcYrauJH4j80f+sIxID/n/N+zIkCDjLhKmca1hYreFkbVYG3pUfnykVBHuIft4AmVHActQGvCBwIqMORMDVbJOFHiby6THO4dFZS9xe4T40hG7CutV4zWTjC8vdTo3kZKd3pvTsCn7lNCbO3XD0fGUjnE5GMlRYi9qNICxqVApF/FBcC8iweDp8G2JTz/hiH81GjLUhCdMEBeNel7eGeR8Vkh6YVq7DRmspYkQ5RxCrOJSom/2J7JlSiMKFTU1m+kx7gFUCn4j+1wNlL2K9n52CX6E0ugeZ3MeaK1tqFdWXTXVgIqn80DiACC65aeBQ4oCrGA0mpVYlgTUuIp1o7eFZg+1B66YkSdFGlxEDq1FZBytXpy8OG3xaXxpe5HV5CGxnzaV9k7QOxJRh8zAsx/trRHwoP+3mL0a6MXLf/eCqS0Kr/R+vFpaPTo1Ual2ibvoSgkIGD9pb1/eRnjn+2nT/iE4hOY5cRaU6hYmhYZW8mwS+34+1sAlW/fb7mwgd8YkYggoYA3hR6xEOS2bSQRehIXng+dIog6FCVQYN/pV667l5Yv2U8MX0i8lkmaXQNUPoiJsK8sSlyTdZEx9MQURnhUFM62Bn1DRZeBsJgAzgBUrE7J83uISmqdbEBfSE17sKotiZACA24AbqxAlflXlXMoG/4dhgTCZ5RU6Vms1JZirLXjivEZ+7+tgcpn9bGBZxt9tUEnR4QOtPtJxqdzQOVThggwRDpf6Mn9HkP3E7MGqLyw8RhYAWrT0gKqQwfxaxW15jkP1Gu34DX99T4Dn+8z0imHmkyjQJh5BbR6M8o5nrVtXNN2a/xN/CgOl+LvpsX2BNSp50pgnBu/FgNkzDha6grXeqIqJcErS27Pc0DlYzypkgNvIAwyFiQF0Pj+EStezntYA1RMgoTdWh5xHoDKA3XNNqcXaEa853UmlUX2/fjnR26pwkVyTZxOtlIbX/V9+63XGvn29K3+fNa+JSCusENN3DE1NoAObzt7UiEHVD4Ym1L+0OsKFUkTiDuswCiBRuolwj3vWqCSsFsDmb3ZxjVKtcW7Auoa40/1v8ZoWhYIv51LxQ7FowfhGg+sVbalIzOl9hR47jXWWo8KG/p2hpk1H0D0i0FLsfVaT5T3wZliFjgHVFImZJNbyXz5gjcSFICDnaClQElgEtsmKnDfIijNW5gJalkVZJw98YkRMSrG0JP18zrrszQtgBHqPfEGfemgZKDh/VwJSPisFqUa78979jXPt/KdK1QstbUWpErtc3/rGBV9eKekxWtd8/GAapCCwRRQ1Ryb4X2flQkBDQX4gZHPBur52Kq/JvuGoEm9K/DfImwBZCmxEFOqvWT94INL428B6hpjGf2M5FaaJ/TwK0vnjGkNCKfGUDoWk3rvECB1CKCSV0RmnNhh7WJQOhaT05kmkMoBVc2xGd4PtwolA1FdVmw/LXBsDcpL0OxxdTq7VthSBDyyng/HjfCo1mb9AGmUjCC1UvQlABgNPK3t4a1z5YpM5SVT7cx1qwOslkPGOd56CxVrYzPYx1pveUuPSgvBZePzNUaEZGoXAzCCspPWBATOCl8tyW33VMT9v4RYyovwnkIq5uHrd1CGmtgI7eZSn6xubBdrsw4StD4N4dP0CFDKHouJwbPS0jW8txrjIZ4PYwTarguokQ+G3gPCvfzTJ6f9U6UhqS8QhP35bJL38AXCtENl+poasJ5CRelU6ntVGgf8k2Bawx9tbQVUGsdHrA/sxjsncjj4/88a3R5RhtyRmZTu1Hih4st/Mju69fMn3FMApAOa2U8zOG5VHUwVLEaUmjwUh0+PpD5jCm8fX9rljxTgRfggZpghutnuayJiwpOHV/IEe4129HtMNEWbeBR3G91i5FcmD9TUtvEhw+j3fUYztrTnAYWkRviF1ly9DPcuG5F9YwsCuHqAFQgTVGax61nNw2G3Fir6WCh8pC4ljkbo1Uigwr4o2EZ+fMrGg62fOxZulZDEnIaeBIRACplx7i91gRFnylBCjwoG3mCk7xTRGKuCvujJv59nJIBCGXNAwPMwSBU7Fa6qZk/VLEkAqa1LGBMLt4lhFrK0jcSwOUZwQ0Zwe7rlt9rMS/jXY3zgOXZ/67GEXjb9+Y+k8TuLS+wUg/fiY99z8gHfEd97ai1UDBM2JVmOKvwcCVQ+8RX7eADAraLc3McFBHi1duOTPSW5cf8MPnig0gHemoY4wNjzIS8ZUm4fXBKC4kKpg7Y1B3EZ45pgYI2MtnjGHxRNFfhJPmsKANfwDo/+7wYSg+O4DkczckdmpH88H/t7fBo7vI34e32thYqlMoJQZgDV2mNltDkSqHKHvGUTpUP8PNfqibbGcs+UWvRkutYoMe9qZUyVIahSdcSxnByvKMCaIr+1cpjvH08CtcHw43H4/54V8+txDLbgX7uanjKibn6OAVRsX4it5DI+CpL7GqzuQUZeXFM7M5KP2dZxJBAmIY7DxWn22uqJDhnlMYCqtLXTwIghcMC29HmOVkEoE8b+unR6v7Xt+fxpSGBNoeJpjHA7Lgl091bhd3O1JVDhIl5j5A8Ht7rcynKNAiva4xMnNZ8Y6RbqfHHXEjjF2OReBKpCzaF/XLRmcFsClYKAygz+yxji20hfC8CrxCfgNsrzQUlHFQuW+J739ymBue3vn5ejeaJbApXPUCGarf5Kbr/Y55sXUQKlouOLKJPaMVPesOYrDbX9nHluS6DqZmq+OCWwoQTY/o8oG9iQxd02fTTZTaDarU5MxqYEpgQkgQlUUxemBKYEdi+BCVS7n6LJ4JTAlMAEqqkDUwJTAruXwASq3U/RZHBKYEpgAtXUgSmBKYHdS+A/9gtJWNMfwWUAAAAASUVORK5CYII=\" alt=\"B_3(x) = x^3 – 3 x^2/2 + x/2\" style=\"width: 149px; height: 21px;\" width=\"149\" height=\"21\"\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: 52.4917px 8px; transform-origin: 52.4917px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, etc. Notice that \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAoCAYAAACy29cjAAAE8UlEQVRoQ+2Zu+sdVRDHk//ARCsrSbQTlMQkjRY2PsEqEoNNwEA0RUAURY1Y+EIFA4LPykZNQEvFKGiRNEERrX0U1j5C/APi9yNnZDzsmZm9v3tFZA8Md3fv7Dkz3zPPs9u3LSNFYHvKsTBsW0AqGMEC0v8ApCulw7Oip0W/FvTJWHaJ4QHRq3Pm+y9bEgC9J3pc9F2m/Yz/bxbvKdEdVaAykJgwG3+sWQnWA6BPRQ+LzmcC6H8s5OrGV+G/T7yPiPYV5k4DNyDdKXqym+zrtgsoc5PoR9E7og9FP1UWTnhOtzmfSvhQ9jkR8nwjukbEsyeaLJGLviGe30XZGilIJiO7enu7OatfTNXGXbr4uN0g7KEtAoWSKHCdKFPyIfG80Cl6TPdviZDz/mAONvh70T2i0PoydzMgftPFjnbzoH7fdiBxiVIIzOiF7ljT2x/EgVW+HHAaEFjwgQkgbFMzWZ7Xu2zqtZFUFZDwd4SxcaMu+kD6mJ691BiwppKvTwiGFX0gumpCcWM3C2DTRiDYPLwzJa/NZbrdrQefjICqgOQXBKwp1D1II57UhMTwVQPHu3P/nlkRz0fK+Y3NrIk1kRk9J0cFJIIoJsl4U3R8Yibvbn3MqoADjylGyo9cDaVIFozdolGisBCRbRouR2IaYlEBycejw5oM0PxAOVzMYlZougFiZrG3iCcKpJfbHGSmncF8PtlEYKbrZiDdICG+dYL0scIKM9vZKRCrlmQuG8UQL88ckKKNQ4dzoqmE9JfsGUh9QH5G71zftL63mT3m/Iro88D0K0DZzkcymULMNwekIQCax4AfunkGkjdZKyARkOCNCTOIU5QEW20d5oJ0RmsOg63+8xscgYQOuPBwvggkUu0vzgR6N/BFJLuaFmWJOc0FKUsQFpBZtgLScL4IpB6EqSDpBRkVdhVXg2cuSOtyN7OklUDyAIxMsQ/sq2a2Kkim0NyYVCkoV4pJtAcWdyJztZSM4FnhFlmVbUpUbfO+yVW1JPjIvqN6ypLBbJAqrQgC95aU+X4EklXSWZ3kC9fIQmzzsjbJwspw3VFMqrQiKOz5uI+EzmKTAZ4B7cuAUV3mNy+bz7Lg0IJHIFVaEW/6XEfZBsWsikYBxlTJgCt9JppqfTzIFuRHa5rrVpIJbQ5j2JSPQPKtyFScsbNnOx6ZEgYrOyLiHMrOdjiO3S+ihZkyb5RjzqjdQCHfCvXW608JMte1MifsFKZA8l02AuHTVNqXGuKcVKKI9WoUk6ODejNlguIeEY3kQRHHKqM+EMAr7Q0W+WWT6Vb9YpmARyYmUFcyLbq+KAoP+DxILPBoW6itPfz5Qv/8LKIViU4PvVtwzIrLmSuP4hfWtFcUHZeYYFgCoAPSFaKLDbhqi4R701L1h4j/UDxrSzKwov99xe5dFleGRqeBvHdBdLIBuhUZonexcvrP9IBwkyBZaqVOMXO2rDM6lzKl4PtIdJtoHR8WerDMVaP66e93NgmSZRhfpFm8q8QLQD4hig7zV7Ey+1x1VC+XmvJNgmQniP7Ay+IRNQlfZrNUz44T5NcFFAC9LiJYlwBiFzYFksWjvtqlCiZ7UQu9L6p8SGSudXziRl/mYsyab1MgUTwSeN8V+eNey1yv6fnw68QqPrTJdzYF0iZl/tfnXkAqQL6AtIBUQKDAsljSAlIBgQLLYkkFkP4EIyE/OPCO6ZcAAAAASUVORK5CYII=\" alt=\"B_n(0)\" style=\"width: 36.5px; height: 20px;\" width=\"36.5\" height=\"20\"\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: 20.6083px 8px; transform-origin: 20.6083px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is the \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: 7.775px 8px; transform-origin: 7.775px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eth \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/45831\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003eBernoulli 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: 1.94167px 8px; transform-origin: 1.94167px 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: pre-wrap; 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: 190.092px 8px; transform-origin: 190.092px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function to generate the Bernoulli polynomial of order \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: 188.658px 8px; transform-origin: 188.658px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Use MATLAB's approach for specifying the coefficients. For example, the function should return [1 -1/2] for \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAkCAYAAADFGRdYAAACUklEQVRoQ+2YuUoEQRCG3QcQz0iM1EQQNBAjETRR9AHUTFDwyj0wFLzARPAKhM3UB1A0MjBURDFVQyOvN9D/h25sm3G7lp5lYLcGfnp2uma665vqqt7JVekRJJALWqhBlUISBIFCUkgCAgITjSSFFCTQAIsa6KWQZaVGEuFMQkvQMnSokP4SWDBw6szlGYX0C6jFRM8j2j5oViEVTke96L5WSAopWLVCBqlHEitBM/TgjMz13QS9hspnaLYZ9UdDGsbEO6ABqAdiFbAVgHD2oEHj3Cfafg9gIb8JvD0FMLEvJxqSjZI8nGk1DrGthq6gDXNt07RraFeEjruTE96SaBYs24GHR0Oyz7/BSTd0Cc1Bt07UuIOM4/qJ0ONO2Fm4wlsSzXZw9TziAalA4rJ4M5PgW5uCth0Y0zg/MP2NaN8jJpzFralAYl46M7NnJPG/DaPJHsxL3IyxbygLLyPHTAWShcC5PENt3qQ+8JsJfRHaipxwFrenAukJM7dJewTn7vpnXrk3nnWhdbcGIYfLprq5EE7h9Zjnuc1HLP/1ISpef9lUNzcp+1FEny8g7pP2ITdPSXiVTXWzEJIixa16tvSz/K8XuewkQEtpE52Tvs3skiKFS+/Y9LP0r0KEKd1MltLxYp4dBckt/UlLzV2K3Fyy8vk5q5jJZmHL1bALjZrBmXfnoX/3ev7nWzo8YW5O2v/YAWphk4ekO+0sYCSNya+S/E/qH1+4cAcdJcGq1G/cRb00hSTApZAUkoCAwEQjSSEJCAhMNJIUkoCAwEQjSQDpB91GeCVOeCsXAAAAAElFTkSuQmCC\" alt=\"n = 1\" style=\"width: 36.5px; height: 18px;\" width=\"36.5\" height=\"18\"\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: 55.2167px 8px; transform-origin: 55.2167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and [1 -1 1/6] for \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAkCAYAAADFGRdYAAAC5klEQVRoQ+2YPUscURSGd3+AoNFKUplYCIIWYpUUWiQhtimUpLAQ1PwAFSyF+AFJEciH3XYmaKvEKqBio4X2aplKk5+g7wv3LHdnzr1zk5khK3MHXobd+zFznjlfM/VaPDIJ1DNnxAm1CCnACSKkCCmAQMCU6EkRkpPAEEY6zOhRFqeqedICgCxBXQkw7/D7A3SjAasSpBMAGPF4zT7GXmugqgKJHrQOzUE7BkQfzq8SnkWPWk6CrAKkbhh9DU1B3xRPeoL/Ds3/f3B+UEVIszB6DJr0hJodisOYd27PrYInMdSOIV8Vk3Akm3+CRHd9mKDLeO6FfkFXnid0X4YEEsOt3+Ss5r1rnvQSo4PQODQKsVwy4W1ChPMZem7FMF25xT09ZAh8oAByRT8c2jQPfYdSYalBEi9pYMEjYxDPbL5+QmvmP1YLHmpFcICwk2QeVvLQ8uxhr70wtj7FORWWvpwkyYz9w1voFBKvsY11VQ3NAHa6AjePgR+xeC/PBtZasUX1Is5zQZKyyTl8ajPQe0hKKCvGV3OhHpzVTrUgI8re5gcu8Bh6Bqn51QWJeWnX3B09iYvpTXJIDHPsRdlWlLg/H/Yq5M2rLkgCgfd3aUjb9/obP5jQF6GNEo0oc2uG/hk0AXlD1wVJEhlvMrmJbM6xVE+RYVW7VDfawCL0JgsQ7dEg2RC0ZCb5SG3hMyC1Q3X7K0AuSHZS1lyRiY590hfIzlMhofG/qxvbG1ZpnweJtzdbAc2TBILmKXbVk9LPisfkF9pQhsAsYw7vnbZtZ+RR5uMDqPkyrEG6NXeoeQq70S0zztK/AhFm6vNCGVbm2FMAsSmWZljbTt4yWl5NkpDs0q+Fmh2KdFtWPt/bdQ67ClsqgHwf3OyLpd4gkpBo8LRZofU/vOAnqBNq2C5ZmEnFb8SXV3pI6MG2pnKfSkLhOOdV4XtShJSbQMAG0ZMipAACAVOiJ0VIAQQCpkRPipACCARMuQPmxYMluJzL1wAAAABJRU5ErkJggg==\" alt=\"n = 2\" style=\"width: 36.5px; height: 18px;\" width=\"36.5\" height=\"18\"\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 = BernoulliPolynomial(n)\r\n  y = sum(nchoosek(n,k).*x.^(0:n));\r\nend","test_suite":"%%\r\nn = 0;\r\ny = BernoulliPolynomial(n);\r\ny_correct = 1;\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nn = 1;\r\ny = BernoulliPolynomial(n);\r\ny_correct = [1 -1/2];\r\nassert(isequal(y,y_correct))\r\n\r\n%%\r\nn = 2;\r\ny = BernoulliPolynomial(n);\r\ny_correct = [1 -1 1/6];\r\nassert(all(abs(y-y_correct)\u003c1e-11))\r\n\r\n%%\r\nn = 3;\r\ny = BernoulliPolynomial(n);\r\ny_correct = [1 -3/2 1/2 0];\r\nassert(all(abs(y-y_correct)\u003c1e-12))\r\n\r\n%%\r\nn = 4;\r\ny = BernoulliPolynomial(n);\r\ny_correct = [1 -2 1 0 -1/30];\r\nassert(all(abs(y-y_correct)\u003c1e-12))\r\n\r\n%%\r\nn = 5;\r\ny = BernoulliPolynomial(n);\r\ny_correct = [1 -5/2 5/3 0 -1/6 0];\r\nassert(all(abs(y-y_correct)\u003c1e-12))\r\n\r\n%%\r\nn = 8;\r\ny = BernoulliPolynomial(n);\r\ny_correct = [1 -4 14/3 0 -7/3 0 2/3 0 -1/30];\r\nassert(all(abs(y-y_correct)\u003c1e-12))\r\n\r\n%%\r\nn = 11;\r\ny = BernoulliPolynomial(n);\r\ny_correct = [1 -11/2 55/6 0 -11 0 11 0 -11/2 0 5/6 0];\r\nassert(all(abs(y-y_correct)\u003c1e-12))\r\n\r\n%%\r\nn = 14;\r\ny = BernoulliPolynomial(n);\r\ny_correct = [1 -7 91/6 0 -1001/30 0 143/2 0 -1001/10 0 455/6 0 -691/30 0 7/6];\r\nassert(all(abs(y-y_correct)\u003c1e-12))\r\n\r\n%%\r\nn = 21;\r\ny = BernoulliPolynomial(n);\r\ny_correct = [1 -21/2 35 0 -399/2 0 1292 0 -6783 0 293930/11 0 -223193/3 0 135660 0 -1443183/10 0 219335/3 0 -1222277/110 0];\r\nassert(all(abs(y-y_correct)\u003c2e-9))\r\n\r\n%%\r\nn = 30;\r\ny = BernoulliPolynomial(n);\r\ny_correct = [1 -15 145/2 0 -1827/2 0 28275/2 0 -390195/2 0 4552275/2 0 -43785215/2 0 339319575/2 0 -2062720845/2 0 9509268925/2 0 -31795091601/2 0 72484065225/2 0 -102818379585/2 0 78132595905/2 0 -23749461029/2 0 8615841276005/14322];\r\nassert(all(abs(y-y_correct)\u003c1e-3))\r\n\r\n%%\r\nn = 12;\r\ny = BernoulliPolynomial(n);\r\nn2 = round(y(7));\r\ny2 = BernoulliPolynomial(n2);\r\ny2_15_correct = 373065;\r\nassert(isequal(round(y2(15)),y2_15_correct))\r\n\r\n%%\r\nfiletext = fileread('BernoulliPolynomial.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'assert') || contains(filetext,'switch') || contains(filetext,'regexp'); \r\nassert(~illegal)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2022-09-17T15:39:23.000Z","deleted_by":null,"deleted_at":null,"solvers_count":9,"test_suite_updated_at":"2022-09-17T15:39:23.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2022-08-20T20:19:44.000Z","updated_at":"2026-01-26T13:39:36.000Z","published_at":"2022-08-20T20:21:33.000Z","restored_at":null,"restored_by":null,"spam":null,"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\u003eThe Bernoulli polynomial \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=\\\"B_n(x)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eB_n(x)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is a polynomial of order \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 with the properties that \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=\\\"B_0(x) = 1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eB_0(x) = 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and for \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 \u0026gt; 0\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en \u0026gt; 0\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:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"B'_n(x) = n B_{n-1}(x)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eB\\\\prime_n(x) = nB_{n-1}(x)\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\u003ewhere the prime denotes differentiation with respect 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, and\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:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"Integral[B_n(x),{x,0,1}] = 0\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\\int_0^1 B_n(x) = 0\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\u003eTherefore, \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=\\\"B_1(x) = x-1/2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eB_1(x) = x – ½\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\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=\\\"B_2(x) = x^2 – x + 1/6\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eB_2(x) = x^2 – x + 1/6\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\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=\\\"B_3(x) = x^3 – 3 x^2/2 + x/2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eB_3(x) = x^3 – 3 x^2/2 + x/2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e, etc. Notice that \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=\\\"B_n(0)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eB_n(0)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is the \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\u003eth \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/45831\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eBernoulli number\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eWrite a function to generate the Bernoulli polynomial of order \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. Use MATLAB's approach for specifying the coefficients. For example, the function should return [1 -1/2] for \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 = 1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en = 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and [1 -1 1/6] for \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 = 2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en=2\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\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\"}]}"},{"id":57560,"title":"Hermite Polynomials","description":"Problem 1304 deals with Hermite polynomial of the physicist's type.\r\nIn this problem, Return the n-th Hermite polynomial of the probabilist' type.\r\nAssume that n is a non-negative finite integer.\r\nExamples:\r\n hermite_poly(0)\r\n ans = \r\n     1\r\n\r\n hermite_poly(1)\r\n ans = \r\n     1     0\r\n\r\n hermite_poly(2)\r\n ans = \r\n     1     0   -1\r\n\r\nNeither string operations nor interpolations are allowed!","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: 406.767px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 203.383px; transform-origin: 407px 203.383px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003ca target='_blank' href = \"https://in.mathworks.com/matlabcentral/cody/problems/1304\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eProblem 1304\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: 116.5px 8px; transform-origin: 116.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e deals with Hermite polynomial of the \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: 31px 8px; transform-origin: 31px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ephysicist\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: 22.5px 8px; transform-origin: 22.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e's type.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 85.5px 8px; transform-origin: 85.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIn this problem, Return the \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: 4px 8px; transform-origin: 4px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003en\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: 8.5px 8px; transform-origin: 8.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e-th\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Hermite_polynomials\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eHermite polynomial\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: 22px 8px; transform-origin: 22px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e of the \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: 37.5px 8px; transform-origin: 37.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eprobabilist\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: 19px 8px; transform-origin: 19px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e' type.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 39px 8px; transform-origin: 39px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eAssume that\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \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: 4px 8px; transform-origin: 4px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003en\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: 99px 8px; transform-origin: 99px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e is a non-negative finite integer.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 33.5px 8px; transform-origin: 33.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eExamples\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: 2px 8px; transform-origin: 2px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 224.767px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404px 112.383px; transform-origin: 404px 112.383px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 64px 8.5px; tab-size: 4; transform-origin: 64px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e hermite_poly(0)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 28px 8.5px; tab-size: 4; transform-origin: 28px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e ans = \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 24px 8.5px; tab-size: 4; transform-origin: 24px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     1\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 64px 8.5px; tab-size: 4; transform-origin: 64px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e hermite_poly(1)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 28px 8.5px; tab-size: 4; transform-origin: 28px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e ans = \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 48px 8.5px; tab-size: 4; transform-origin: 48px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     1     0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 64px 8.5px; tab-size: 4; transform-origin: 64px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e hermite_poly(2)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 28px 8.5px; tab-size: 4; transform-origin: 28px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e ans = \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10.2167px; transform-origin: 404px 10.2167px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 68px 8.5px; tab-size: 4; transform-origin: 68px 8.5px; unicode-bidi: normal; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e     1     0   -1\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; 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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; 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: 24.5px 8px; transform-origin: 24.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eNeither \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: 60.5px 8px; transform-origin: 60.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003estring operations\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: 14.5px 8px; transform-origin: 14.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e nor \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: 49px 8px; transform-origin: 49px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003einterpolations\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: 40.5px 8px; transform-origin: 40.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e are allowed!\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = hermite_poly(n)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('hermite_poly.m');\r\nillegal = contains(filetext, 'regexp') || contains(filetext, 'assert') || ...\r\n          contains(filetext, 'switch') || contains(filetext, 'elseif') || ...\r\n          contains(filetext, 'interp') || contains(filetext, '2str') || ...\r\n          contains(filetext, 'str2'); \r\nassert(~illegal)\r\n\r\n%%\r\nn = 0;\r\nP_correct = [1];\r\nassert(isequal(hermite_poly(n),P_correct));\r\n\r\n%%\r\nn = 1;\r\nP_correct = [1 0];\r\nassert(isequal(hermite_poly(n),P_correct));\r\n\r\n%%\r\nn = 2;\r\nP_correct = [1 0 -1];\r\nassert(isequal(hermite_poly(n),P_correct));\r\n\r\n%%\r\nn = 3;\r\nP_correct = [1 0 -3 0];\r\nassert(isequal(hermite_poly(n),P_correct));\r\n\r\n%%\r\nn = 4;\r\nP_correct = [1 0 -6 0 3];\r\nassert(isequal(hermite_poly(n),P_correct));\r\n\r\n%%\r\nn = 5;\r\nP_correct = [1 0 -10 0 15 0];\r\nassert(isequal(hermite_poly(n),P_correct));\r\n\r\n%%\r\nn = 6;\r\nP_correct = [1 0 -15 0 45 0 -15];\r\nassert(isequal(hermite_poly(n),P_correct));\r\n\r\n%%\r\nn = 7;\r\nP_correct = [1 0 -21 0 105 0 -105 0];\r\nassert(isequal(hermite_poly(n),P_correct));\r\n\r\n%%\r\nn = 8;\r\nP_correct = [1 0 -28 0 210 0 -420 0 105];\r\nassert(isequal(hermite_poly(n),P_correct));\r\n\r\n%%\r\nn = 9;\r\nP_correct = [1 0 -36 0 378 0 -1260 0 945 0];\r\nassert(isequal(hermite_poly(n),P_correct));\r\n\r\n%%\r\nn = 10;\r\nP_correct = [1 0 -45 0 630 0 -3150 0 4725 0 -945];\r\nassert(isequal(hermite_poly(n),P_correct));","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":223089,"edited_by":223089,"edited_at":"2023-01-20T06:47:46.000Z","deleted_by":null,"deleted_at":null,"solvers_count":9,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2023-01-18T07:24:00.000Z","updated_at":"2026-01-26T13:48:46.000Z","published_at":"2023-01-18T07:24:00.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:hyperlink w:docLocation=\\\"https://in.mathworks.com/matlabcentral/cody/problems/1304\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProblem 1304\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e deals with Hermite polynomial of the \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ephysicist\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e's type.\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\u003eIn this problem, Return the \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e-th\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Hermite_polynomials\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eHermite polynomial\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e of the \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eprobabilist\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e' type.\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\u003eAssume that\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is a non-negative finite integer.\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:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eExamples\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\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ hermite_poly(0)\\n ans = \\n     1\\n\\n hermite_poly(1)\\n ans = \\n     1     0\\n\\n hermite_poly(2)\\n ans = \\n     1     0   -1]]\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\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\u003eNeither \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003estring operations\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e nor \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003einterpolations\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e are allowed!\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\"}]}"},{"id":60950,"title":"Find the longest runs of primes generated by polynomials","description":"Cody Problems 60942, 60943, and 60944 involve polynomials that generate primes. No polynomial can generate only prime numbers, but some can generate sizable runs of primes. For example, for  = 0, 1, 2,…,10,  produces 11, 13, 19, 29, 43, 61, 83, 109, 139, 173, and 211, which are all prime. For , both terms in the polynomial are divisible by 11, and the result (253) is composite. \r\nWrite a function that takes the coefficients of the polynomial in standard Matlab form (i.e., a vector with the coefficients in order of decreasing order of the terms) and returns the length of the longest run of primes as well as a sorted list (low to high) of the distinct primes in the run. Please note the following:\r\nTake the absolute value of the output of the polynomial. For example, consider -11, -13, -19, etc. to be prime for this problem, even though negative numbers are not strictly considered to be prime.  \r\nRound the absolute value to the nearest integer. Although this step is not necessary when the coefficients of the polynomial are integers, it can be necessary when they are not, as in the last two tests.\r\nMake sure to list only the primes in the longest run. The polynomials will produce other primes outside of the longest run, but do not include them in the output. ","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: 288.6px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 408px 144.3px; transform-origin: 408px 144.3px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 84px; 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: 385px 42px; text-align: left; transform-origin: 385px 42px; 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: 49.7917px 8px; transform-origin: 49.7917px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eCody Problems \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/60942\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003e60942\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: 3.88333px 8px; transform-origin: 3.88333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/60943\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003e60943\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: 17.5px 8px; transform-origin: 17.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, and \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/60944\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003e60944\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: 25.675px 8px; transform-origin: 25.675px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e involve \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://mathworld.wolfram.com/Prime-GeneratingPolynomial.html\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003epolynomials that generate primes\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: 92.975px 8px; transform-origin: 92.975px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. No polynomial can generate \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.8417px 8px; transform-origin: 12.8417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eonly\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: 20.8667px 8px; transform-origin: 20.8667px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e prime numbers, but some can generate sizable runs of primes. For example, for \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: 49.9667px 8px; transform-origin: 49.9667px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e = 0, 1, 2,…,10, \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,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\" width=\"103\" height=\"19.5\" alt=\"f(n) = 2n^2+11\" style=\"width: 103px; height: 19.5px;\"\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: 43.825px 8px; transform-origin: 43.825px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e produces 11, 13, 19, 29, 43, 61, 83, 109, 139, 173, and 211, which are all prime. For \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAAAkCAYAAAANdf2OAAACTklEQVRoQ+2YvS8EURTFZ3uVTkNBoUIiKLQ+EqFQiUTN+gMISg3hD/BRqkQnNJQSCSodBa1SCD3nJO8lLy8zu3tn9+5kM3eSk5ndnXvfzG/O3HffVhLbVAlUVLNb8sQAK5vAABtgZQLK6c3BBliZgHL6Mjt4Bmx3oUtoT8i54dgyAvZwJhzUHQFgcWyZAHcD5BbUBw1BgwLAuWPLBphMPyE68UYIOFdsmQCHZVYKOHesAU4SSQ0maNHDMcAFAO7HU6KmoGGoF7qCNt17coD9CtQDvUKTrq4JO51CTxe5MLpSUWyag5eQcBRah7pc8nHs36F76NuJA3E7DODXoxZeXL1za/0ufa3jXCJIrQbs8z3ggL0iXToPXUNnEJvyvBdogIOn9Rc4lL3jF7Tmvqtif+SOB5y7m3Fku2PzGoTXKYrNmuTCJBdISsBzEHtIbifQqnO31eAa9sgC7AEy9BcaiVz6gc+c5E4DV7fbhc2MJ3JhNJAoNgvwC5JmLSXZYby5QWexv23mTguKFUFqNeAQ4GNUGjiWr790NkuHLxuNsLJJLgBIYGntENfwBEXn0sGSzQCDlgeY5dAfnMP+2MPfxjEnQvbJnbIVWiI8wDSHchFy7iiyPZuGFqFlYako+kEUBngMd/7k7p4rueOIBJfJG+47upb/q3IR0knu5eWH9yHthESxcRcRBqctIDgBPrsSQcAsE50El/e3APkOyfuHk/kdtF/jTcwVW9Z/09pWogywMmoDbICVCSinNwcbYGUCyunNwQZYmYByenOwMuB/UdKjJU7I4NcAAAAASUVORK5CYII=\" width=\"44\" height=\"18\" alt=\"n = 11\" style=\"width: 44px; 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: 141.592px 8px; transform-origin: 141.592px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, both terms in the polynomial are divisible by 11, and the result (253) is composite. \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: 385px 31.5px; text-align: left; transform-origin: 385px 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: 374.167px 8px; transform-origin: 374.167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function that takes the coefficients of the polynomial in standard Matlab form (i.e., a vector with the coefficients in order of decreasing order of the terms) and returns the length of the longest run of primes as well as a sorted list (low to high) of the distinct primes in the run. Please note the following:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cul style=\"block-size: 122.6px; counter-reset: list-item 0; font-family: Helvetica, Arial, sans-serif; list-style-type: square; margin-block-end: 20px; margin-block-start: 10px; margin-bottom: 20px; margin-top: 10px; perspective-origin: 392px 61.3px; transform-origin: 392px 61.3px; margin-top: 10px; margin-bottom: 20px; \"\u003e\u003cli style=\"block-size: 40.8667px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 364px 20.4333px; text-align: left; transform-origin: 364px 20.4333px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 358.867px 8px; transform-origin: 358.867px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eTake the absolute value of the output of the polynomial. For example, consider -11, -13, -19, etc. to be prime for this problem, even though negative numbers are not strictly considered to be prime. \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 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/li\u003e\u003cli style=\"block-size: 40.8667px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 364px 20.4333px; text-align: left; transform-origin: 364px 20.4333px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 347.608px 8px; transform-origin: 347.608px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eRound the absolute value to the nearest integer. Although this step is not necessary when the coefficients of the polynomial are integers, it can be necessary when they are not, as in the last two tests.\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003cli style=\"block-size: 40.8667px; counter-reset: none; display: list-item; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-start: 56px; margin-left: 56px; margin-top: 0px; perspective-origin: 364px 20.4333px; text-align: left; transform-origin: 364px 20.4333px; white-space-collapse: preserve; margin-left: 56px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-inline-start: 0px; margin-left: 0px; perspective-origin: 360.975px 8px; transform-origin: 360.975px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eMake sure to list only the primes in the longest run. The polynomials will produce other primes outside of the longest run, but do not include them in the output. \u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ul\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [n,p] = polyPrimeRun(a)\r\n%  a = vector of coefficients of the polynomial--e.g., for f(n) = 2n^2+11, a = [2 0 11]\r\n%  n = length of longest run of primes (ignoring sign)\r\n%  p = distinct primes in the longest run, sorted low to high \r\n   q = a.*(0:1000);\r\n   n = length(max(isprime(q)));\r\n   p = distinct(isprime(q));\r\nend","test_suite":"%%\r\na = [1 1 0 17];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 11;\r\np_correct = [17 19 29 53 97 167 269 409 593 827 1117];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%%\r\na = [2 0 11];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 11;\r\np_correct = [11 13 19 29 43 61 83 109 139 173 211];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Honaker\r\na = [4 4 59];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 14;\r\np_correct = [59 67 83 107 139 179 227 283 347 419 499 587 683 787];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Legendre\r\na = [1 1 17];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 16;\r\np_correct = [17 19 23 29 37 47 59 73 89 107 127 149 173 199 227 257];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% A. Bruno\r\na = [3 39 37];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 18;\r\np_correct = [37 79 127 181 241 307 379 457 541 631 727 829 937 1051 1171 1297 1429 1567];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% E. Pegg Jr. \r\na = [1 0 29 0 101];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 20;\r\np_correct = [101 131 233 443 821 1451 2441 3923 6053 9011 13001 18251 25013 33563 44201 57251 73061 92003 114473 140891];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% R. Frame\r\na = [3 3 23];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 22;\r\np_correct = [23 29 41 59 83 113 149 191 239 293 353 419 491 569 653 743 839 941 1049 1163 1283 1409];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% F. Gobbo\r\na = [7 -371 4871];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 24;\r\np_correct = [41 97 167 251 349 461 587 727 881 1049 1231 1427 1637 1861 2099 2351 2617 2897 3191 3499 3821 4157 4507 4871];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Legendre (1798)\r\na = [2 0 29];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 29;\r\np_correct = [29 31 37 47 61 79 101 127 157 191 229 271 317 367 421 479 541 607 677 751 829 911 997 1087 1181 1279 1381 1487 1597];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% J. Brox\r\na = [6 -342 4903];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 58;\r\np_correct = [31 43 67 103 151 211 283 367 463 571 691 823 967 1123 1291 1471 1663 1867 2083 2311 2551 2803 3067 3343 3631 3931 4243 4567 4903];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% F. Gobbo\r\na = [7 -371 4871];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 24;\r\np_correct = [41 97 167 251 349 461 587 727 881 1049 1231 1427 1637 1861 2099 2351 2617 2897 3191 3499 3821 4157 4507 4871];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% F. Gobbo\r\na = [8 -488 7243];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 62;\r\np_correct = [37 43 101 139 149 181 197 251 379 523 683 859 1051 1259 1483 1723 1979 2251 2539 2843 3163 3499 3851 4219 4603 5003 5419 5851 6299 6763 7243];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% J. Brox\r\na = [43 -537 2971];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 35;\r\np_correct = [1297 1319 1361 1427 1511 1621 1747 1901 2069 2267 2477 2719 2971 3257 3881 4591 5387 6269 7237 8291 9431 10657 11969 13367 14851 16421 18077 19819 21647 23561 25561 27647 29819 32077 34421];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Wroblewski and Meyrignac\r\na = [42 270 -26436 250703];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 40;\r\np_correct = [44927 44939 48479 48767 55343 56663 65267 68879 77999 85667 93287 107279 110879 130523 133967 151967 165983 174959 199247 203579 224579 247007 250703 296519 352367 414803 484079 560447 644159 735467 834623 941879 1057487 1181699 1314767 1456943 1608479 1769627 1940639 2121767];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Euler\r\na = [1 -1 41];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 41;\r\np_correct = [41 43 47 53 61 71 83 97 113 131 151 173 197 223 251 281 313 347 383 421 461 503 547 593 641 691 743 797 853 911 971 1033 1097 1163 1231 1301 1373 1447 1523 1601];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Speiser\r\na = [103 -4707 50383];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 43;\r\np_correct = [131 503 661 971 1439 1619 1867 1873 2371 2557 2917 2953 3041 3257 3319 3391 3449 4673 5231 6599 7219 8731 9413 11069 11813 13613 14419 16363 17231 19319 20249 22481 23473 25849 26903 29423 30539 33203 34381 37189 41381 45779 50383];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Fung and Ruby\r\na = [47 -1701 10181];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 43;\r\np_correct = [379 419 577 599 1321 1451 1483 1667 2129 2273 2617 2843 2851 2969 3463 3571 3877 3989 4079 4129 4421 4493 4759 4813 5003 5039 5153 5171 5209 5231 5501 6679 6967 8221 8527 9857 10181 11587 13411 15329 17341 19447 21647];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% S.M. Ruiz\r\na = [3 -183 3318 -18757];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 47;\r\np_correct = [37 41 59 109 229 409 419 499 739 829 877 1201 1531 1597 1669 1823 1999 2389 2749 2917 3061 3271 3307 3469 3491 3529 4789 5441 6367 7691 8221 10259 10369 12829 13163 15619 16421 18757 20051 24071 28499 33353 38651];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Fung and Ruby\r\na = [36 -810 2753];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 45;\r\np_correct = [89 163 359 397 613 647 811 953 991 1153 1277 1297 1423 1531 1619 1621 1693 1747 1783 1801 1979 2357 2753 3167 4049 5003 6029 7127 8297 9539 10853 12239 13697 15227 16829 18503 20249 22067 23957 25919 27953 30059 32237 34487 36809];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Kazmenko and Trofimov (2006)\r\na = [-66 3845 -60897 251831];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 46;\r\np_correct = [811 3529 8537 8681 10613 16553 19249 23057 28211 30139 32089 32911 35027 35221 36637 38639 39301 40637 43891 57413 57593 65539 70309 77719 80651 82183 92639 92863 101281 101963 103421 107713 109789 111539 112363 131627 144889 189961 194713 251831 256049 330287 413071 504797 605861 716659];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Wroblewski and Meyrignac (2006)\r\na = [1 -99 3588 -56822 348272 -286397];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 47;\r\np_correct = [1409 2441 3517 5227 5669 7963 8209 8543 9733 10429 14243 24251 27763 29531 32411 39971 41051 52301 52561 59971 60443 62903 64811 91673 106531 156353 196003 210011 212123 270631 286397 327491 336121 355331 377021 402851 412123 424163 584411 900061 1321283 1869383 2568091 3443681 4525091 5844043 7435163];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Beyleveld (2006)\r\na = [1 -97 3294 -45458 213589];\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 50;p_correct = [109 271 541 673 1409 1873 1949 2069 2251 2341 3719 3881 4019 4451 4951 5227 5273 5449 6029 7109 7129 7789 8573 9209 9739 10223 10399 10529 10789 10889 15173 17669 25919 27449 39769 40129 56123 57149 75869 78509 99829 104323 128489 135089 162359 171329 201973 213589 247889];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Wroblewski and Meyrignac (2006)\r\na = [1 -126 6217 -153066 1987786 -13055316 34747236]/36;\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 55;\r\np_correct = [461 1091 2423 3583 4493 4549 6271 6961 7019 7933 8443 9007 9157 10429 12007 13241 13553 15443 15733 16193 20873 23993 32423 32969 35051 45737 46769 54959 56597 57397 61613 63421 64693 67993 98321 163561 166693 272563 318467 429409 552089 653687 887543 965201 1352093 1977581 2800877 3864349 5216353 6911743 9012401 11587787 14715509 18481913 22982693];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n\r\n%% Dress and Landreau (2002), Gupta (2006)\r\na = [1 -133 6729 -158379 1720294 -6823316]/4;\r\n[n,p] = polyPrimeRun(a);\r\nn_correct = 57;\r\np_correct = [383 1721 3733 3923 4259 5323 10181 12547 12659 19373 20611 23887 26539 27847 32687 33073 37571 53149 65993 70123 87977 106207 124351 134077 142019 158923 174907 189977 204331 218389 228581 232823 248587 266947 289511 318259 355049 355573 404267 467617 519643 549391 653879 729173 785923 950947 991127 1154987 1313701 1404721 1705829 1707499 2071373 2505127 3018307 3621251 4325119];\r\nassert(isequal(n,n_correct))\r\nassert(isequal(p,p_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":4,"created_by":46909,"edited_by":46909,"edited_at":"2025-06-30T16:26:09.000Z","deleted_by":null,"deleted_at":null,"solvers_count":7,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2025-06-29T03:20:05.000Z","updated_at":"2026-02-06T13:37:00.000Z","published_at":"2025-06-29T03:20:15.000Z","restored_at":null,"restored_by":null,"spam":null,"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\u003eCody Problems \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/60942\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e60942\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/60943\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e60943\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, and \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/60944\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e60944\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e involve \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://mathworld.wolfram.com/Prime-GeneratingPolynomial.html\\\"\u003e\u003cw:r\u003e\u003cw:t\u003epolynomials that generate primes\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. No polynomial can generate \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eonly\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e prime numbers, but some can generate sizable runs of primes. For example, for \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 = 0, 1, 2,…,10, \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=\\\"f(n) = 2n^2+11\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ef(n) = 2n^2+11\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e produces 11, 13, 19, 29, 43, 61, 83, 109, 139, 173, and 211, which are all prime. For \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 = 11\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003en = 11\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e, both terms in the polynomial are divisible by 11, and the result (253) is composite. \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 the coefficients of the polynomial in standard Matlab form (i.e., a vector with the coefficients in order of decreasing order of the terms) and returns the length of the longest run of primes as well as a sorted list (low to high) of the distinct primes in the run. Please note the following:\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTake the absolute value of the output of the polynomial. For example, consider -11, -13, -19, etc. to be prime for this problem, even though negative numbers are not strictly considered to be prime. \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\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eRound the absolute value to the nearest integer. Although this step is not necessary when the coefficients of the polynomial are integers, it can be necessary when they are not, as in the last two tests.\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\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eMake sure to list only the primes in the longest run. The polynomials will produce other primes outside of the longest run, but do not include them in the output. \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\"}]}"},{"id":60996,"title":"Dickson Polynomials","description":"Return the coefficients of nth (n\u003e=0) Dickson polynomial of the 1st kind as follows - \r\n1st row of the output will be the coefficients of x, and, 2nd row of the output will be the coefficients of alpha.\r\n\r\nWhen formulating the coefficitients of a variables, for terms where the other variable is present - consider the value of the other variable as 1. See examples below for a better understanding. \r\n%Examplesa\r\nn=2;\r\nD2(x, alpha) = x^2 - 2*alpha\r\nOutput =  [1 0 -2; 0 -2 1]\r\n\r\nn=3;\r\nD3(x, alpha) = x^3 - 3*x*alpha\r\nOutput = [1 0 -3 0; 0 0 -1 1]\r\n\r\nn=5;\r\nD5(x, alpha) = x^5 - 5*x^3*alpha + 5*x*alpha^2\r\n% x (alpha=1) = 1*x^5 - 5*x^3*1 + 5*x*1^2 = [1 0 -5 0 5 0].*[x^5 x^4 x^3 x^2 x^1 x^0]\r\n% alpha (x=1) = alpha^0*1^5 - 5*1^3*alpha^1 + 5*1*alpha^2\r\n%             = [0 0 0 5 -5 1].*[alpha^5 alpha^4 alpha^3 alpha^2 alpha^1 alpha^0]\r\nOutput = [1 0 -5 0 5 0; 0 0 0 5 -5 1]\r\n\r\nOnly vectorized solutions will be accepted. Check the test suite for banned functions.\r\n","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: 539.5px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 408px 269.75px; transform-origin: 408px 269.75px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 79.2167px 8px; transform-origin: 79.2167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eReturn the coefficients of \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: 33.8417px 8px; transform-origin: 33.8417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003enth (n\u0026gt;=0)\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\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Dickson_polynomial\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eDickson polynomial\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: 84.3917px 8px; transform-origin: 84.3917px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e of the 1st kind as follows - \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 143px 8px; transform-origin: 143px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e1st row of the output will be the coefficients of \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: 3.89167px 8px; transform-origin: 3.89167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ex\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: 164.783px 8px; transform-origin: 164.783px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, and, 2nd row of the output will be the coefficients of \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: 18.275px 8px; transform-origin: 18.275px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ealpha\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\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 0px 8px; transform-origin: 0px 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: 385px 21px; text-align: left; transform-origin: 385px 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: 375.608px 8px; transform-origin: 375.608px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWhen formulating the coefficitients of a variables, for terms where the other variable is present - consider the value of the other variable as 1. See examples below for a better understanding. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 306.5px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 405px 153.25px; transform-origin: 405px 153.25px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 38.5px 8.5px; tab-size: 4; transform-origin: 38.5px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e%Examplesa\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 15.4px 8.5px; tab-size: 4; transform-origin: 15.4px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003en=2;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 107.8px 8.5px; tab-size: 4; transform-origin: 107.8px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eD2(x, alpha) = x^2 - 2*alpha\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 100.1px 8.5px; tab-size: 4; transform-origin: 100.1px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOutput =  [1 0 -2; 0 -2 1]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 15.4px 8.5px; tab-size: 4; transform-origin: 15.4px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003en=3;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 115.5px 8.5px; tab-size: 4; transform-origin: 115.5px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eD3(x, alpha) = x^3 - 3*x*alpha\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 111.65px 8.5px; tab-size: 4; transform-origin: 111.65px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOutput = [1 0 -3 0; 0 0 -1 1]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 15.4px 8.5px; tab-size: 4; transform-origin: 15.4px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003en=5;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 177.1px 8.5px; tab-size: 4; transform-origin: 177.1px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eD5(x, alpha) = x^5 - 5*x^3*alpha + 5*x*alpha^2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 327.25px 8.5px; tab-size: 4; transform-origin: 327.25px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e% x (alpha=1) = 1*x^5 - 5*x^3*1 + 5*x*1^2 = [1 0 -5 0 5 0].*[x^5 x^4 x^3 x^2 x^1 x^0]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 219.45px 8.5px; tab-size: 4; transform-origin: 219.45px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e% alpha (x=1) = alpha^0*1^5 - 5*1^3*alpha^1 + 5*1*alpha^2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 311.85px 8.5px; tab-size: 4; transform-origin: 311.85px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e%             = [0 0 0 5 -5 1].*[alpha^5 alpha^4 alpha^3 alpha^2 alpha^1 alpha^0]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 142.45px 8.5px; tab-size: 4; transform-origin: 142.45px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOutput = [1 0 -5 0 5 0; 0 0 0 5 -5 1]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 385px 10.5px; text-align: left; transform-origin: 385px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; 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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 262.167px 8px; transform-origin: 262.167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOnly vectorized solutions will be accepted. Check the test suite for banned functions.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 0px 8px; transform-origin: 0px 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 = dicksonpoly(n)\r\n  y = n^2;\r\nend","test_suite":"%%\r\nfiletext = fileread('dicksonpoly.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n          contains(filetext, 'while') || contains(filetext, 'for ') || ...\r\n          contains(filetext, 'cellfun') || contains(filetext, 'arrayfun') || ...\r\n          contains(filetext, 'rowfun') || contains(filetext, 'structfun'); \r\nassert(~illegal)\r\n\r\n%%\r\nn = 1;\r\ny = [1 0; 0 1];\r\nassert(isequal(dicksonpoly(n),y))\r\n\r\n%%\r\nn = 2;\r\ny = [1 0 -2; 0 -2 1];\r\nassert(isequal(dicksonpoly(n),y))\r\n\r\n%%\r\nn = 3;\r\ny = [1 0 -3 0; 0 0 -3 1];\r\nassert(isequal(dicksonpoly(n),y))\r\n\r\n%%\r\nn = 4;\r\ny = [1 0 -4 0 2; 0 0 2 -4 1];\r\nassert(isequal(dicksonpoly(n),y))\r\n\r\n%%\r\nn = 5;\r\ny = [1 0 -5 0 5 0; 0 0 0 5 -5 1];\r\nassert(isequal(dicksonpoly(n),y))\r\n\r\n%%\r\nn = 6;\r\n%D6(x, alpha) = x^6 - 6*alpha*x^4 + 9*alpha^2*x^2 - 2*alpha^3\r\ny = [1 0 -6 0 9 0 -2; 0 0 0 -2 9 -6 1];\r\nassert(isequal(dicksonpoly(n),y))\r\n\r\n%%\r\nn = 9;\r\n%D9(x, alpha) = x^9 - 9*alpha*x^7 + 27*alpha^2*x^5 - 30*alpha^3*x^3 + 9*alpha^4*x\r\ny = [1 0 -9 0 27 0 -30 0 9 0; 0 0 0 0 0 9 -30 27 -9 1];\r\nassert(isequal(dicksonpoly(n),y))\r\n\r\n%%\r\nn = 10;\r\n%D10(x, alpha) = x^10 - 10*alpha*x^8 + 35*alpha^2*x^6 - 50*alpha^3*x^4 + 25*alpha^4*x^2 - 2*alpha^5\r\ny = [1 0 -10 0 35 0 -50 0 25 0 -2; 0 0 0 0 0 -2 25 -50 35 -10 1];\r\nassert(isequal(dicksonpoly(n),y))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":223089,"edited_by":223089,"edited_at":"2025-09-10T16:35:24.000Z","deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":"2025-09-07T17:01:24.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2025-09-07T15:27:35.000Z","updated_at":"2026-01-26T13:57:28.000Z","published_at":"2025-09-07T15:27:35.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\u003eReturn the coefficients of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003enth (n\u0026gt;=0)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Dickson_polynomial\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eDickson polynomial\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e of the 1st kind as follows - \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\u003e1st row of the output will be the coefficients of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, and, 2nd row of the output will be the coefficients of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ealpha\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\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\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\u003eWhen formulating the coefficitients of a variables, for terms where the other variable is present - consider the value of the other variable as 1. See examples below for a better understanding. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[%Examplesa\\nn=2;\\nD2(x, alpha) = x^2 - 2*alpha\\nOutput =  [1 0 -2; 0 -2 1]\\n\\nn=3;\\nD3(x, alpha) = x^3 - 3*x*alpha\\nOutput = [1 0 -3 0; 0 0 -1 1]\\n\\nn=5;\\nD5(x, alpha) = x^5 - 5*x^3*alpha + 5*x*alpha^2\\n% x (alpha=1) = 1*x^5 - 5*x^3*1 + 5*x*1^2 = [1 0 -5 0 5 0].*[x^5 x^4 x^3 x^2 x^1 x^0]\\n% alpha (x=1) = alpha^0*1^5 - 5*1^3*alpha^1 + 5*1*alpha^2\\n%             = [0 0 0 5 -5 1].*[alpha^5 alpha^4 alpha^3 alpha^2 alpha^1 alpha^0]\\nOutput = [1 0 -5 0 5 0; 0 0 0 5 -5 1]]]\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\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\u003eOnly vectorized solutions will be accepted. Check the test suite for banned functions.\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\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\"}]}"},{"id":60998,"title":"Bernstein Basis Polynomials","description":"Return the coefficients of a Bernstein Basis Polynomial B(v,n) for degree n and order v - \r\n \r\n%Examples\r\nB(2, 5) = 10*x^2*(1-x)^3 = -10*x^5 + 30*x^4 - 30*3 + 10*x^2\r\nOutput =  [-10 30 -30 10 0 0];\r\n\r\nB(3, 3) = x^3\r\nOutput = [1 0 0 0];\r\n\r\nOnly vectorized solutions will be accepted. Check the test suite for banned functions.\r\n","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: 274.6px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 408px 137.3px; transform-origin: 408px 137.3px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 85.05px 8px; transform-origin: 85.05px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eReturn the coefficients of a \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Bernstein_polynomial#Bernstein_basis_polynomials\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eBernstein Basis Polynomial\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: 1.94167px 8px; transform-origin: 1.94167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \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: 19.45px 8px; transform-origin: 19.45px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; font-weight: 700; \"\u003eB(v,n)\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: 35.7833px 8px; transform-origin: 35.7833px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e for degree \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: 4.275px 8px; transform-origin: 4.275px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; font-weight: 700; \"\u003en\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: 33.8417px 8px; transform-origin: 33.8417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and order \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: 3.89167px 8px; transform-origin: 3.89167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; font-weight: 700; \"\u003ev\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: 6.21667px 8px; transform-origin: 6.21667px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e - \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 1.94167px 8px; transform-origin: 1.94167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 122.6px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 405px 61.3px; transform-origin: 405px 61.3px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 34.65px 8.5px; tab-size: 4; transform-origin: 34.65px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e%Examples\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 227.15px 8.5px; tab-size: 4; transform-origin: 227.15px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eB(2, 5) = 10*x^2*(1-x)^3 = -10*x^5 + 30*x^4 - 30*3 + 10*x^2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 115.5px 8.5px; tab-size: 4; transform-origin: 115.5px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOutput =  [-10 30 -30 10 0 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 50.05px 8.5px; tab-size: 4; transform-origin: 50.05px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eB(3, 3) = x^3\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 73.15px 8.5px; tab-size: 4; transform-origin: 73.15px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOutput = [1 0 0 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 385px 10.5px; text-align: left; transform-origin: 385px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; 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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 262.167px 8px; transform-origin: 262.167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOnly vectorized solutions will be accepted. Check the test suite for banned functions.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 0px 8px; transform-origin: 0px 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 x = bernstein(x)\r\n  x = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('bernstein.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n          contains(filetext, 'while') || contains(filetext, 'for ') || ...\r\n          contains(filetext, 'cellfun') || contains(filetext, 'arrayfun') || ...\r\n          contains(filetext, 'rowfun') || contains(filetext, 'structfun') || ...\r\n          contains(filetext, 'elseif') || contains(filetext, 'switch'); \r\nassert(~illegal)\r\n\r\n%%\r\nn = 5;\r\nv = 2;\r\ny = [-10 30 -30 10 0 0];\r\nassert(isequal(bernstein(v,n),y))\r\n\r\n%%\r\nn = randi(100);\r\nv = n;\r\ny = [1 zeros(1,v)];\r\nassert(isequal(bernstein(v,n),y))\r\n\r\n%%\r\nn = 7;\r\nv = 0;\r\ny = [-1 7 -21 35 -35 21 -7 1];\r\nassert(isequal(bernstein(v,n),y))\r\n\r\n%%\r\nn = 1;\r\nv = 0;\r\ny = [-1 1];\r\nassert(isequal(bernstein(v,n),y))\r\n\r\n%%\r\nn = 7;\r\nv = 3;\r\ny = [35 -140 210 -140 35 0 0 0];\r\nassert(isequal(bernstein(v,n),y))\r\n\r\n%%\r\nn = 10;\r\nv = 4;\r\ny = [210 -1260 3150 -4200 3150 -1260 210 0 0 0 0];\r\nassert(isequal(bernstein(v,n),y))\r\n\r\n%%\r\nn = 12;\r\nv = 10;\r\ny = [66 -132 66 zeros(1,v)];\r\nassert(isequal(bernstein(v,n),y))\r\n\r\n%%\r\nn = 25;\r\nv = 16;\r\ny = [-2042975 18386775 -73547100 171609900 -257414850 257414850 -171609900 73547100 -18386775 2042975 zeros(1, v)];\r\nassert(isequal(bernstein(v,n),y))\r\n\r\n%%\r\nn = 13;\r\nv = 9;\r\ny = [715 -2860 4290 -2860 715 0 0 0 0 0 0 0 0 0];\r\nassert(isequal(bernstein(v,n),y))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":223089,"edited_by":223089,"edited_at":"2025-09-13T06:26:45.000Z","deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":"2025-09-13T06:26:45.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2025-09-10T15:17:42.000Z","updated_at":"2026-01-26T14:24:46.000Z","published_at":"2025-09-10T16:33:56.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\u003eReturn the coefficients of a \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Bernstein_polynomial#Bernstein_basis_polynomials\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eBernstein Basis Polynomial\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eB(v,n)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e for degree \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and order \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ev\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\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\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[%Examples\\nB(2, 5) = 10*x^2*(1-x)^3 = -10*x^5 + 30*x^4 - 30*3 + 10*x^2\\nOutput =  [-10 30 -30 10 0 0];\\n\\nB(3, 3) = x^3\\nOutput = [1 0 0 0];]]\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\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\u003eOnly vectorized solutions will be accepted. Check the test suite for banned functions.\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\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\"}]}"},{"id":61000,"title":"Touchard Polynomial","description":"Return the coefficients of nth (n\u003e=0) Touchard polynomials - \r\nT1(x) = x;\r\noutput = [1 0];\r\n\r\nT2(x) = x^2 + x;\r\noutput = [1 1 0];\r\nOnly vectorized solutions will be accepted. Check the test suite for banned functions.","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: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 164.167px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 408px 82.0833px; transform-origin: 408px 82.0833px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 113.458px 8px; transform-origin: 113.458px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eReturn the coefficients of nth (n\u0026gt;=0) \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Touchard_polynomials\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eTouchard polynomials\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: 6.21667px 8px; transform-origin: 6.21667px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e - \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 102.167px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 405px 51.0833px; transform-origin: 405px 51.0833px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 38.5px 8.5px; tab-size: 4; transform-origin: 38.5px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eT1(x) = x;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 57.75px 8.5px; tab-size: 4; transform-origin: 57.75px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = [1 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 61.6px 8.5px; tab-size: 4; transform-origin: 61.6px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eT2(x) = x^2 + x;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 65.45px 8.5px; tab-size: 4; transform-origin: 65.45px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = [1 1 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 385px 10.5px; text-align: left; transform-origin: 385px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; 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: 262.167px 8px; transform-origin: 262.167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOnly vectorized solutions will be accepted. Check the test suite for banned functions.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = touchard(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('touchard.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n          contains(filetext, 'while') || contains(filetext, 'for ') || ...\r\n          contains(filetext, 'cellfun') || contains(filetext, 'arrayfun') || ...\r\n          contains(filetext, 'rowfun') || contains(filetext, 'structfun') || ...\r\n          contains(filetext, 'switch') || contains(filetext, 'elseif'); \r\nassert(~illegal)\r\n\r\n%%\r\nn = 1;\r\ny = [1 0];\r\nassert(isequal(touchard(n),y))\r\n\r\n%%\r\nn = 2;\r\ny = [1 1 0];\r\nassert(isequal(touchard(n),y))\r\n\r\n%%\r\nn = 3;\r\ny = [1 3 1 0];\r\nassert(isequal(touchard(n),y))\r\n\r\n\r\n%%\r\nn = 4;\r\ny = [1 6 7 1 0];\r\nassert(isequal(touchard(n),y))\r\n\r\n%%\r\nn = 5;\r\ny = [1 10 25 15 1 0];\r\nassert(isequal(touchard(n),y))\r\n\r\n%%\r\nn = 8;\r\ny = flip([0 \t1 \t127 \t966 \t1701 \t1050 \t266 \t28 \t1]);\r\nassert(isequal(touchard(n),y))\r\n\r\n%%\r\nn = 9;\r\ny = flip([0 \t1 \t255 \t3025 \t7770 \t6951 \t2646 \t462 \t36 \t1]);\r\nassert(isequal(touchard(n),y))\r\n\r\n%%\r\nn = 13;\r\ny = [1 78 2431 39325 359502 1899612 5715424 9321312 7508501 2532530 261625 4095 1 0];\r\nassert(isequal(touchard(n),y))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":223089,"edited_by":223089,"edited_at":"2025-09-18T12:36:11.000Z","deleted_by":null,"deleted_at":null,"solvers_count":7,"test_suite_updated_at":"2025-09-17T13:18:45.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2025-09-13T07:34:20.000Z","updated_at":"2026-01-26T14:41:16.000Z","published_at":"2025-09-17T13:18:45.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\u003eReturn the coefficients of nth (n\u0026gt;=0) \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Touchard_polynomials\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eTouchard polynomials\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[T1(x) = x;\\noutput = [1 0];\\n\\nT2(x) = x^2 + x;\\noutput = [1 1 0];]]\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\u003eOnly vectorized solutions will be accepted. Check the test suite for banned functions.\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\"}]}"},{"id":61001,"title":"Stirling Numbers - I","description":"Problems #1388 \u0026 #45187 deal with Stirling numbers of the 2nd Kind.\r\nHere, generate the Stirling numbers S(n,k) of the 1st kind of a given order n, for all degree k in descending order -\r\nS(0,0) = 1;\r\n\r\nS(1,1:0) = [1 0];\r\n\r\nS(3,3:0) = [1 3 2 0];\r\nOnly vectorized solutions will be accepted. Check the test suite for banned functions. ","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: 194.167px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 408px 97.0833px; transform-origin: 408px 97.0833px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 31.5083px 7.79167px; transform-origin: 31.5083px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eProblems \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://in.mathworks.com/matlabcentral/cody/problems/1388\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003e#1388\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: 8.55px 7.79167px; transform-origin: 8.55px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u0026amp; \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://in.mathworks.com/matlabcentral/cody/problems/45187\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003e#45187\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: 133.033px 7.79167px; transform-origin: 133.033px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e deal with Stirling numbers of the 2nd Kind.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 60.2917px 7.79167px; transform-origin: 60.2917px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eHere, generate the \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Stirling_numbers_of_the_first_kind\"\u003e\u003cspan style=\"perspective-origin: 52.5167px 7.79167px; transform-origin: 52.5167px 7.79167px; \"\u003e\u003cspan style=\"\"\u003eStirling numbers \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"perspective-origin: 19.4417px 7.79167px; transform-origin: 19.4417px 7.79167px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eS(n,k)\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"perspective-origin: 45.5px 7.79167px; transform-origin: 45.5px 7.79167px; \"\u003e\u003cspan style=\"\"\u003e of the 1st kind\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: 52.5083px 7.79167px; transform-origin: 52.5083px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e of a given order \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: 4.275px 7.79167px; transform-origin: 4.275px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003en\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: 46.675px 7.79167px; transform-origin: 46.675px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, for all degree \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: 3.89167px 7.79167px; transform-origin: 3.89167px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ek\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: 67.6917px 7.79167px; transform-origin: 67.6917px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e in descending order -\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 102.167px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 405px 51.0833px; transform-origin: 405px 51.0833px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.916667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.916667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.916667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.916667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 42.35px 8.25px; tab-size: 4; transform-origin: 42.35px 8.25px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eS(0,0) = 1;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.916667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.916667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.916667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.916667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.25px; tab-size: 4; transform-origin: 0px 8.25px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.916667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.916667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.916667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.916667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 65.45px 8.25px; tab-size: 4; transform-origin: 65.45px 8.25px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eS(1,1:0) = [1 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.916667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.916667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.916667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.916667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.25px; tab-size: 4; transform-origin: 0px 8.25px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 0.916667px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 0.916667px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 0.916667px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 0.916667px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 80.85px 8.25px; tab-size: 4; transform-origin: 80.85px 8.25px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eS(3,3:0) = [1 3 2 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 385px 10.5px; text-align: left; transform-origin: 385px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; 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: 264.108px 7.79167px; transform-origin: 264.108px 7.79167px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOnly vectorized solutions will be accepted. Check the test suite for banned functions. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = stirlingI(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('stirlingI.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n          contains(filetext, 'while') || contains(filetext, 'for ') || ...\r\n          contains(filetext, 'cellfun') || contains(filetext, 'arrayfun') || ...\r\n          contains(filetext, 'rowfun') || contains(filetext, 'structfun') || ...\r\n          contains(filetext, 'switch') || contains(filetext, 'elseif'); \r\nassert(~illegal)\r\n\r\n%%\r\nn = 0;\r\ny = 1;\r\nassert(isequal(stirlingI(n),y))\r\n\r\n%%\r\nn = 1;\r\ny = [1 0];\r\nassert(isequal(stirlingI(n),y))\r\n\r\n%%\r\nn = 3;\r\ny = [1 3 2 0];\r\nassert(isequal(stirlingI(n),y))\r\n\r\n%%\r\nn = 4;\r\ny = [1 6 11 6 0];\r\nassert(isequal(stirlingI(n),y))\r\n\r\n%%\r\nn = 7;\r\ny = flip([0 \t720 \t1764 \t1624 \t735 \t175 \t21 \t1]);\r\nassert(isequal(stirlingI(n),y))\r\n\r\n%%\r\nn = 8;\r\ny = flip([0 \t5040 \t13068 \t13132 \t6769 \t1960 \t322 \t28 \t1]);\r\nassert(isequal(stirlingI(n),y))\r\n\r\n%%\r\nn = 10;\r\ny = flip([0 \t362880 \t1026576 \t1172700 \t723680 \t269325 \t63273 \t9450 \t870 \t45 \t1]);\r\nassert(isequal(stirlingI(n),y))\r\n\r\n%%\r\nn = 14;\r\ny = [1 91 3731 91091 1474473 16669653 135036473 790943153 3336118786 9957703756 20313753096 ...\r\n    26596717056 19802759040 6227020800 0];\r\nassert(isequal(stirlingI(n),y))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":223089,"edited_by":223089,"edited_at":"2025-09-13T08:00:01.000Z","deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2025-09-13T07:58:07.000Z","updated_at":"2026-02-10T22:53:50.000Z","published_at":"2025-09-13T07:58:27.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\u003eProblems \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://in.mathworks.com/matlabcentral/cody/problems/1388\\\"\u003e\u003cw:r\u003e\u003cw:t\u003e#1388\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e \u0026amp; \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://in.mathworks.com/matlabcentral/cody/problems/45187\\\"\u003e\u003cw:r\u003e\u003cw:t\u003e#45187\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e deal with Stirling numbers of the 2nd Kind.\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\u003eHere, generate the \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Stirling_numbers_of_the_first_kind\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eStirling numbers \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eS(n,k)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e of the 1st kind\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e of a given order \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, for all degree \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ek\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e in descending order -\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[S(0,0) = 1;\\n\\nS(1,1:0) = [1 0];\\n\\nS(3,3:0) = [1 3 2 0];]]\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\u003eOnly vectorized solutions will be accepted. Check the test suite for banned functions. \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\"}]}"},{"id":61003,"title":"Padovan Polynomials","description":"Hello there. I'm afraid I bear bad news - Anakin Skywalker is no longer a Jedi.\r\nBut fear not young Padawan, we shall not falter against the Sith.\r\nFor now, you are tasked to generate the coefficients of Padovan Polynomials of a given order n -\r\n(Believe me, this is going to help us fight against the treacherous and evil Sith empire)\r\n\r\nP1(x) = 1\r\noutput = 1;\r\n\r\nP1(x) = 0\r\noutput = 0;\r\n\r\nP3(x) = x;\r\noutput = [1 0];\r\n\r\nP5(x) = x^2\r\noutput = [1 0 0];\r\n\r\nP8(x) = 3*x^2;\r\noutput = [3 0 0];\r\n\r\n\r\nYoung Padawan, there will be obstacles on this path. Be wary of them.\r\n(Only vectorized solutions will be accepted. Check the test suite for banned functions)","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: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 548.5px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 408px 274.25px; transform-origin: 408px 274.25px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 240.167px 8px; transform-origin: 240.167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eHello there. I'm afraid I bear bad news - Anakin Skywalker is no longer a Jedi.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 198.758px 8px; transform-origin: 198.758px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eBut fear not young Padawan, we shall not falter against the Sith.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 170.225px 8px; transform-origin: 170.225px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eFor now, you are tasked to generate the coefficients of \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Padovan_polynomials\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003ePadovan Polynomials\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: 52.5083px 8px; transform-origin: 52.5083px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e of a given order \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: 4.275px 8px; transform-origin: 4.275px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003en\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: 4.275px 8px; transform-origin: 4.275px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e -\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 266.067px 8px; transform-origin: 266.067px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e(Believe me, this is going to help us fight against the treacherous and evil Sith empire)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 306.5px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 405px 153.25px; transform-origin: 405px 153.25px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 34.65px 8.5px; tab-size: 4; transform-origin: 34.65px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eP1(x) = 1\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 42.35px 8.5px; tab-size: 4; transform-origin: 42.35px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = 1;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 34.65px 8.5px; tab-size: 4; transform-origin: 34.65px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eP1(x) = 0\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 42.35px 8.5px; tab-size: 4; transform-origin: 42.35px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = 0;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 38.5px 8.5px; tab-size: 4; transform-origin: 38.5px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eP3(x) = x;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 57.75px 8.5px; tab-size: 4; transform-origin: 57.75px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = [1 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 42.35px 8.5px; tab-size: 4; transform-origin: 42.35px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eP5(x) = x^2\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 65.45px 8.5px; tab-size: 4; transform-origin: 65.45px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = [1 0 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 53.9px 8.5px; tab-size: 4; transform-origin: 53.9px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eP8(x) = 3*x^2;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 65.45px 8.5px; tab-size: 4; transform-origin: 65.45px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eoutput = [3 0 0];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 385px 10.5px; text-align: left; transform-origin: 385px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; 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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 217.958px 8px; transform-origin: 217.958px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eYoung Padawan, there will be obstacles on this path. Be wary of them.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 264.892px 8px; transform-origin: 264.892px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e(Only vectorized solutions will be accepted. Check the test suite for banned functions)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = padovan(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('padovan.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n          contains(filetext, 'while') || contains(filetext, 'for ') || ...\r\n          contains(filetext, 'cellfun') || contains(filetext, 'arrayfun') || ...\r\n          contains(filetext, 'rowfun') || contains(filetext, 'structfun') || ...\r\n          contains(filetext, 'switch') || contains(filetext, 'elseif'); \r\nassert(~illegal)\r\n\r\n%%\r\nn = 1;\r\ny = 1;\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 2;\r\ny = 0;\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 3;\r\ny = [1 0];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 4;\r\ny = 1;\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 5;\r\ny = [1 0 0];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 6;\r\ny = [2 0];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 7;\r\ny = [1 0 0 1];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 8;\r\ny = [3 0 0];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 9;\r\ny = [1 0 0 3 0];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 10;\r\ny = [4 0 0 1];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 11;\r\ny = [1 0 0 6 0 0];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 12;\r\ny = [5 0 0 4 0];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 13;\r\ny = [1 0 0 10 0 0 1];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 15;\r\ny = [1 0 0 15 0 0 5 0];\r\nassert(isequal(padovan(n),y))\r\n\r\n%%\r\nn = 18;\r\ny = [8 0 0 35 0 0 6 0];\r\nassert(isequal(padovan(n),y))","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":223089,"edited_by":223089,"edited_at":"2025-10-25T18:06:25.000Z","deleted_by":null,"deleted_at":null,"solvers_count":9,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2025-09-16T06:36:00.000Z","updated_at":"2026-01-26T15:13:58.000Z","published_at":"2025-09-16T06:36:00.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\u003eHello there. I'm afraid I bear bad news - Anakin Skywalker is no longer a Jedi.\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\u003eBut fear not young Padawan, we shall not falter against the Sith.\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\u003eFor now, you are tasked to generate the coefficients of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Padovan_polynomials\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ePadovan Polynomials\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e of a given order \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\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\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\u003e(Believe me, this is going to help us fight against the treacherous and evil Sith empire)\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[P1(x) = 1\\noutput = 1;\\n\\nP1(x) = 0\\noutput = 0;\\n\\nP3(x) = x;\\noutput = [1 0];\\n\\nP5(x) = x^2\\noutput = [1 0 0];\\n\\nP8(x) = 3*x^2;\\noutput = [3 0 0];\\n]]\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\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\u003eYoung Padawan, there will be obstacles on this path. Be wary of them.\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\u003e(Only vectorized solutions will be accepted. Check the test suite for banned functions)\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\"}]}"},{"id":61004,"title":"Rooky Towers","description":"You are wandering and as you realise something's off, you find yourself lost in a peculiar place -  Over a giant field which is laid in form of a checkered square base - with towering structures around you.\r\nTo safeguard yourself, you have to calculate the numbers of ways of a given number (x) of towering structures can be arranged on the filed (n,n) with a restriction - \r\nThe grid (n\u003e=x) will be set such that none of these structures are inline with each other in the 4 basic directions, but they could along the diagonal pathways.\r\n\r\n%Example\r\n%For a 2x2 (n,n) field - \r\n% 2 (x) towers can be arranged in 2 ways [|| 0; 0 ||] and [0 ||; || 0]\r\n% 1 (x) tower can be arranged in 4 ways [|| 0; 0 0], [0 ||; 0 0], [0 0; || 0 ] and [0 0; 0 ||]\r\n% and 0 (x) towers can be arranged in 1 way [0 0; 0 0]\r\n\r\nNote that there is a limit on the tools you can utilize for your calculation.","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: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 347.167px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 408px 173.583px; transform-origin: 408px 173.583px; vertical-align: baseline; \"\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: 385px 21px; text-align: left; transform-origin: 385px 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: 381.383px 8px; transform-origin: 381.383px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eYou are wandering and as you realise something's off, you find yourself lost in a peculiar place -  Over a giant field which is laid in form of a checkered square base - with towering structures around you.\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: 385px 21px; text-align: left; transform-origin: 385px 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: 265.275px 8px; transform-origin: 265.275px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eTo safeguard yourself, you have to calculate the numbers of ways of a given number (\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: 3.5px 8px; transform-origin: 3.5px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003ex\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: 96.0667px 8px; transform-origin: 96.0667px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e) of towering structures can be arranged on the filed \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: 16.3333px 8px; transform-origin: 16.3333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003e(n,n) \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: 56.7833px 8px; transform-origin: 56.7833px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ewith a restriction - \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: 385px 21px; text-align: left; transform-origin: 385px 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: 27.6167px 8px; transform-origin: 27.6167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe grid \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: 20.2417px 8px; transform-origin: 20.2417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003e(n\u0026gt;=x)\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: 325.558px 8px; transform-origin: 325.558px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e will be set such that none of these structures are inline with each other in the 4 basic directions, but they could along the diagonal pathways.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 102.167px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 405px 51.0833px; transform-origin: 405px 51.0833px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 30.8px 8.5px; tab-size: 4; transform-origin: 30.8px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e%Example\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 96.25px 8.5px; tab-size: 4; transform-origin: 96.25px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e%For a 2x2 (n,n) field - \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 269.5px 8.5px; tab-size: 4; transform-origin: 269.5px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e% 2 (x) towers can be arranged in 2 ways [|| 0; 0 ||] and [0 ||; || 0]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 361.9px 8.5px; tab-size: 4; transform-origin: 361.9px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e% 1 (x) tower can be arranged in 4 ways [|| 0; 0 0], [0 ||; 0 0], [0 0; || 0 ] and [0 0; 0 ||]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 207.9px 8.5px; tab-size: 4; transform-origin: 207.9px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e% and 0 (x) towers can be arranged in 1 way [0 0; 0 0]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 385px 10.5px; text-align: left; transform-origin: 385px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; 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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 220.542px 8px; transform-origin: 220.542px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eNote that there is a limit on the tools you can utilize for your calculation.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = rookytowers(n,x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('rookytowers.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n          contains(filetext, 'while') || contains(filetext, 'for ') || ...\r\n          contains(filetext, 'cellfun') || contains(filetext, 'arrayfun') || ...\r\n          contains(filetext, 'rowfun') || contains(filetext, 'structfun') || ...\r\n          contains(filetext, 'switch') || contains(filetext, 'elseif'); \r\nassert(~illegal)\r\n\r\n%%\r\nassert(isequal(rookytowers(1, randi([0 1])),1))\r\n\r\n%%\r\ny = [1 4 2];\r\nr = randi([0 2]);\r\nassert(isequal(rookytowers(2, r),y(r+1)))\r\n\r\n%%\r\nn = 3;\r\ny = [n^0 n^2 2*n^2 2*n];\r\nr = randi([0 n]);\r\nassert(isequal(rookytowers(n, r),y(r+1)))\r\n\r\n%%\r\ny = [16 72 96];\r\nr = randi([1 3]);\r\nassert(isequal(rookytowers(4, r),y(r)))\r\n\r\n%%\r\nn = 5;\r\ny = [n 200 600 600 120];\r\nr = randi([2 n]);\r\nassert(isequal(rookytowers(n, r),y(r)))\r\n\r\n%%\r\ny = abs([-1\t\t49\t\t-882\t\t7350\t\t-29400]);\r\nr = randi([0 4]);\r\nassert(isequal(rookytowers(7, r),y(r+1)))\r\n\r\n%%\r\ny = abs([1\t\t-64\t\t1568\t\t-18816\t\t117600\t\t-376320\t\t564480\t\t-322560\t\t40320]);\r\nn = 2^3;\r\nfor r=0:n\r\n    assert(isequal(rookytowers(n, r),y(r+1)))\r\nend\r\n\r\n%%\r\ny = [9^0 9^2 2592 42336 381024 1905120 5080320 6531840 3265920 factorial(9)]\r\nr = randi([0 9]);\r\nassert(isequal(rookytowers(9, r),y(r+1)))","published":true,"deleted":false,"likes_count":1,"comments_count":3,"created_by":223089,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":10,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2025-09-18T15:25:35.000Z","updated_at":"2026-01-26T15:21:48.000Z","published_at":"2025-09-18T15:25:35.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\u003eYou are wandering and as you realise something's off, you find yourself lost in a peculiar place -  Over a giant field which is laid in form of a checkered square base - with towering structures around you.\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\u003eTo safeguard yourself, you have to calculate the numbers of ways of a given number (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e) of towering structures can be arranged on the filed \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e(n,n) \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr/\u003e\u003cw:t\u003ewith a restriction - \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\u003eThe grid \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e(n\u0026gt;=x)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e will be set such that none of these structures are inline with each other in the 4 basic directions, but they could along the diagonal pathways.\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\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[%Example\\n%For a 2x2 (n,n) field - \\n% 2 (x) towers can be arranged in 2 ways [|| 0; 0 ||] and [0 ||; || 0]\\n% 1 (x) tower can be arranged in 4 ways [|| 0; 0 0], [0 ||; 0 0], [0 0; || 0 ] and [0 0; 0 ||]\\n% and 0 (x) towers can be arranged in 1 way [0 0; 0 0]]]\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\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\u003eNote that there is a limit on the tools you can utilize for your calculation.\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\"}]}"},{"id":61006,"title":"Shapiro Polynomials","description":"Given an order n, return the coefficients of 1st Shapiro polynomials Pn(x) - \r\n\r\n%Example\r\nP1(x) = x + 1 =\u003e Output = [1 1];\r\n\r\nP3(x) = x^7 - x^6 + x^5 + x^4 - x^3 + x^2 + x + 1 =\u003e Output = [1 -1 1 1 -1 1 1 1];","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: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 142.733px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 408px 71.3667px; transform-origin: 408px 71.3667px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 48.2333px 8px; transform-origin: 48.2333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eGiven an order \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: 3.89167px 8px; transform-origin: 3.89167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003en\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: 91.65px 8px; transform-origin: 91.65px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, return the coefficients of 1st \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Shapiro_polynomials\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eShapiro polynomials\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: 1.94167px 8px; transform-origin: 1.94167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \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: 22.9417px 8px; transform-origin: 22.9417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003ePn(x) - \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 81.7333px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 405px 40.8667px; transform-origin: 405px 40.8667px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 30.8px 8.5px; tab-size: 4; transform-origin: 30.8px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e%Example\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 123.2px 8.5px; tab-size: 4; transform-origin: 123.2px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eP1(x) = x + 1 =\u0026gt; Output = [1 1];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 315.7px 8.5px; tab-size: 4; transform-origin: 315.7px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eP3(x) = x^7 - x^6 + x^5 + x^4 - x^3 + x^2 + x + 1 =\u0026gt; Output = [1 -1 1 1 -1 1 1 1];\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = shapiro(x)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('shapiro.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n          contains(filetext, 'while') || contains(filetext, 'for ') || ...\r\n          contains(filetext, 'cellfun') || contains(filetext, 'arrayfun') || ...\r\n          contains(filetext, 'rowfun') || contains(filetext, 'structfun') || ...\r\n          contains(filetext, 'switch') || contains(filetext, 'elseif'); \r\n\r\n%%\r\nx = 1;\r\ny = [1 1];\r\nassert(isequal(shapiro(x),y))\r\n\r\n%%\r\nx = 2;\r\ny = [-1 1 1 1];\r\nassert(isequal(shapiro(x),y))\r\n\r\n%%\r\nx = 3;\r\ny = [1 -1 1 1 -1 1 1 1];\r\nassert(isequal(shapiro(x),y))\r\n\r\n%%\r\nx = 4;\r\ny = [-1 1 -1 -1 -1 1 1 1 1 -1 1 1 -1 1 1 1];\r\n\r\nassert(isequal(shapiro(x),y))\r\n\r\n%%\r\nx = 5;\r\ny = [1 -1 1 1 1 -1 -1 -1 1 -1 1 1 -1 1 1 1 -1 1 -1 -1 -1 1 1 1 1 -1 1 1 -1 1 1 1];\r\nassert(isequal(shapiro(x),y))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":4,"created_by":223089,"edited_by":223089,"edited_at":"2025-09-20T15:17:48.000Z","deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":"2025-09-20T03:25:22.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2025-09-19T17:23:37.000Z","updated_at":"2026-01-26T15:34:27.000Z","published_at":"2025-09-19T17:23: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\u003eGiven an order \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, return the coefficients of 1st \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Shapiro_polynomials\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eShapiro polynomials\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ePn(x) - \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:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\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=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[%Example\\nP1(x) = x + 1 =\u003e Output = [1 1];\\n\\nP3(x) = x^7 - x^6 + x^5 + x^4 - x^3 + x^2 + x + 1 =\u003e Output = [1 -1 1 1 -1 1 1 1];]]\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\"}]}"},{"id":61007,"title":"Pseudo-Zernike Polynomials","description":"Problem #1476 deals with Radial Zernike Polynomials.\r\nHere, generate the Pseudo-Zernike Polynomials for a given order n and degree k -\r\n%Examples pR(n,k)\r\npR(0,0) = 1 =\u003e [1]\r\n\r\npR(1,1) = 3*r-2 =\u003e [3 -2]\r\n\r\npR(3,2) = 7*r^3 + 6*r^2 =\u003e [7 6 0 0]\r\nOnly vectorized solutions will be accepted. Check the test suite for banned functions. \r\n\r\n\t\t\r\n\t","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: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 304.6px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 408px 152.3px; transform-origin: 408px 152.3px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 28.0083px 8px; transform-origin: 28.0083px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eProblem \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://in.mathworks.com/matlabcentral/cody/problems/1476\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003e#1476\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: 121.767px 8px; transform-origin: 121.767px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e deals with Radial Zernike Polynomials.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 60.2917px 8px; transform-origin: 60.2917px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eHere, generate the \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Pseudo-Zernike_polynomials\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003ePseudo-Zernike Polynomials\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: 54.8417px 8px; transform-origin: 54.8417px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e for a given order \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: 6.21667px 8px; transform-origin: 6.21667px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003en \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: 11.675px 8px; transform-origin: 11.675px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eand\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=\"font-weight: 700; \"\u003e \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: 23.7333px 8px; transform-origin: 23.7333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003edegree \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: 3.89167px 8px; transform-origin: 3.89167px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003ek\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: 4.275px 8px; transform-origin: 4.275px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e -\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 122.6px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-end-end-radius: 4px; border-end-start-radius: 4px; border-start-end-radius: 4px; border-start-start-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 405px 61.3px; transform-origin: 405px 61.3px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 65.45px 8.5px; tab-size: 4; transform-origin: 65.45px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"border-block-end-color: rgb(2, 128, 9); border-block-start-color: rgb(2, 128, 9); border-bottom-color: rgb(2, 128, 9); border-inline-end-color: rgb(2, 128, 9); border-inline-start-color: rgb(2, 128, 9); border-left-color: rgb(2, 128, 9); border-right-color: rgb(2, 128, 9); border-top-color: rgb(2, 128, 9); caret-color: rgb(2, 128, 9); color: rgb(2, 128, 9); column-rule-color: rgb(2, 128, 9); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(2, 128, 9); text-decoration-color: rgb(2, 128, 9); text-emphasis-color: rgb(2, 128, 9); \"\u003e%Examples pR(n,k)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 69.3px 8.5px; tab-size: 4; transform-origin: 69.3px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003epR(0,0) = 1 =\u0026gt; [1]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 96.25px 8.5px; tab-size: 4; transform-origin: 96.25px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003epR(1,1) = 3*r-2 =\u0026gt; [3 -2]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 8.5px; tab-size: 4; transform-origin: 0px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20.4333px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-end-end-radius: 0px; border-end-start-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; 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; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 405px 10.2167px; text-wrap-mode: nowrap; transform-origin: 405px 10.2167px; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 138.6px 8.5px; tab-size: 4; transform-origin: 138.6px 8.5px; unicode-bidi: normal; white-space-collapse: preserve; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003epR(3,2) = 7*r^3 + 6*r^2 =\u0026gt; [7 6 0 0]\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 385px 10.5px; text-align: left; transform-origin: 385px 10.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 10px; 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: 264.108px 8px; transform-origin: 264.108px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eOnly vectorized solutions will be accepted. Check the test suite for banned functions. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 0px 8px; transform-origin: 0px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 31.0667px 8px; transform-origin: 31.0667px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\t\t\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; 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: 385px 10.5px; text-align: left; transform-origin: 385px 10.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: 15.5333px 8px; transform-origin: 15.5333px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e\t\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = pseudozernike(n,k)\r\n  y = x;\r\nend","test_suite":"%%\r\nfiletext = fileread('pseudozernike.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp') || ...\r\n          contains(filetext, 'while') || contains(filetext, 'for ') || ...\r\n          contains(filetext, 'cellfun') || contains(filetext, 'arrayfun') || ...\r\n          contains(filetext, 'rowfun') || contains(filetext, 'structfun') || ...\r\n          contains(filetext, 'switch') || contains(filetext, 'elseif') || ...\r\n          contains(filetext, 'str2num'); \r\n\r\n%%\r\ny = 1;\r\nassert(isequal(pseudozernike(0,0),y))\r\n\r\n%%\r\ny = [3 -2];\r\nassert(isequal(pseudozernike(1,0),y))\r\n\r\n%%\r\ny = [10 -12 3];\r\nassert(isequal(pseudozernike(2,0),y))\r\n\r\n%%\r\ny = [1 0 0 0];\r\nassert(isequal(pseudozernike(3,3),y))\r\n\r\n%%\r\ny = [84 -168 105 -20 0];\r\nassert(isequal(pseudozernike(4,1),y))\r\n\r\n%%\r\ny = [9 -8 0 0 0];\r\nassert(isequal(pseudozernike(4,3),y))\r\n\r\n%%\r\ny = [165 -360 252 -56 0 0];\r\nassert(isequal(pseudozernike(5,2),y))\r\n\r\n%%\r\ny = [11 -10 0 0 0 0];\r\nassert(isequal(pseudozernike(5,4),y))\r\n\r\n%%\r\ny = [1716 -5544 6930 -4200 1260 -168 7];\r\nassert(isequal(pseudozernike(6,0),y))\r\n\r\n%%\r\nn = randi([20 30]);\r\ny = [1 zeros(1,n)];\r\nassert(isequal(pseudozernike(n,n),y))\r\n\r\n%%\r\nn = randi([30 40]);\r\ny = [2*n+1 -2*n zeros(1,n-1)];\r\nassert(isequal(pseudozernike(n,n-1),y))","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":223089,"edited_by":223089,"edited_at":"2025-10-24T15:17:57.000Z","deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":"2025-09-21T09:16:27.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2025-09-21T08:30:15.000Z","updated_at":"2026-01-26T15:39:10.000Z","published_at":"2025-09-21T09:16:27.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\u003eProblem \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://in.mathworks.com/matlabcentral/cody/problems/1476\\\"\u003e\u003cw:r\u003e\u003cw:t\u003e#1476\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e deals with Radial Zernike Polynomials.\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\u003eHere, generate the \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Pseudo-Zernike_polynomials\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ePseudo-Zernike Polynomials\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e for a given order \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003en \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003eand\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003edegree \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ek\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\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[%Examples pR(n,k)\\npR(0,0) = 1 =\u003e [1]\\n\\npR(1,1) = 3*r-2 =\u003e [3 -2]\\n\\npR(3,2) = 7*r^3 + 6*r^2 =\u003e [7 6 0 0]]]\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\u003eOnly vectorized solutions will be accepted. Check the test suite for banned functions. \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\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\u003e\\t\\t\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\u003e\\t\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\"}]}"}],"no_progress_badge":{"id":53,"name":"Unknown","symbol":"unknown","description":"Partially completed groups","description_html":null,"image_location":"/images/responsive/supporting/matlabcentral/cody/badges/problem_groups_unknown_2.png","bonus":null,"players_count":0,"active":false,"created_by":null,"updated_by":null,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"created_at":"2018-01-10T23:20:29.000Z","updated_at":"2018-01-10T23:20:29.000Z","community_badge_id":null,"award_multiples":false}}