If you take any positive integer n and sum the squares of its digits, repeating this operation, eventually you’ll either end at 1 or cycle between the eight values 4,16,37,58,89,145,42 and 20.

This one I saw through John Allen Paulos’s twitter feed. He points out that it’s like the Collatz conjecture but is, in fact, proven. If you try this yourself don’t make the mistake of giving up too soon. You might figure, like start with 12. Sum the squares of its digits and you get 5, which is neither 1 nor anything in that 4-16-37-58-89-145-42-20 cycle. Not so! Square 5 and you get 25. Square those digits and add them and you get 29. Square those digits and add them and you get 40. And what comes next?

This is about a proof of Fermat’s Theorem of Sums of Two Squares. According to it, a prime number — let’s reach deep into the alphabet and call it p — can be written as the sum of two squares if and only if p is one more than a whole multiple of four. It’s a proof by using fixed point methods. This is a fun kind of proof, at least to my sense of fun. It’s an approach that’s got a clear physical interpretation. Imagine picking up a (thin) patch of bread dough, stretching it out some and maybe rotating it, and then dropping it back on the board. There’s at least one bit of dough that’s landed in the same spot it was before. Once you see this you will never be able to just roll out dough the same way. So here the proof involves setting up an operation on integers which has a fixed point, and that the fixed point makes the property true.

John D Cook, who runs a half-dozen or so mathematics-fact-of-the-day Twitter feeds, looks into calculating the volume of an egg. It involves calculus, as finding the volume of many interesting shapes does. I am surprised to learn the volume can be written out as a formula that depends on the shape of the egg. I would have bet that it couldn’t be expressed in “closed form”. This is a slightly flexible term. It’s meant to mean the thing can be written using only normal, familiar functions. However, we pretend that the inverse hyperbolic tangent is a “normal, familiar” function.

For example, there’s the surface area of an egg. This can be worked out too, again using calculus. It can’t be written even with the inverse hyperbolic cotangent, so good luck. You have to get into numerical integration if you want an answer humans can understand.

Comic Strip Master Command decreed that last week should be busy again. So I’m splitting its strips into two essays. It’s a week that feels like it had more anthropomorphic numerals jokes than usual, but see if I actually count these things.

Mike Peters’s Mother Goose and Grimm for the 15th I figured would be the anthropomorphic numerals joke for the week. Shows what I know. It is an easy joke, but I do appreciate the touch of craft involved in picking the numerals. The joke is just faintly dirty if the numbers don’t add to six. If they were a pair of 3’s, there’d be the unwanted connotations of a pair of twins talking about all this. A 6 and a 0 would make at least one character weirdly obsessed. So it has to be a 4 and a 2, or a 5 and a 1. I imagine Peters knew this instinctively, at this point in his career. It’s one of the things you learn in becoming an expert.

Mason Mastroianni, Mick Mastroianni, and Perri Hart’s B.C. for the 15th is mostly physical comedy, with a touch of — I’m not sure what to call this kind of joke. The one where a little arithmetic error results in bodily harm. In this sort of joke it’s almost always something not being carried that’s the error. I suppose that’s a matter of word economy. “Forgot to carry the (number)” is short, and everybody’s done it. And even if they don’t remember making this error, the phrasing clarifies to people that it’s a little arithmetic mistake. I think in practice mistaking a plus for a minus (or vice-versa) is the more common arithmetic error. But it’s harder to describe that clearly and concisely.

Jef Mallett’s Frazz for the 15th puzzled me. I hadn’t heard this thing the kid says about how if you can “spew ten random lines from a classic movie” to convince people you’ve seen it. (I don’t know the kid’s name; it happens.) I suppose that it would be convincing, though. I certainly know a couple lines from movies I haven’t seen, what with living in pop culture and all that. But ten would be taxing for all but the most over-saturated movies, like any of the Indiana Jones films. (There I’m helped by having played the 90s pinball machine a lot.) Anyway, knowing ten random mathematics things isn’t convincing, especially since you can generate new mathematical things at will just by changing a number. But I would probably be convinced that someone who could describe what’s interesting about ten fields of mathematics had a decent understanding of the subject. That requires remembering more stuff, but then, mathematics is a bigger subject than even a long movie is.

In Bill Holbrook’s On The Fastrack for the 16th Fi speaks of tallying the pluses and minuses of her life. Trying to make life into something that can be counted is an old decision-making technique. I think Benjamin Franklin explained how he found it so useful. It’s not a bad approach if a choice is hard. The challenging part is how to weight each consideration. Getting into fractions seems rather fussy to me, but some things are just like that. There is the connotation here that a fraction is a positive number smaller than 1. But the mathematically-trained (such as Fi) would be comfortable with fractions larger than 1. Or also smaller than zero. “Fraction” is no more bounded than “real number”. So, there’s the room for more sweetness here than might appear to the casual reader.

Scott Hilburn’s The Argyle Sweater for the 16th is the next anthropomorphic numerals joke for this week. I’m glad Hilburn want to be in my pages more. 5’s concern about figuring out x might be misplaced. We use variables for several purposes. One of them is as a name to give a number whose value we don’t know but wish to work out, and that’s how we first see them in high school algebra. But a variable might also be a number whose value we don’t particularly care about and will never try to work out. This could be because the variable is a parameter, with a value that’s fixed for a problem but not what we’re interested in. We don’t typically use ‘x’ for that, though; usually parameter are something earlier in the alphabet. That’s merely convention, but it is convention that dates back to René Descartes. Alternatively, we might use ‘x’ as a dummy variable. A dummy variable serves the same role that falsework on a building or a reference for an artistic sketch does. We use dummy variables to organize and carry out work, but we don’t care what its values are and we don’t even see the dummy variable in the final result. A dummy variable can be any name, but ‘x’ and ‘t’ are popular choices.

Terry LaBan and Patty LaBan’s Edge City rerun for the 16th plays on the idea that mathematics people talk in algebra. Funny enough, although, “the opposing defense is a variable of 6”? That’s an idiosyncratic use of “variable”. I’m going to suppose that Charles is just messing with Len’s head because, really, it’s fun doing a bit of that.

Comic Strip Master Command sent a bunch of strips my way this past week. They’ll get out to your way over this week. The first bunch are all on Gocomics.com, so I don’t feel quite fair including the strips themselves. This set also happens to be a bunch in which mathematics gets a passing mention, or is just used because they need some subject and mathematics is easy to draw into a joke. That’s all right.

Jef Mallet’s Frazz for the 4th uses blackboard arithmetic and the iconic minor error of arithmetic. It’s also strikingly well-composed; look at the art from a little farther away. Forgetting to carry the one is maybe a perfect minor error for this sort of thing. Everyone does it, experienced mathematicians included. It’s very gradable. When someone’s learning arithmetic making this mistake is considered evidence that someone doesn’t know how to add. When someone’s learned it, making the mistake isn’t considered evidence the person doesn’t know how to add. A lot of mistakes work that way, somehow.

Rick Stromoski’s Soup to Nutz for the 4th name-drops Fundamentals of Algebra as a devilish, ban-worthy book. Everyone feels that way. Mathematics majors get that way around two months in to their Introduction To Not That Kind Of Algebra course too. I doubt Stromoski has any particular algebra book in mind, but it doesn’t matter. The convention in mathematics books is to make titles that are ruthlessly descriptive, with not a touch of poetry to them. Among the mathematics books I have on my nearest shelf are Resnikoff and Wells’s Mathematics in Civilization; Koks’ Explorations in Mathematical Physics: The Concepts Behind An Elegant Language; Enderton’s A Mathematical Introduction To Logic; Courant, Robbins, and Stewart’s What Is Mathematics?; Murasagi’s Knot Theory And Its Applications; Nishimori’s Statistical Physics of Spin Glasses and Information Processing; Brush’s The Kind Of Motion We Call Heat, and so on. Only the Brush title has the slightest poetry to it, and it’s a history (of thermodynamics and statistical mechanics). The Courant/Robbins/Stewart has a title you could imagine on a bookstore shelf, but it’s also in part a popularization.

It’s the convention, and it’s all right in its domain. If you are deep in the library stacks and don’t know what a books is about, the spine will tell you what the subject is. You might not know what level or depth the book is in, but you’ll know what the book is. The down side is if you remember having liked a book but not who wrote it you’re lost. Methods of Functional Analysis? Techniques in Modern Functional Analysis? … You could probably make a bingo game out of mathematics titles.

Johnny Hart’s Back to B.C. for the 5th, a rerun from 1959, plays on the dawn of mathematics and the first thoughts of parallel lines. If parallel lines stir feelings in people they’re complicated feelings. One’s either awed at the resolute and reliable nature of the lines’ interaction, or is heartbroken that the things will never come together (or, I suppose, break apart). I can feel both sides of it.

Dave Blazek’s Loose Parts for the 5th features the arithmetic blackboard as inspiration for a prank. It’s the sort of thing harder to do with someone’s notes for an English essay. But, to spoil the fun, I have to say in my experience something fiddled with in the middle of a board wouldn’t even register. In much the way people will read over typos, their minds seeing what should be there instead of what is, a minor mathematical error will often not be seen. The mathematician will carry on with what she thought should be there. Especially if the error is a few lines back of the latest work. Not always, though, and when it doesn’t it’s a heck of a problem. (And here I am thinking of the week, the week, I once spent stymied by a problem because I was differentiating the function e^{x} wrong. The hilarious thing here is it is impossible to find something easier to differentiate than e^{x}. After you differentiate it correctly you get e^{x}. An advanced squirrel could do it right, and here I was in grad school doing it wrong.)

Nate Creekmore’s Maintaining for the 5th has mathematics appear as the sort of homework one does. And a word problem that uses coins for whatever work it does. Coins should be good bases for word problems. They’re familiar enough and people do think about them, and if all else fails someone could in principle get enough dimes and quarters and just work it out by hand.

Sam Hepburn’s Questionable Quotebook for the 5th uses a blackboard full of mathematics to signify a monkey’s extreme intelligence. There’s a little bit of calculus in there, an appearance of “” and a mention of the limit. These are things you get right up front of a calculus course. They’ll turn up in all sorts of problems you try to do.

Charles Schulz’s Peanuts for the 5th is not really about mathematics. Peppermint Patty just mentions it on the way to explaining the depths of her not-understanding stuff. But it’s always been one of my favorite declarations of not knowing what’s going on so I do want to share it. The strip originally ran the 8th of December, 1969.

That’s a relief. After the previous week’s suspicious silence Comic Strip Master Command sent a healthy number of mathematically-themed comics my way. They cover a pretty normal spread of topics. So this makes for a nice normal sort of roundup.

Mac King and Bill King’s Magic In A Minute for the 4th is an arithmetic-magic-trick. Like most arithmetic-magic it depends on some true but, to me, dull bit of mathematics. In this case, that 81,234,567 minus 12,345,678 is equal to something. As a kid this sort of trick never impressed me because, well, anyone can do subtraction. I didn’t appreciate that the fun of stage magic in presenting well the mundane.

Jerry Scott and Jim Borgman’s Zits for the 5th is an ordinary mathematics-is-hard joke. But it’s elevated by the artwork, which shows off the expressive and slightly surreal style that makes the comic so reliable and popular. The formulas look fair enough, the sorts of things someone might’ve been cramming before class. If they’re a bit jumbled up, well, Pierce hasn’t been well.

Mustard and Boloney popped back in on the 8th with a strip I don’t have in my archive at least. It’s your standard Pi Pun, though. If they’re smart they’ll rerun it in March. I like the coloring; it’s at least a pleasant panel to look at.

Percy Crosby’s Skippy from the 9th of July, 1929 was rerun the 6th of September. It seems like a simple kid-saying-silly-stuff strip: what is the difference between the phone numbers Clinton 2651 and Clinton 2741 when they add to the same number? (And if Central knows what the number is why do they waste Skippy’s time correcting him? And why, 87 years later, does the phone yell at me for not guessing correctly whether I need the area code for a local number and whether I need to dial 1 before that?) But then who cares what the digits in a telephone number add to? What could that tell us about anything?

As phone numbers historically developed, the sum can’t tell us anything at all. But if we had designed telephone numbers correctly we could have made it … not impossible to dial a wrong number, but at least made it harder. This insight comes to us from information theory, which, to be fair, we have because telephone companies spent decades trying to work out solutions to problems like people dialing numbers wrong or signals getting garbled in the transmission. We can allow for error detection by schemes as simple as passing along, besides the numbers, the sum of the numbers. This can allow for the detection of a single error: had Skippy called for number 2641 instead of 2741 the problem would be known. But it’s helpless against two errors, calling for 2541 instead of 2741. But we could detect a second error by calculating some second term based on the number we wanted, and sending that along too.

By adding some more information, other modified sums of the digits we want, we can even start correcting errors. We understand the logic of this intuitively. When we repeat a message twice after sending it, we are trusting that even if one copy of the message is garbled the recipient will take the version received twice as more likely what’s meant. We can design subtler schemes, ones that don’t require we repeat the number three times over. But that should convince you that we can do it.

The tradeoff is obvious. We have to say more digits of the number we want. It isn’t hard to reach the point we’re ending more error-detecting and error-correcting numbers than we are numbers we want. And what if we make a mistake in the error-correcting numbers? (If we used a smart enough scheme, we can work out the error was in the error-correcting number, and relax.) If it’s important that we get the message through, we shrug and accept this. If there’s no real harm done in getting the message wrong — if we can shrug off the problem of accidentally getting the wrong phone number — then we don’t worry about making a mistake.

And at this point we’re only a few days into the week. I have enough hundreds of words on the close of the week I’ll put off posting that a couple of days. It’s quite good having the comics back to normal.

I knew my readership would drop off after I fell back from daily posting. Apparently it was worse than I imagined and nobody read my little blog here over the weekend. That’s fair enough; I had to tend other things myself. Still, for the purpose of maximizing the number of page views around here, taking two whole days off in a row was a mistake. There’s some more discussed in this Reading The Comics installment.

Word problems are dull. At least at the primary-school level. There’s all these questions about trains going in different directions or ropes sweeping out areas or water filling troughs. So Aaron McGruder’s Boondocks rerun from the 5th of May (originally run the 22nd of February, 2001) is a cute change. It’s at least the start of a legitimate word problem, based on the ways the recording industry took advantage of artists in the dismal days of fifteen years ago. I’m sure that’s all been fixed by now. Fill in some numbers and the question might interest people.

Glenn McCoy and Gary McCoy’s The Duplex for the 5th of May is a misunderstanding-fractions joke. I’m amused by the idea of messing up quarter-pound burgers. But it also brings to mind a summer when I worked for the Great Adventure amusement park and got assigned one day as cashier at the Great American Hamburger Stand. Thing is, I didn’t know anything about the stand besides the data point that they probably sold hamburgers. So customers would order stuff I didn’t know, and I couldn’t find how to enter it on the register, and all told it was a horrible mess. If you were stuck in that impossibly slow-moving line, I am sorry, but it was management’s fault; I told them I didn’t know what I was even selling. Also I didn’t know the drink cup sizes so I just charged you for whatever you said and if I gave you the wrong size I hope it was more soda than you needed.

On a less personal note, I have heard the claim about why one-third-pound burgers failed in United States fast-food places. Several chains tried them out in the past decade and they didn’t last, allegedly because too many customers thought a third of a pound was less than a quarter pound and weren’t going to pay more for less beef. It’s … plausible enough, I suppose, because people have never been good with fractions. But I suspect the problem is more linguistic. A quarter-pounder has a nice rhythm to it. A half-pound burger is a nice strong order to say. A third-pound burger? The words don’t even sound right. You have to say “third-of-a-pound burger” to make it seem like English, and it’s a terribly weak phrase. The fast food places should’ve put their money into naming it something that suggested big-ness but not too-big-to-eat.

Mark Tatulli’s Heart of the City for the 5th is about Heart’s dread of mathematics. Her expressed fear, that making one little mistake means the entire answer is wrong, is true enough. But how how much is that “enough”? If you add together someting that should be (say) 18, and you make it out to be 20 instead, that is an error. But that’s a different sort of error from adding them together and getting 56 instead.

And errors propagate. At least they do in real problems, in which you are calculating something because you want to use it for something else. An arithmetic error on one step might grow, possibly quite large, with further steps. That’s trouble. This is known as an “unstable” numerical calculation, in much the way a tin of picric acid dropped from a great height onto a fire is an “unstable” chemical. The error might stay about as large as it started out being, though. And that’s less troublesome. A mistake might stay predictable. The calculation is “stable” In a few blessed cases an error might be minimized by further calculations. You have to arrange the calculations cleverly to make that possible, though. That’s an extremely stable calculation.

And this is important because we always make errors. At least in any real calculation we do. When we want to turn, say, a formula like πr^{2} into a number we have to make a mistake. π is not 3.14, nor is it 3.141592, nor is it 3.14159265358979311599796346854418516. Does the error we make by turning π into some numerical approximation matter? It depends what we’re calculating, and how. There’s no escaping error and it might be a comfort to Heart, or any student, to know that much of mathematics is about understanding and managing error.

Joe Martin’s Boffo for the 6th of May is in its way about the wonder of very large numbers. On some reasonable assumptions — that our experience is typical, that nothing is causing traits to be concentrated one way or another — we can realize that we probably will not see any extreme condition. In this case, it’s about the most handsome men in the universe probably not even being in our galaxy. If the universe is large enough and people common enough in it, that’s probably right. But we likely haven’t got the least handsome either. Lacking reason to suppose otherwise we can guess that we’re in the vast middle.

David L Hoyt and Jeff Knurek’s Jumble for the 6th of May mentions mathematicians and that’s enough, isn’t it? Without spoiling the puzzle for anyone, I will say that “inocci” certainly ought to be a word meaning something. So get on that, word-makers.

Dave Blazek’s Loose Parts for the 6th brings some good Venn Diagram humor back to my pages. Good. It’s been too long.

I mentioned graph theory several weeks back, when this Mathematics A To Z project was barely begun. It’s a fun field. It’s a great one for doodlers, and it’s one that has surprising links to other problems.

Graph theory divides the conceptual universe into “things that could be connected” and “ways they are connected”. The “things that could be connected” we call vertices. The “ways they are connected” are the edges. Vertices might have an obvious physical interpretation. They might, represent the corners of a cube or a pyramid or some other common shape. That, I imagine, is why these things were ever called vertices. A diagram of a graph can look a lot like a drawing of a solid object. It doesn’t have to, though. Many graphs will have vertices and edges connected in ways that no solid object could have. They will usually be ones that you could build in wireframe. Use gumdrops for the vertices and strands of wire or plastic or pencils for the edges.

Vertices might stand in for the houses that need to be connected to sources of water and electricity and Internet. They might be the way we represent devices connected on the Internet. They might represent all the area within a state’s boundaries. The Köningsburg bridge problem, held up as the ancestor of graph theory, has its vertices represent the islands and river banks one gets to by bridges. Vertices are, as I say, the things that might be connected.

“Things that might be connected” is a broader category than you might imagine. For example, an important practical use of mathematics is making error-detecting and error-correcting codes. This is how you might send a message that gets garbled — in sending, in transmitting, or in reception — and still understand what was meant. You can model error-detecting or correcting codes as a graph. In this case every possible message is a vertex. Edges connect together the messages that could plausibly be misinterpreted as one another. How many edges you draw — how much misunderstanding you allow for — depends on how many errors you want to be able to detect, or to correct.

When we draw this on paper or a chalkboard or the like we usually draw it as a + or an x or maybe a *. How much we draw depends on how afraid we are of losing sight of it as we keep working. In publication it’s often drawn as a simple dot. This is because printers are able to draw dots that don’t get muddied up by edges being drawn in or eraser marks removing edges.

The incident behind this was an accident, as his daughter spilled a bottle of black nail polish, and it splattered on the wall in an interesting spiral. Dr Wicklin wondered if it might be a logarithmic spiral and gathered data to work out whether it might plausibly be. There’s a nice description for how to go from the messiness of a real world splatter to a clearly defined mathematical problem, and how to try fitting a curve to the messy reality of data.

Curve-fitting real-world data is a challenging field. Curves are always members of families, groups of curves that look similar. For example, circles may have any point as their center and have any radius. Lines may pass through any point you like and be as horizontal or vertical or diagonal as you like. (Yes, a straight line isn’t much of a curve, but it’s too wordy to talk of “line or curve fitting” if you don’t have to. In this context, a line is a kind of curve in the same way a square is a kind of parallelogram.) There are many, many more kinds of curves, parabolas and hyperbolas and cubics and quartics and trigonometric functions and, oh yes, we can add them together, or multiply them, or even compose them (anyone up for the sine of a logarithm?).

So you start with the kind of curve you think your data really is, and try to find the set of parameters that make the curve and the data look like they’re representations of the same thing. The drawing of your curve and the drawing of your data points will never exactly overlap, though. Your data, coming from the real world, will be messy. Some of the nail polish spots will be in the ‘wrong’ place, or it’ll be ambiguous what the ‘real’ location of a point should be. (After all, what is the real location of a spot? Its center? How do you know where the exact center is? What if the spot is a smeared raindrop-shape rather than a circle?)

It’s not just an artistic eye that judges whether the parameters you’ve picked are a good fit. We can quantify how “good” a fit the curve is to the data, and to find the parameters that make the best possible, or the best findable, fit. But there is still an artistic eye involved: there are infinitely many imaginable curves. If you start from the wrong kind of curve, you might get a tolerable fit. But it won’t give insight into the reasons the data looks like this, or what it might look like as more data comes in. Happily, computers make it easy to try out many different kinds of curves, but having a sense of what curves are plausible makes for better work.

Mathematics is built out of arguments. These are normally logical arguments, sequences of things which we say are true. We know they’re true because either they start from something we assume to be true or because they follow from logical deduction from things we assumed were true. Even calculations are a string of arguments. We start out with an expression we’re interested in, and do things which change the way it looks but which we can prove don’t change whether it’s true.

A fallacy is an argument that isn’t deductively sound. By deductively sound we mean that the premises we start with are true, and the reasoning we follow obeys the rules of deductive logic (omitted for clarity). if we’ve done that, then the conclusion at the end of the reasoning is — and must be — true.

Back on “Pi Day” I shared a terrible way of calculating the digits of π. It’s neat in principle, yes. Drop a needle randomly on a uniformly lined surface. Keep track of how often the needle crosses over a line. From this you can work out the numerical value of π. But it’s a terrible method. To be sure that π is about 3.14, rather than 3.12 or 3.38, you can expect to need to do over three and a third million needle-drops. So I described this as a terrible way to calculate π.

A friend on Twitter asked if it was worse than adding up 4 * (1 – 1/3 + 1/5 – 1/7 + … ). It’s a good question. The answer is yes, it’s far worse than that. But I want to talk about working π out that way.

I’ve finally got around to reading one of my Christmas presents, Alfred S Posamentier and Ingmar Lehman’s Magnificent Mistakes in Mathematics, which is about ways that mathematical reasoning can be led astray. A lot, at least in the early pages, is about the ways a calculation can be fowled by a bit of carelessness, especially things like dividing by zero, which seems like such an obvious mistake that who could make it once they’ve passed Algebra II?

They got to a most neat little erroneous calculation, though, and I wanted to share it since the flaw is not immediately obvious although the absurdity of the conclusion drives you to look for it. We begin with a straightforward problem that I think of as Algebra I-grade, though I admit my memories of taking Algebra I are pretty vague these days, so maybe I missed the target grade level by a year or two.

Multiply that 4 on the right-hand side by 1 — in this case, by — and combine that into the numerator:

Expand that parentheses and simplify the numerator on the right-hand side:

Since the fractions are equal, and the numerators are equal, therefore their denominators must be equal. Thus, and therefore, 11 = 7.