{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-05-26T00:16:20.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2026-05-26T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":56598,"title":"List numbers that are not in the Fibonacci sequence","description":"In the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a function to list the th term of the sequence of numbers not in the Fibonacci sequence. \r\n*as of datenum 738838.3432909953","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: 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: 382.608px 8px; transform-origin: 382.608px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIn the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a function to list 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: 209.258px 8px; transform-origin: 209.258px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eth term of the sequence of numbers not in the Fibonacci sequence. \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: 113.217px 8px; transform-origin: 113.217px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e*as of datenum 738838.3432909953\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function a = dontFib(n)\r\n  x = (1+sqrt(5))/2;\r\n  y = (1-sqrt(5))/2;\r\n  a = ~(x.^n-y.^2)/(x-y);\r\nend","test_suite":"%%\r\nassert(isequal(dontFib(8),14))\r\n\r\n%%\r\nassert(isequal(dontFib(80),90))\r\n\r\n%%\r\nassert(isequal(dontFib(88),98))\r\n\r\n%%\r\nassert(isequal(dontFib(800),814))\r\n\r\n%%\r\nassert(isequal(dontFib(808),822))\r\n\r\n%%\r\nassert(isequal(dontFib(880),894))\r\n\r\n%%\r\nassert(isequal(dontFib(888),902))\r\n\r\n%%\r\nassert(isequal(dontFib(8000),8019))\r\n\r\n%%\r\nassert(isequal(dontFib(8008),8027))\r\n\r\n%%\r\nassert(isequal(dontFib(8080),8099))\r\n\r\n%%\r\nassert(isequal(dontFib(8088),8107))\r\n\r\n%%\r\nassert(isequal(dontFib(8800),8819))\r\n\r\n%%\r\nassert(isequal(dontFib(8808),8827))\r\n\r\n%%\r\nassert(isequal(dontFib(8880),8899))\r\n\r\n%%\r\nassert(isequal(dontFib(8888),8907))\r\n\r\n%%\r\nn = [88888 888888 8888888 88888888 888888888 8888888888 88888888888 888888888888 8888888888888 88888888888888];\r\na_correct = [88912 888917 8888921 88888926 888888931 8888888936 88888888941 888888888945 8888888888950 88888888888955];\r\nassert(isequal(dontFib(n),a_correct))\r\n\r\n%%\r\nassert(isequal(sum(isprime(dontFib(primes(50000)))),497))\r\n\r\n%%\r\nfiletext = fileread('dontFib.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp'); \r\nassert(~illegal)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2022-11-15T00:31:18.000Z","deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2022-11-13T14:41:14.000Z","updated_at":"2025-10-16T18:56:34.000Z","published_at":"2022-11-13T14:41:38.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\u003eIn the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a function to list 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\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 term of the sequence of numbers not in the Fibonacci sequence. \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*as of datenum 738838.3432909953\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"problem_search":{"problems":[{"id":56598,"title":"List numbers that are not in the Fibonacci sequence","description":"In the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a function to list the th term of the sequence of numbers not in the Fibonacci sequence. \r\n*as of datenum 738838.3432909953","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: 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: 382.608px 8px; transform-origin: 382.608px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIn the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a function to list 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: 209.258px 8px; transform-origin: 209.258px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eth term of the sequence of numbers not in the Fibonacci sequence. \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: 113.217px 8px; transform-origin: 113.217px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e*as of datenum 738838.3432909953\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function a = dontFib(n)\r\n  x = (1+sqrt(5))/2;\r\n  y = (1-sqrt(5))/2;\r\n  a = ~(x.^n-y.^2)/(x-y);\r\nend","test_suite":"%%\r\nassert(isequal(dontFib(8),14))\r\n\r\n%%\r\nassert(isequal(dontFib(80),90))\r\n\r\n%%\r\nassert(isequal(dontFib(88),98))\r\n\r\n%%\r\nassert(isequal(dontFib(800),814))\r\n\r\n%%\r\nassert(isequal(dontFib(808),822))\r\n\r\n%%\r\nassert(isequal(dontFib(880),894))\r\n\r\n%%\r\nassert(isequal(dontFib(888),902))\r\n\r\n%%\r\nassert(isequal(dontFib(8000),8019))\r\n\r\n%%\r\nassert(isequal(dontFib(8008),8027))\r\n\r\n%%\r\nassert(isequal(dontFib(8080),8099))\r\n\r\n%%\r\nassert(isequal(dontFib(8088),8107))\r\n\r\n%%\r\nassert(isequal(dontFib(8800),8819))\r\n\r\n%%\r\nassert(isequal(dontFib(8808),8827))\r\n\r\n%%\r\nassert(isequal(dontFib(8880),8899))\r\n\r\n%%\r\nassert(isequal(dontFib(8888),8907))\r\n\r\n%%\r\nn = [88888 888888 8888888 88888888 888888888 8888888888 88888888888 888888888888 8888888888888 88888888888888];\r\na_correct = [88912 888917 8888921 88888926 888888931 8888888936 88888888941 888888888945 8888888888950 88888888888955];\r\nassert(isequal(dontFib(n),a_correct))\r\n\r\n%%\r\nassert(isequal(sum(isprime(dontFib(primes(50000)))),497))\r\n\r\n%%\r\nfiletext = fileread('dontFib.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'regexp'); \r\nassert(~illegal)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2022-11-15T00:31:18.000Z","deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2022-11-13T14:41:14.000Z","updated_at":"2025-10-16T18:56:34.000Z","published_at":"2022-11-13T14:41:38.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\u003eIn the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a function to list 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\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 term of the sequence of numbers not in the Fibonacci sequence. \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*as of datenum 738838.3432909953\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\"}]}"}],"errors":[],"facets":[[],[{"value":"medium","count":1,"selected":false}]],"term":"tag:\"restoring balance\"","page":1,"per_page":50,"sort":"map(difficulty_value,0,0,999) asc"}}