{"id":37023,"date":"2017-02-27T08:07:23","date_gmt":"2017-02-27T14:07:23","guid":{"rendered":"https:\/\/kenscourses.com\/tc1014winter2017\/?p=37023"},"modified":"2017-02-27T08:08:25","modified_gmt":"2017-02-27T14:08:25","slug":"wsq08-yo-soy-196","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc1014winter2017\/instructor\/wsq08-yo-soy-196\/","title":{"rendered":"WSQ08 &#8211; Yo Soy 196"},"content":{"rendered":"<div class=\"fl-module fl-module-rich-text fl-node-561fcfbe9b2b2\" data-node=\"561fcfbe9b2b2\" data-animation-delay=\"0.0\">\n<div class=\"fl-module-content fl-node-content\">\n<div class=\"fl-rich-text\">\n<h2>Background<\/h2>\n<p>Lychrel numbers are natural numbers that do not form a palindrome after successive additions to their inverse. See details on Wikipedia: <a title=\"Wikipedia entry for Lychrel Number\" href=\"http:\/\/en.wikipedia.org\/wiki\/Lychrel_number\">http:\/\/en.wikipedia.org\/wiki\/Lychrel_number<\/a><\/p>\n<h2>What to Do<\/h2>\n<p>Your job is to create a program that asks the user for two pieces of data:<\/p>\n<ul>\n<li>The lower bound of the sequence<\/li>\n<li>The upper bound of the sequence<\/li>\n<\/ul>\n<div>Then you check the values from the lower bound (inclusive) to the upper bound (inclusive) and make a report of them. During the analysis of each number, if a Lychrel number is found it should be reported immediately with something like &#8220;Found a Lychrel number: 196&#8221;<\/div>\n<h2>Details<\/h2>\n<div>The report must show:<\/div>\n<div>\n<ul>\n<li>The range of numbers analysed (lower to upper bound)<\/li>\n<li>The number of natural palindromes (no addition to inverse needed)<\/li>\n<li>The number of non-Lycherels encountered (become palindromes)<\/li>\n<li>The number of Lycherel number candidates (that did not converge to palindrome)<\/li>\n<\/ul>\n<\/div>\n<p>Since you will not be able to prove that a number is Lycherel (since you cannot computer forever to check), our definition for a Lycherel candidate will be if a number does not converge after 30 iterations of applying the addition to the inverse.<\/p>\n<p>This is easier in Python but if you are curious and want to try this in C++ (Java would be similar), to get this working well, you will need support for Big Integers. You can base your solution off <a title=\"Yo Soy 196 starter\" href=\"https:\/\/github.com\/kenwbauer\/TC1017\/blob\/master\/yosoy196.zip\">my codebase on GitHub<\/a>. Unzip all of the files in a directory and use the command &#8220;make&#8221; to compile. Run the executable.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"fl-module fl-module-heading fl-node-561fd0396c54d\" data-node=\"561fd0396c54d\" data-animation-delay=\"0.0\">\n<div class=\"fl-module-content fl-node-content\">\n<h3 class=\"fl-heading\"><span class=\"fl-heading-text\">How to use BigInteger and make<\/span><\/h3>\n<p><iframe loading=\"lazy\" width=\"863\" height=\"647\" src=\"https:\/\/www.youtube.com\/embed\/PHZYtOhFAZs?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<\/div>\n<\/div>\n<div class=\"fl-module fl-module-video fl-node-561fd046e9927\" data-node=\"561fd046e9927\" data-animation-delay=\"0.0\"><\/div>\n<div class=\"fl-module fl-module-heading fl-node-561fcff56a977\" data-node=\"561fcff56a977\" data-animation-delay=\"0.0\">\n<div class=\"fl-module-content fl-node-content\">\n<h3 class=\"fl-heading\"><span class=\"fl-heading-text\">Video Demo<\/span><\/h3>\n<p><iframe loading=\"lazy\" width=\"863\" height=\"647\" src=\"https:\/\/www.youtube.com\/embed\/KMDDoipS9H0?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<\/div>\n<\/div>\n<div class=\"fl-module fl-module-video fl-node-561fd01668c85\" data-node=\"561fd01668c85\" data-animation-delay=\"0.0\"><\/div>\n<div class=\"fl-module fl-module-rich-text fl-node-561fcf99722b5\" data-node=\"561fcf99722b5\" data-animation-delay=\"0.0\">\n<div class=\"fl-module-content fl-node-content\">\n<div class=\"fl-rich-text\">\n<h2>What to Submit<\/h2>\n<p>As usual, create a blog post explaining what you did, where you found resources (books, videos, web pages, friends) to help you solve this. Remember to put the tag #WSQ08 \u00a0on your post so our blog hub picks that up.<\/p>\n<p>You should include your code as a link to GitHub. You really should start using your GitHub repository now. If you need help on that, just ask Ken or your classmates.<\/p>\n<p>And of course, leave any questions here as well as asking those questions on our Slack\u00a0in the #TC1014gda channel so we all see your question posted there.<\/p>\n<h2>Feature Image Credit<\/h2>\n<figure id=\"attachment_37024\" aria-describedby=\"caption-attachment-37024\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.flickr.com\/photos\/kenandpauline\/5490820\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-37024\" src=\"https:\/\/kenscourses.com\/tc1014winter2017\/wp-content\/uploads\/2017\/02\/5490820_02407baadc_b.jpg\" alt=\"Background Lychrel numbers are natural numbers that do not form a palindrome after successive additions to their inverse. See details on Wikipedia: http:\/\/en.wikipedia.org\/wiki\/Lychrel_number What to Do Your job is to create a program that asks the user for two pieces of data: The lower bound of the sequence The upper bound of the sequence Then you check the values from the lower bound (inclusive) to the upper bound (inclusive) and make a report of them. During the analysis of each number, if a Lychrel number is found it should be reported immediately with something like &quot;Found a Lychrel number: 196&quot; Details The report must show: The range of numbers analysed (lower to upper bound) The number of natural palindromes (no addition to inverse needed) The number of non-Lycherels encountered (become palindromes) The number of Lycherel number candidates (that did not converge to palindrome) Since you will not be able to prove that a number is Lycherel (since you cannot computer forever to check), our definition for a Lycherel candidate will be if a number does not converge after 30 iterations of applying the addition to the inverse. To get this working well, you will need support for Big Integers. You can base your solution off my codebase on GitHub. Unzip all of the files in a directory and use the command &quot;make&quot; to compile. Run the executable. How to use BigInteger and make Video Demo What to Submit As usual, create a blog post explaining what you did, where you found resources (books, videos, web pages, friends) to help you solve this. Remember to put the tag #WSQ08 on your post so our blog hub picks that up. You should include your code as a link to GitHub. You really should start using your GitHub repository now. If you need help on that, just ask Ken or your classmates. And of course, leave any questions here as well as asking those questions on Twitter with the hashtag #TC1017 so we all see your question posted there. Feature Image Credit &lt;a title=&quot;The Magic Numbers&quot; href=&quot;https:\/\/flickr.com\/photos\/kenandpauline\/5490820&quot;&gt;The Magic Numbers&lt;\/a&gt; flickr photo by &lt;a href=&quot;https:\/\/flickr.com\/people\/kenandpauline&quot;&gt;K &amp; P&lt;\/a&gt; shared under a &lt;a href=&quot;https:\/\/creativecommons.org\/licenses\/by-nc-nd\/2.0\/&quot;&gt;Creative Commons (BY-NC-ND) license&lt;\/a&gt; &lt;\/small&gt; The Magic Numbers flickr photo by K &amp; P shared under a Creative Commons (BY-NC-ND) license\" width=\"1024\" height=\"683\" srcset=\"https:\/\/kenscourses.com\/tc1014winter2017\/wp-content\/uploads\/2017\/02\/5490820_02407baadc_b.jpg 1024w, https:\/\/kenscourses.com\/tc1014winter2017\/wp-content\/uploads\/2017\/02\/5490820_02407baadc_b-300x200.jpg 300w, https:\/\/kenscourses.com\/tc1014winter2017\/wp-content\/uploads\/2017\/02\/5490820_02407baadc_b-768x512.jpg 768w, https:\/\/kenscourses.com\/tc1014winter2017\/wp-content\/uploads\/2017\/02\/5490820_02407baadc_b-863x576.jpg 863w, https:\/\/kenscourses.com\/tc1014winter2017\/wp-content\/uploads\/2017\/02\/5490820_02407baadc_b-162x108.jpg 162w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-37024\" class=\"wp-caption-text\">Background<br \/>Lychrel numbers are natural numbers that do not form a palindrome after successive additions to their inverse. See details on Wikipedia: http:\/\/en.wikipedia.org\/wiki\/Lychrel_number<br \/>What to Do<br \/>Your job is to create a program that asks the user for two pieces of data:<br \/>The lower bound of the sequence<br \/>The upper bound of the sequence<br \/>Then you check the values from the lower bound (inclusive) to the upper bound (inclusive) and make a report of them. During the analysis of each number, if a Lychrel number is found it should be reported immediately with something like &#8220;Found a Lychrel number: 196&#8221;<br \/>Details<br \/>The report must show:<br \/>The range of numbers analysed (lower to upper bound)<br \/>The number of natural palindromes (no addition to inverse needed)<br \/>The number of non-Lycherels encountered (become palindromes)<br \/>The number of Lycherel number candidates (that did not converge to palindrome)<br \/>Since you will not be able to prove that a number is Lycherel (since you cannot computer forever to check), our definition for a Lycherel candidate will be if a number does not converge after 30 iterations of applying the addition to the inverse.<br \/>To get this working well, you will need support for Big Integers. You can base your solution off my codebase on GitHub. Unzip all of the files in a directory and use the command &#8220;make&#8221; to compile. Run the executable.<br \/>How to use BigInteger and make<br \/>Video Demo<br \/>What to Submit<br \/>As usual, create a blog post explaining what you did, where you found resources (books, videos, web pages, friends) to help you solve this. Remember to put the tag #WSQ08 on your post so our blog hub picks that up.<br \/>You should include your code as a link to GitHub. You really should start using your GitHub repository now. If you need help on that, just ask Ken or your classmates.<br \/>And of course, leave any questions here as well as asking those questions on Twitter with the hashtag #TC1017 so we all see your question posted there.<br \/>Feature Image Credit<br \/><a title=\"The Magic Numbers\" href=\"https:\/\/flickr.com\/photos\/kenandpauline\/5490820\">The Magic Numbers<\/a> flickr photo by <a href=\"https:\/\/flickr.com\/people\/kenandpauline\">K &amp; P<\/a> shared under a <a href=\"https:\/\/creativecommons.org\/licenses\/by-nc-nd\/2.0\/\">Creative Commons (BY-NC-ND) license<\/a> <br \/>The Magic Numbers flickr photo by K &amp; P shared under a Creative Commons (BY-NC-ND) license<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Background Lychrel numbers are natural numbers that do not form a palindrome after successive additions to their inverse. See details on Wikipedia: http:\/\/en.wikipedia.org\/wiki\/Lychrel_number What to Do Your job is to create a program that asks the user for two pieces of data: The lower bound of the sequence The upper bound of the sequence Then &hellip; <a href=\"https:\/\/kenscourses.com\/tc1014winter2017\/instructor\/wsq08-yo-soy-196\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">WSQ08 &#8211; Yo Soy 196<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":37024,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,24],"tags":[],"class_list":["post-37023","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-instructor","category-wsq"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/posts\/37023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/comments?post=37023"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/posts\/37023\/revisions"}],"predecessor-version":[{"id":37026,"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/posts\/37023\/revisions\/37026"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/media\/37024"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/media?parent=37023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/categories?post=37023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc1014winter2017\/wp-json\/wp\/v2\/tags?post=37023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}