{"id":4337,"date":"2014-06-11T11:46:12","date_gmt":"2014-06-11T09:46:12","guid":{"rendered":"https:\/\/wpethzprd.ethz.ch\/kowalski\/?p=4337"},"modified":"2024-02-20T13:40:33","modified_gmt":"2024-02-20T11:40:33","slug":"leos-first-theorem","status":"publish","type":"post","link":"https:\/\/blogs.ethz.ch\/kowalski\/2014\/06\/11\/leos-first-theorem\/","title":{"rendered":"Leo&#8217;s first theorem"},"content":{"rendered":"<p>I learnt the following from my son L\u00e9o: the teacher asks to compute $latex 9+9$; that&#8217;s easy<br \/>\n$latex 9\\ +\\ 9\\ =\\ 18.$<br \/>\nBut no! The actual question is to compute $latex 9$ times $latex 9$!  We must correct this! But it&#8217;s just as easy without starting from scratch: we turn the &#8220;plus&#8221; cross a quarter turn on the left-hand side:<br \/>\n$latex 9\\ \\times\\ 9$<br \/>\nand then switch the digits on the right-hand side:<br \/>\n$latex 9\\ \\times\\ 9\\ =\\ 81.$<\/p>\n<p>This is a fun little random fact about integers and decimal expansions, certainly.<\/p>\n<p>But there&#8217;s a bit more to it than that: it is in fact independent of the choice of base $latex 10$, in the sense that if we pick any other integer $latex b\\geq 2$, and consider base $latex b$ expansions, then we also have<\/p>\n<p>$latex (b-1)\\ +\\ (b-1)\\ =\\ 2b-2\\ =\\ b+(b-2)= \\underline{1}\\,\\underline{b-2}$<\/p>\n<p>as well as<\/p>\n<p>$latex (b-1)\\ \\times\\ (b-1)\\ =\\ (b-1)^2=b(b-2)+1= \\underline{b-2}\\,\\underline{1},$<\/p>\n<p>(where we underline individual digits in base $latex b$ expansion.)<\/p>\n<p>At this point it is natural to ask if there are any other L\u00e9o-pairs $latex (x,y)$ to base $latex b$, i.e., pairs of digits in base $latex b$ such that the base $latex b$ expansions of the sum and the product of $latex x$ and $latex y$ are related by switching the two digits (where we always get two digits in the result by viewing a one-digit result $latex z$ as $latex \\underline{0}\\, \\underline{z}$).<\/p>\n<p>It turns out that, whatever the base $latex b$, the only such pairs are $latex (b-1,b-1)$ and the &#8220;degenerate&#8221; case $latex (0,0)$.<\/p>\n<p>To see this, there are two cases: either the addition $latex x+y$ leads to a carry, or not.<\/p>\n<p>If it does, this means that $latex y=b-z$ where $latex x&gt;z$. The sum is then<\/p>\n<p>$latex x+y=b+(x-z)=\\underline{1}\\,\\underline{x-z}.$<\/p>\n<p>So this is a L\u00e9o-pair if and only if<\/p>\n<p>$latex xy=\\underline{x-z}\\,\\underline{1}.$<\/p>\n<p>This equation, in terms of $latex x$ and $latex z$, becomes<\/p>\n<p>$latex x(b-z)=b(x-z)+1,$<\/p>\n<p>which holds if and only if $latex z(b-x)=1$.  Since the factors are integers and non-negative, this is only possible if $latex z=b-x=1$, which means $latex x=y=b-1$, the solution found by L\u00e9o.<\/p>\n<p>Now suppose there is no carry.  This means that we have $latex 0\\leq x,y\\leq b-1$ and $latex x+y\\leq b-1$.  Then<br \/>\n$latex x+y=\\underline{0}\\,\\underline{x+y},$<br \/>\nand we have a L\u00e9o-pair if and only if<br \/>\n$latex xy=\\underline{x+y}\\,\\underline{0},$<br \/>\ni.e., if and only if $latex xy=b(x+y)$.<\/p>\n<p>This is not an uninteresting little equation!  For a fixed $latex b$ (which could now be any non-zero rational), this defines a simple quadratic curve. Without the restrictions on the size of the solution $latex (x,y)$, there is always a point on this curve, namely<br \/>\n$latex (x_0,y_0)=(2b,2b).$<br \/>\nThis does not fit our conditions, of course.  But we can use it to find all other integral solutions, as usual for quadratic curves. First, any line through $latex (x_0,y_0)$ intersects the curve in a a second point, which has rational coordinates if the line is also defined by rational coefficients, and conversely. <\/p>\n<p>Doing this, some re-arranging and checking leads to the parameterization<\/p>\n<p>$latex \\begin{cases} x=b+k\\\\  y=b+\\frac{b^2}{k}\\end{cases}$<\/p>\n<p>of the rational solutions to $latex xy=b(x+y)$, where $latex k$ is an arbitrary non-zero rational number. In this case, this can also be found more easily by simply writing the equation in the form<br \/>\n$latex 0=xy-bx-by=(x-b)(y-b)-b^2\\ldots$<\/p>\n<p>Now assume that $latex b\\geq 2$ is an integer, and we want $latex (x,y)$ to be integers.  This holds if and only if $latex k$ is an integer such that $latex k\\mid b^2$.  <\/p>\n<p>Such solutions certainly exist, but do they satisfy the digit condition?  The answer is yes if and only if $latex k=-b$, which means $latex x=y=0$, giving the expected degenerate pair.  Indeed, to have $latex x&lt;b$, the parameter $latex k$ must be a negative divisor of $latex k^2$. We write $latex k=-d$ with $latex d\\mid k^2$ positive. Then to have non-negative digits, we must have<br \/>\n$latex \\begin{cases} x=b-d\\geq 0\\\\ y=b-\\frac{b^2}{d}\\geq 0\\end{cases},$<br \/>\nthe first one of these inequalities means $latex b\\geq d$, while the second means that $latex b\\leq d$&#8230; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I learnt the following from my son L\u00e9o: the teacher asks to compute $latex 9+9$; that&#8217;s easy $latex 9\\ +\\ 9\\ =\\ 18.$ But no! The actual question is to compute $latex 9$ times $latex 9$! We must correct this! But it&#8217;s just as easy without starting from scratch: we turn the &#8220;plus&#8221; cross a &hellip; <a href=\"https:\/\/blogs.ethz.ch\/kowalski\/2014\/06\/11\/leos-first-theorem\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Leo&#8217;s first theorem<\/span><\/a><\/p>\n","protected":false},"author":625,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1086,2],"tags":[],"class_list":["post-4337","post","type-post","status-publish","format-standard","hentry","category-exercise","category-blogroll"],"_links":{"self":[{"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/posts\/4337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/users\/625"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/comments?post=4337"}],"version-history":[{"count":0,"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/posts\/4337\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/media?parent=4337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/categories?post=4337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/tags?post=4337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}