Jekyll2023-11-04T21:14:13+00:00https://www.flyingcoloursmaths.co.uk/feed.xmlFlying Colours MathsFlying Colours Maths helps make sense of maths at A-level and beyond.Ask Uncle Colin: A Factor of 772023-10-30T00:00:00+00:002023-10-30T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/ask-uncle-colin-a-factor-of-77<blockquote>
<p>Dear Uncle Colin,</p>
<p>I want to show that $(a^{60} - b^{30})ab$ is a multiple of 77 for all integers $a$ and $b$. Where do I even begin?</p>
<ul>
<li>Factoring Expression, Reasonable Methods Aren’t Trivial</li>
</ul>
</blockquote>
<p>Hi, FERMAT, and thanks for your message!</p>
<p>I would start by thinking about the possible values of $a^{60}$ and $b^{30}$ modulo 7 and 11.</p>
<ul>
<li>In $\mathbb{Z_{7}}$, $a^6 \equiv 1$ for any element $a$</li>
<li>In $\mathbb{Z_{11}}$, $a^{10} \equiv 1$ for any element $a$.</li>
</ul>
<p>The means, that as long as $a$ isn’t a multiple of 7, $a^{60}$ is one more than a multiple of 7; similarly, $b^{30}$ is one more than a multiple of 7 if $b$ isn’t a multiple of 7.</p>
<p>So, if neither $a$ nor $b$ is a multiple of 7, then $a^{60}-b^{30}$ is a multiple of 7; otherwise, $ab$ is a multiple of 7. In either case, the expression has 7 as a factor.</p>
<p>An identical argument works for 11, so the expression is a multiple of 11 as well.</p>
<p>And if it’s a multiple of both 11 and 7, then it’s a multiple of 77.</p>
<p>Hope that helps!</p>
<p>- Uncle Colin</p>Dear Uncle Colin, I want to show that $(a^{60} - b^{30})ab$ is a multiple of 77 for all integers $a$ and $b$. Where do I even begin? Factoring Expression, Reasonable Methods Aren’t TrivialA problem from the future2023-10-23T01:00:00+01:002023-10-23T01:00:00+01:00https://www.flyingcoloursmaths.co.uk/a-problem-from-the-future<p>A nice puzzle from <a href="https://www.reddit.com/r/mathematics/comments/14hsnzc/problem_from_the_future/">reddit</a>:</p>
<blockquote>
<p>Evaluate $\sqrt{\sqrt{2025}-\sqrt{2024}}$</p>
</blockquote>
<p>The suggestion is that this is the sort of thing that’ll be in Olympiad papers in a couple of years. Fair enough.</p>
<p>This isn’t quite a real-time solution, but it’s roughly how I thought about it and tackled it. Spoilers are (as you might surmise) below the line.</p>
<hr />
<p>The first thing I notice is that 2025 is a square number (it’s $45^2$). That means 2024 is $(44)(46)$, although, as it turns out, that’s not immediately helpful to me.</p>
<p>Instead, I followed a problem-solving strategy that was crystallised to me by @colinthemathmo: “make it really big or make it really small”. Could I adapt the problem to one with easier numbers? Let’s consider $x=\sqrt{\sqrt{4}-\sqrt{3}}$, which is more my pace.</p>
<p>I can rewrite that as $x^2 = 2-\sqrt{3}$, and ask “what’s the square root of that?” It’s time for an aside.</p>
<h3 id="aside">Aside</h3>
<p>Let’s suppose $x = a + b\sqrt{3}$, so that $x^2 = \left(a^2 + 3b^2\right) + 2ab\sqrt{3}$.</p>
<p>That leads us to the simultaneous equations $a^2 + 3b^2 = 2$ and $2ab = -1$.</p>
<p>Do you want to know my trick for these? I guess you wouldn’t be reading if you didn’t. It’s “combine them so the loose number is 0.” If I double the second and add it to the first, I get $a^2 + 4ab + 3b^2 = 0$.</p>
<p>That factorises immediately as $(a+b)(a+3b)=0$ – so either $a = -b$ or $a = -3b$.</p>
<p><strong>Case 1, $a=-b$</strong>: We’ve got $a^2 + 3(-a)^2 = 2$, so $a^2 = \frac{1}{2}$. That give $a = \pm \sqrt{\frac{1}{2}}$ and $b = \mp \sqrt{\frac{1}{2}}$; this means $x = \left(\sqrt{\frac{3}{2}}-\sqrt{\frac{1}{2}}\right)$, given that we want the positive value.</p>
<p><strong>Case 2, $a=-3b$</strong>: Here, $(-3b)^2 + 3b^2 = 2$, so $b^2 = \frac{1}{6}$. We end up with $b = \pm \sqrt{\frac{1}{6}}$ and $a = \mp \sqrt{\frac{3}{2}}$. That leads to the same value of $x$ in the end. This is reassuring; a number can only have two square roots.</p>
<p>OK: we can get a simple enough answer for the case based on 4. A more gung-ho mathematician would hypothesis from here, but I’d like a bit more evidence first. Let’s try $x = \sqrt{\sqrt{100} - \sqrt{99}}$.</p>
<p>We can follow the same approach with a $\sqrt{99}$ instead of a $\sqrt{3}$ and get $a^2 + 99b^2 = 10$ and $2ab = -1$ again.</p>
<p>Skipping the details, which are much the same, we end up with $x = \left(\sqrt{\frac{11}{2}} - \sqrt{\frac{9}{2}}\right)$.</p>
<h3 id="now-we-have-enough-for-a-hypothesis">Now we have enough for a hypothesis</h3>
<p>I hypothesise that $\sqrt{n - \sqrt{n^2-1}}$ is $\sqrt{\frac{n+1}{2}}-\sqrt{\frac{n-1}{2}}$, based on two calculations. Let’s prove it:</p>
<ul>
<li>$\left(\sqrt{\frac{n+1}{2}}-\sqrt{\frac{n-1}{2}}\right)^2 = \frac{n+1}{2} + \frac{n-1}{2} - 2\left(\sqrt{\frac{n+1}{2}\cdot \frac{n-1}{2}}\right)$</li>
<li>$\dots = n - \sqrt{(n+1)(n-1)}$</li>
<li>$\dots = n - \sqrt{n^2-1}$.</li>
</ul>
<p>Since the second expression is positive for $n \ge 1$, it’s the positive square root of the first, as required.</p>
<h3 id="so-the-answer">So the answer…</h3>
<p>In our puzzle, $n=45$, so our answer needs to be $\sqrt{23}-\sqrt{22}$.</p>
<p>I feel like there ought to be a more direct way to solve it. As always, I love to hear your ideas!</p>A nice puzzle from reddit:Simultaneous powers2023-10-16T01:00:00+01:002023-10-16T01:00:00+01:00https://www.flyingcoloursmaths.co.uk/simultaneous-powers<p>Today’s problem:</p>
<ul>
<li>$\frac{a}{b} = \frac{2}{3}$</li>
<li>$a^b = b^a$</li>
<li>Find $b-a$.</li>
</ul>
<p>I’m just going to straight-up answer this below the line.</p>
<hr />
<p>My first step would be to separate the $a$ and $b$ in the second equation, to get $a^{1/a} = b^{1/b}$. I was tempted by logs for a moment, but we don’t know that $a$ and $b$ are positive.</p>
<p>I can also separate the first equation to get $b = \frac{3a}{2}$.</p>
<p>Now I have $a^{1/a} = \left(\frac{3a}{2}\right)^{\frac{2}{3a}}$. Now we’re cooking.</p>
<p>Raise both sides to the power of $3a$, which is definitely the ugly thing: $a^3 = \left(\frac{3a}{2}\right)^2$ – and we’re almost there:</p>
<p>$4a^3 = 9a^2$, so $a = \frac{9}{4}$.</p>
<p>We can also say that $b-a = \frac{a}{2}$, which works out to be $\frac{9}{8}$.</p>
<p>(It turns out logs would have worked after all, but we didn’t know that at the time…)</p>Today’s problem:Random Number Challenge2023-10-09T00:00:00+01:002023-10-09T00:00:00+01:00https://www.flyingcoloursmaths.co.uk/random-number-challenge<p>You have 20 spaces, which you want to fill with numbers, in order. You will be given 20 random numbers between 0 and 999 (inclusive), each of which you must place into a space as soon as you see it. If you can place all 20 while keeping them in order, you win.</p>
<p>What’s your best strategy? How likely are you to win?</p>
<p>I’ve done some analysis, which I’ve put below the line because it might constitute a spoiler.</p>
<hr />
<p>For me, the trick to analysing this game is to realise that every move splits a group of spaces into two parts, one or both of which may be empty.</p>
<p>The probability of being able to successfully fill those parts is the product of two factors:</p>
<ul>
<li>the probability that the remaining numbers will fall into the two parts, regardless of order; and</li>
<li>the probability that you can fill a part of that size and with that many spaces.</li>
</ul>
<p>Typically, it’s easier to fill two parts if they have roughly even-sized spaces. However, the number of spaces available also affects the analysis.</p>
<p>The probability of winning the two-space game is around 75% – if you start with a middling number, you have a 50-50 chance of placing the other correctly, if you start with an extreme number, you are almost certain to place the next correctly, and it averages out to three-quarters<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup>.</p>
<p>For a harder example, in the three-space game, your first move splits the spaces either into a part with two spaces and a part with none, or two parts, each with one space.</p>
<p>If your first number is $x$, it splits the 1000 numbers into parts of size $x$ and size $1001-x$. <sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup> Without loss of generality, I’ll assume that $x > 500$. We could sensibly:</p>
<ul>
<li>Put $x$ in the middle slot and hope that the remaining two numbers fall either side of it; or</li>
<li>Put $x$ in the high slot and hope that neither remaining number is larger.</li>
</ul>
<p>In the first case, the probability of the numbers splitting correctly is $\frac{2x(1001-x)}{1000^2}$, via the binomial distribution; if they split correctly, we win automatically.</p>
<p>In the second, the probability of the numbers splitting correctly is $\frac{x^2}{1000^2}$, also via binomial, but we only have about a 75% chance of correctly placing the remaining numbers.</p>
<p>There’s a crossover point where the two probabilities are the same: $2x(1001-x) = \frac{3}{4}x^2$ when $x=728$. If $x$ is larger than this, it’s best to put $x$ in the high slot; smaller (but bigger than the corresponding low-side $x$ of 273), it’s best to put $x$ in the middle. For 728 itself, it doesn’t matter.</p>
<p>If you sum all of the possibilities, you find that this strategy wins about 52% of the time.</p>
<p>I wrote code to analyse the 20-number case, because while I have <em>some</em> spare time to play around with these things, it’s not infinite. It’s on <a href="https://github.com/icecolbeveridge/randomnumberchallenge">github</a>. Play if you like.</p>
<p>The upshot is, you should expect to win the 20-number challenge about once every 9000 attempts, with perfect play. Good luck!</p>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:1" role="doc-endnote">
<p>It turns out to be linear, so this is legitimate analysis rather than ball-parking. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:2" role="doc-endnote">
<p>The extra 1 comes because if you drew another $x$, it could reasonably go in either space without being out of order. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>You have 20 spaces, which you want to fill with numbers, in order. You will be given 20 random numbers between 0 and 999 (inclusive), each of which you must place into a space as soon as you see it. If you can place all 20 while keeping them in order, you win.Ask Uncle Colin: Integrating sin(x)2023-10-02T00:00:00+01:002023-10-02T00:00:00+01:00https://www.flyingcoloursmaths.co.uk/ask-uncle-colin-integrating-sin-x<blockquote>
<p>Dear Uncle Colin</p>
<p>How would you prove that the area under the curve $y=\sin(x)$ from $x = 0$ to $x=\pi$ was exactly 2?</p>
<p>‘Cause I Realised Calculus Lacked Explanation</p>
</blockquote>
<p>Hi, CIRCLE, and thanks for your message!</p>
<p>The standard way is just to know that the integral((with respect to $x$)) of $\sin(x)$ is $-\cos(x)$, plug in the limits and dust your hands as if you’ve done something clever. But – as you suggest – that’s more of a trick than an explanation.</p>
<p>Let’s look instead at a unit circle, and consider a tiny sector of it. The angle at the centre is $\Delta\theta$, and the whole thing is raised at an angle $\theta$ from the positive $x$-axis.</p>
<p>If $\Delta \theta$ is small enough, the arc of the sector is effectively straight and has length $\Delta \theta$ (because the radius is 1). If we split that into a horizontal and vertical component, the horizontal displacement is $-\Delta \theta \sin(\theta)$.</p>
<p>Now. Let’s split up the upper half of the circle so it’s made entirely out of $n$ equal tiny sectors. Then we know that $\sum_1^n -\Delta \theta \sin(\theta_i) = -2$, where $\theta_i$ is the inclination of the $i$th sector. It’s going to vanish in a minute, so don’t worry about it.</p>
<p>In the limit as $n$ approaches infinity, the sum becomes an integral and we get $\int_0^\pi -\sin(\theta) d\theta = -2$, which – once you get rid of the minus signs – is exactly what you wanted to prove.</p>
<p>Hope that helps!</p>
<p>- Uncle Colin</p>Dear Uncle Colin How would you prove that the area under the curve $y=\sin(x)$ from $x = 0$ to $x=\pi$ was exactly 2? ‘Cause I Realised Calculus Lacked ExplanationAn infinite ODE2023-09-25T01:00:00+01:002023-09-25T01:00:00+01:00https://www.flyingcoloursmaths.co.uk/an-infinite-ode<p>Via reddit, a challenge to solve:</p>
<p>$y = y’ + y’’ + y’’’ + \dots$</p>
<p>Once you’ve stopped running away and hiding, I’ll show you the solution they suggested.</p>
<hr />
<p>The trick is to notice that $y’ = y’’ + y’’’ + y^{(4)} + \dots$, so $y = y’ + (y’)$, which is straightforward to solve:</p>
<ul>
<li>$y = 2y’$</li>
<li>$y = Ae^{x/2}$.</li>
</ul>
<p>It’s a good idea to check that it works:</p>
<ul>
<li>$y’ = \frac{1}{2}y$</li>
<li>$y’’ = \frac{1}{4}y$</li>
<li>$\dots$</li>
</ul>
<p>The right-hand side is then $y\left(\frac{1}{2} + \frac{1}{4} + \frac{1}{8}+\dots\right)$, and the bracket evaluates to 1. Boom.</p>
<h2 id="but-wait-a-moment">But wait a moment</h2>
<p>We’ve found <em>a</em> solution. How do we know it’s the only one?</p>
<p>What if you notice that $y’’ = y’’’ + y^{(4)} + \dots$ and get to $y = y’ + 2y’’$?</p>
<p>That solves as $y = Ae^{x/2} + Be^{-x}$. Isn’t that a solution?</p>
<p>Actually, not if $B$ is non-zero – the sum of the derivatives doesn’t converge – but all the same, you could (in principle) do this with any of the derivatives and is there any guarantee that there’s no other solution?</p>
<h2 id="stand-back">Stand back.</h2>
<p>I’m going to try something I haven’t done in 25 years ((I mean, obviously I have, I did it just before writing up the post. But the point stands.)): Laplace transforms.</p>
<p>The tl;dr is that you convert every term of your differential equation (in “$t$-space”, even though we’re really using $x$ here) into a different term in $s$-space, do your magic there and convert back.</p>
<p>Do not worry about what $t$- and $s$- space are, or how the transform works; that’s not the purpose of this article.</p>
<p>The Laplace transform of the ODE:</p>
<p>$0 = -y + y’ + y’’ + y’’’ + \dots$</p>
<p>is</p>
<p>$\begin{aligned}[t]0 = &-Y(s) & <br />
& + sY(s) &- y(0) <br />
& + s^2Y(s) &- sy(0) &- y’(0)<br />
& + s^3Y(s) &- s^2y(0) & -sy’(0) & -y’‘(0)<br />
& + \dots
\end{aligned}$</p>
<p>At first glance, that looks awful. And then you spot that the columns (apart, slightly, from the first) are geometric sequences! This all reduces to</p>
<p>$0=\left(-2 + \frac{s}{1-s}\right)Y(s) - \frac{1}{1-s}\left(y(0) + y’(0) + \dots\right)$</p>
<p>(As long as $s$ is small enough, I guess.)</p>
<p>Now, we don’t really care about the $y(0)$s and so on, and we can just treat them as a single constant. We can also simplify the bracket on the first term:</p>
<p>$0 = \frac{2s-1}{1-s}Y(s) - \frac{1}{1-s}A$</p>
<p>And as long as $s$ isn’t $1$ ((I don’t even know if that makes sense, honestly, like I said, it’s been 25 years)), the solution to that is $Y(s) = \frac{A}{2s-1}$.</p>
<p>The inverse Laplace transform of <em>that</em> is $y(x) = Ae^{x/2}$, as we had before.</p>
<p>I’m still a bit uneasy about the convergence issues on $s$, but I’m going to pretend they don’t matter. At any rate, I’ve convinced <em>myself</em> that this is the only solution, and that’s the main thing.</p>Via reddit, a challenge to solve:How do you prove that $\pi < \sqrt{10}$?2023-09-18T01:00:00+01:002023-09-18T01:00:00+01:00https://www.flyingcoloursmaths.co.uk/prove-pi-smaller-than-root-10<p>In the course of solving a puzzle, I had cause to assert that $\pi <\sqrt{10}$. I mean, that’s just true: I know that $\sqrt{10} \approx 3.16$ and $\pi \approx 3.14$; I also know that $\pi < \frac{22}{7}$ and that $\left(\frac{22}{7}\right)^2 < 10$. But these beg the question. How would I go about proving the inequality without resorting to “I just know”?</p>
<h3 id="polygons">Polygons</h3>
<p>My first thought is, can I construct a polygon with a perimeter of $\sqrt{10}$ that lies outside of the unit circle?</p>
<p>An $n$-gon is made up of isosceles triangles, each of which has an angle at the apex of $\frac{2\pi}{n}$ and – if I’m putting it just outside of a unit circle – the triangles have a height of 1. The base of the triangle is… <em>scribbles</em>… $2\tan\left(\frac{\pi}{n}\right)$, so the polygon’s perimeter is $2n \tan\left(\frac{\pi}{n}\right)$. Are there any “nice” tangents I can draw on?</p>
<p>I’m drawn to the 24-gon, because $\tan\left(\frac{\pi}{24}\right) = \sqrt{6}+\sqrt{2}-\sqrt{3}-2$. I don’t know that this will lead anywhere, but the numbers look ok.</p>
<p>I know that $24\tan\left(\frac{\pi}{24}\right)>\pi$, by construction; if it’s smaller than $\sqrt{10}$, then the proposition is proved.</p>
<p>I spot a couple of factors: $\tan\left(\frac{\pi}{24}\right) = (\sqrt{2}-1)(\sqrt{3}-\sqrt{2})$. So, if I can show that $24(\sqrt{2}-1)(\sqrt{3}-\sqrt{2}) < \sqrt{10}$, we’re good.</p>
<p>I wonder if I can use a conjugate trick? I can multiply both sides by $\sqrt{3}+\sqrt{2}$, for example, and wonder, does $24(\sqrt{2}-1) < \sqrt{30} + \sqrt{20}$?</p>
<p>Rearranging, does $24\sqrt{2} < \sqrt{30} + \sqrt{20} + 24$?</p>
<p>(I recognise that I’m doing the thing we always tell students not to do, and starting from the answer. It’s ok. I’m a professional. More to the point, I’m trying to convince <em>myself</em>, knowing that I could write up the proof properly later).</p>
<p>Now: I want an upper bound on the left and a lower bound on the right. What’s $24\sqrt{2}$? It’s the same as $\sqrt{1152}$. That’s less than (sensei assures me) $34 - \frac{1}{17}$.</p>
<p>What’s an upper bound on $\sqrt{30}$? I know that $54^2 = 2916$, so $\sqrt{3000}< 54 + \frac{7}{9}$ and $\sqrt{30} < 5.4 + \frac{7}{90}$. I can probably improve that with a second decimal place if I need to.</p>
<p>Similarly, $\sqrt{20} < 4.4 + \frac{4}{55}$.</p>
<p>So far, I know that $24\sqrt{2} < 34 - \frac{1}{17}$ and that $\sqrt{30}+\sqrt{20}+24 < 33.8 + \frac{4}{55} + \frac{7}{90}$.</p>
<p>So now all I need to do is find out whether $0.2 < \frac{1}{17}+\frac{4}{55} + \frac{7}{90}$! We could, of course, work it out exaclty. But we’re as well to estimate: $\frac{1}{17}> \frac{1}{20}$; $\frac{4}{55} > \frac{1}{13}$ and $\frac{7}{90}>\frac{1}{13}$. Lastly, $\frac{2}{13}+\frac{1}{20} = \frac{53}{260}$, which is definitely larger than 0.2.</p>
<p>Whew! So, assuming all of my logic and arithmetic is correct, we can work backwards and prove that $\sqrt{10}> \pi$. I won’t do that, because writing up is tedious.</p>
<p>There are, without doubt, other ways of doing it. I’ve not explored complex numbers, calculus or continued fractions, which all look like reasonable approaches. If you’ve got another way, let me know!</p>In the course of solving a puzzle, I had cause to assert that $\pi <\sqrt{10}$. I mean, that’s just true: I know that $\sqrt{10} \approx 3.16$ and $\pi \approx 3.14$; I also know that $\pi < \frac{22}{7}$ and that $\left(\frac{22}{7}\right)^2 < 10$. But these beg the question. How would I go about proving the inequality without resorting to “I just know”?Randomer and randomer2023-09-11T01:00:00+01:002023-09-11T01:00:00+01:00https://www.flyingcoloursmaths.co.uk/randomer-and-randomer<p>A post on Hacker News descended into an argument in the comments ((finish the sentence before you go “oh, <em>quelle surprise</em>”, please.)) about whether <code class="language-plaintext highlighter-rouge">random(random())</code> and <code class="language-plaintext highlighter-rouge">random() * random()</code> gave different distributions.</p>
<p>Now, I know better than to wade into a Hacker News discussion unless it’s about mental arithmetic and can name-drop Colin Wright. However, this did interest me enough to think about. Maybe you’d like to think about it, too. Spoilers below the line.</p>
<hr />
<p>At heart, the question asks “is drawing a random number $X\sim U[0,1]$ and then another $Y\sim U[0,X]$ the same thing as drawing two random numbers $P\sim U[0,1]$ and $Q\sim U[0,1]$, then letting $Y = PQ$?”</p>
<p>The combatants were agreed on one thing: these calls were both different to drawing a random number $X\sim U[0,1]$ and letting $Y=X^2$. If fish were ever in a kettle, this was an entirely different one.</p>
<p>This… well, none of it is easy to see. However, we can look at the chances of getting a high score - let’s say $Y \ge 0.81$, picking something that’s easy to square root.</p>
<p>In the squared case, we get that 10% of the time – if $X > 0.9$, we’re good.</p>
<p>In the <code class="language-plaintext highlighter-rouge">random() * random()</code> case, we’d need $P$ and $Q$ to lie in the region $PQ > 0.81$, which – you might want to check my integration – has area $0.19 +0.81\ln(0.81)$. Whatever that is, it’s not exactly 0.1.</p>
<p>If you go through the process for the <code class="language-plaintext highlighter-rouge">random(random())</code> case, you get… the same result. Coincidence? I think not! But a matching answer, no matter how unusual, doesn’t constitute a proof.</p>
<p>The key to proving that they’re the same lies in realising that (from the <code class="language-plaintext highlighter-rouge">random(random))</code> case) $Y \sim U[0,X]$ is the same thing as saying $Z = U[0,1]$ and letting $Y = XZ$.</p>
<p>So $Y$ is the product of two variables drawn from $U[0,1]$ – which is the same as the <code class="language-plaintext highlighter-rouge">random() * random()</code> case.</p>A post on Hacker News descended into an argument in the comments ((finish the sentence before you go “oh, quelle surprise”, please.)) about whether random(random()) and random() * random() gave different distributions.Ask Uncle Colin: An Ugly Sum2023-09-04T00:00:00+01:002023-09-04T00:00:00+01:00https://www.flyingcoloursmaths.co.uk/ask-uncle-colin-an-ugly-sum<blockquote>
<p>Dear Uncle Colin,</p>
<p>As a challenge, I need to work out $1024 - 512 + 256 - \dots + 1$, but I’m getting mixed up on the fractions and signs. Can you help?</p>
<ul>
<li>Colin, Help! Answer Largely Lacking for Evaluating Negative Geometric Expression</li>
</ul>
</blockquote>
<p>Hi, CHALLENGE, and thanks for your message!</p>
<p>I’ve got three methods for you: the standard method (which I imagine is what you’ve tried and got stuck with), and a couple of tricks that work here.</p>
<h3 id="the-standard-method">The standard method</h3>
<p>The standard way would be:</p>
<ul>
<li>$a = 1024$</li>
<li>$r = -\frac{1}{2}$</li>
<li>We need to do some work to get $n$</li>
</ul>
<p>So:</p>
<ul>
<li>$1024 \left(-\frac{1}{2}\right)^{n-1} = 1$</li>
<li>Multiply both sides by $(-2)^{n-1}$ to get $1024 = (-2)^{n-1}$</li>
<li>Since $2^{10} = 1024$, $(-2)^{10}$ is also 1024 and $n=11$.</li>
</ul>
<p>Then we can use the sum formula $S_n = \frac{a\left(1-r^n\right)}{1-r}$ - I’ve picked the version that’s this way round to make the minus signs easier to work with.</p>
<p>You could (and, some would argue, should) stick the values into the calculator; it’s good for your soul to work things out by hand, though.</p>
<ul>
<li>$S_{11} = \frac{1024\left(1 + \frac{1}{2048}\right)}{1 + \frac{1}{2}}$</li>
<li>Double top and bottom to get $\frac{2048\left(1 + \frac{1}{2048}\right)}{3}$</li>
<li>Expand the top to get $\frac{2049}{3}$, and you can work this out to be 683.</li>
</ul>
<h3 id="alternative-1">Alternative 1</h3>
<p>An alternative that works here is to notice that you can reverse the series and call it $1 - 2 + 4 - … - 512 + 1024$.</p>
<p>Here $a=1$, $r=-2$ and $n=11$ again, and the sum is $\frac{1(1 + 2048)}{1+2}$, which gives you the result a bit more directly.</p>
<h3 id="alternative-2">Alternative 2</h3>
<p>In this example, it’s quite easy to pair off numbers.</p>
<p>$(1024 - 512) + (256 - 128) + (64-32) + (16-8)+ (4-2)+ 1 = (512 + 128 + \dots 2) + 1$. I’ve left the 1 out of the bracket at the end because it isn’t part of a pair, and therefore isn’t part of the series.</p>
<p>Now we have $a = 512$, $r=\frac{1}{4}$ and $n=5$, so the geometric part sums to $\frac{512\left(1 - \left(\frac{1}{4}\right)^5\right)}{1-\frac{1}{4}}$ (and we’ll need to add 1 at the end).</p>
<p>Multiply top and bottom by 4: $\frac{2048\left(1 - \frac{1}{1024}\right)}{3}$.That’s $\frac{2046}{3} = 682$, and when we add the 1 back on, we get the same 683 again.</p>
<p>Hope that helps!</p>
<p>- Uncle Colin</p>Dear Uncle Colin, As a challenge, I need to work out $1024 - 512 + 256 - \dots + 1$, but I’m getting mixed up on the fractions and signs. Can you help? Colin, Help! Answer Largely Lacking for Evaluating Negative Geometric ExpressionPowers of 2 and logs base 102023-08-28T01:00:00+01:002023-08-28T01:00:00+01:00https://www.flyingcoloursmaths.co.uk/powers-of-two-and-logs-base-10<p>A trick I learned from Colin Wright:</p>
<blockquote>
<p>Take the first nine powers of 2 and place them in lexical order; then put a decimal point after the first digit.</p>
</blockquote>
<p>OK, Colin, here you go:</p>
<ul>
<li>1.28</li>
<li>1.6</li>
<li>2.</li>
<li>2.56</li>
<li>3.2</li>
<li>4.</li>
<li>5.12</li>
<li>6.4</li>
<li>8.</li>
</ul>
<blockquote>
<p>These numbers are approximately $10^{0.1}$, $10^{0.2}$, etc., up to $10^{0.9}$.</p>
</blockquote>
<p>Huh! Isn’t that nice? Why does <em>that</em> work? You might want to have a think about it. I’ll spoiler it below the line.</p>
<hr />
<p>Well, it boils down to the handy numerical coincidence that $2^{10} \approx 10^3$.</p>
<p>That means that $2 \approx 10^{0.3}$, $4 \approx 10^{0.6}$ and $8 \approx 10^{0.9}$, before we get into anything complicated.</p>
<p>Then we know that $16 \approx 10^{1.2}$ – and if we divide both by 10, we get $1.6 \approx 10^{0.2}$. Continuing in this vein, we get $3.2 \approx 10^{0.5}$ and $6.4 \approx 10^{0.8}$.</p>
<p>Then we get $12.8 \approx 10^{1.1}$, so $1.28 \approx 10^{0.1}$, leading to $2.56 \approx 10^{0.4}$ and $5.12 \approx 10^{0.7}$ – and that’s the lot!</p>
<p>In fact, we can do something very similar with powers of 5 (I struggle to remember these, but they do have their uses).</p>
<ul>
<li>1.25</li>
<li>1.5625</li>
<li>1.953125</li>
<li>2.5</li>
<li>3.125</li>
<li>3.90625</li>
<li>5</li>
<li>6.25</li>
<li>7.8125</li>
</ul>
<p>These are <em>also</em> good estimates for $10^{0.1}$, etc., for very similar reasons – if $2^{10} \approx 10^3$, then $5^{10} \approx 10^7$.</p>
<p><a href="https://www.desmos.com/calculator/6gxf4qgpir">I mean, that’s a pretty solid fit.</a></p>
<p>In fact:</p>
<ul>
<li>the powers of 2 are slight overestimates and the powers of 5 are slight underestimates.</li>
<li>the smaller the (original) power involved, the better the estimate – 5 is a better guess for $10^{0.7}$ than 5.12 is, and 4 is a better approximation for $10^{0.6}$ than 3.90625.</li>
<li>you might well know that $10^{0.5} \approx 3.16$ – that’s roughly the arithmetic mean of 3.125 and 3.2 ((and it’s exactly the geometric mean.))</li>
</ul>
<p>So there you go! A nice little trick and the reason behind it.</p>A trick I learned from Colin Wright: