{"id":203,"date":"2023-05-20T09:56:28","date_gmt":"2023-05-20T09:56:28","guid":{"rendered":"https:\/\/renegrothmann.de\/?p=203"},"modified":"2023-05-20T09:56:39","modified_gmt":"2023-05-20T09:56:39","slug":"203","status":"publish","type":"post","link":"https:\/\/renegrothmann.de\/?p=203","title":{"rendered":"Another nice Math Problem"},"content":{"rendered":"\n<p>Published in the old blog in 1022\/08\/16<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>I recently got recommended a YouTube video by MindYourDecisions with the following problem:<\/p>\n\n\n\n<p>Which number doubles when the last digit becomes the first digit?<\/p>\n\n\n\n<p>What is meant by \u201ebecomes the first digit\u201c is that the last digit is moved to the front and all others shift right one place, a rotation like \u201e12345 -&gt; 51234\u201c (which does not double 12345 as desired). It turns out that there are more videos with the same or a similar problem. I did not watch one of them. That\u2019s the kind of problem I like to solve on my own. Let me share my thought process.<\/p>\n\n\n\n<p>Everybody will probably try to find the number by using an algebraic equation. It turns out that rotation is surprisingly difficult to represent. A simple form should look like this:<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>2(10x+d) = 10^nd+x<\/pre><\/div>\n\n\n\n<p>There are some side conditions, however. The number d must be a single digit from 1 to 10, and x must be a natural number with exactly n digits. The equation above is equivalent to<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>x = \\frac{10^n-2}{19} d<\/pre><\/div>\n\n\n\n<p>Thus, 19 must dived 10^n-2. Now, if you know a bit about Fermat\u2019s little theorem and Algebra, you notice that 19 is prime and 10^n modulo 19 will run through all numbers 1 to 18. In fact, we get for the remainders of 10^n if divided by 10 the following sequence:<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>1,10,5,12,6,3,11,15,17,18,9,14,7,13,16,8,4,2,11,10,5, \\\\12,6,3,11,15,17,18,9,14,7,13,16,8,4,2,1<\/pre><\/div>\n\n\n\n<p>We find the remainder 2 for 10^17. In fact,<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>1017\u2212219=52631578947368421017\u2212219=5263157894736842<\/pre><\/div>\n\n\n\n<p>Now, we have some choices for d. Note, that the number above has only 16 digits, but our n was 17. But already with d=2 we get a 17-digit number. We found the following solution (remember N=10x+d):<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>N = 2 \\cdot 5263157894736842 \\cdot 10 + 2 = 105263157894736842<\/pre><\/div>\n\n\n\n<p>Indeed<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>2N = 210526315789473684<\/pre><\/div>\n\n\n\n<p>A mathematician should never be satisfied with a solution that has been found in this fiddling way. The first obvious question is: Are there more solutions?<\/p>\n\n\n\n<p>Indeed, we can set d=2,3,4,5,6,7,8,9 and get 8 different solutions:<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>105263157894736842,\u2026,473684210526315789<\/pre><\/div>\n\n\n\n<p>For n=17, there are no more than these. But Fermat\u2019s theorem and our computations above tell us that 10^18=1 modulo 19. Thus, we get more solutions by adding multiples of 18, e.g.:<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>\\frac{10^{35}\u22122}{19}\u22c52\u22c510+2 =105263157894736842105263157894736842<\/pre><\/div>\n\n\n\n<p>At that point, you should get suspicious and try to reflect on previous knowledge, in this case periodic decimal representations. I noticed this only after a while. But then it dawned to me:<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>\\frac{2}{19} = 0.\\overline{105263157894736842}<\/pre><\/div>\n\n\n\n<p>and<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>\\frac{4}{19}=0.210526315789473684<\/pre><\/div>\n\n\n\n<p>The reason is that 40 divided by 19 yields 2 with a remainder of 2. Then 20 divided by 19 yields 1 with a remainder of 1. Then comes a 0 with a remainder of 10 etc. The process goes through all 18 remainders, before it repeats itself.<\/p>\n\n\n\n<p>Starting at half of 20, i.e. with 10, we get the 1 from the second place of our digits. Thus, we get the sequence rotated to the left. This easily explains our result.<\/p>\n\n\n\n<p>Why doesn\u2019t the process work with 1\/7? There, we never meet that d\/7 is 2d\/7 shifted one place. However,<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>5\u22c5142857=714285<\/pre><\/div>\n\n\n\n<p>This can be explained in the same way using the decimal representation of 1\/7.<\/p>\n\n\n\n<p>Try 4\/39, 16\/39, 7\/69, 49\/69 for more.<\/p>\n\n\n\n<p>Nice, isn&#8217;t it?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Published in the old blog in 1022\/08\/16 I recently got recommended a YouTube video by MindYourDecisions with the following problem: Which number doubles when the last digit becomes the first digit? What is meant by \u201ebecomes the first digit\u201c is that the last digit is moved to the front and all others shift right one [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-203","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/renegrothmann.de\/index.php?rest_route=\/wp\/v2\/posts\/203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/renegrothmann.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/renegrothmann.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/renegrothmann.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/renegrothmann.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=203"}],"version-history":[{"count":3,"href":"https:\/\/renegrothmann.de\/index.php?rest_route=\/wp\/v2\/posts\/203\/revisions"}],"predecessor-version":[{"id":206,"href":"https:\/\/renegrothmann.de\/index.php?rest_route=\/wp\/v2\/posts\/203\/revisions\/206"}],"wp:attachment":[{"href":"https:\/\/renegrothmann.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/renegrothmann.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/renegrothmann.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}