Suppose there is a new vehicle launch upcoming. Initial data suggests that any given day there is either a malfunction with some part of the vehicle or possibility of a crash, with probability p which then requires a replacement. Additionally, each vehicle that has been around for n days must be replaced. What is the long-term frequency of vehicle replacements?

I’m going to interpret “long-term frequency” as the expected amount of time that a vehicle is in operation before it is replaced. With that interpretation, the probability that a vehicle will need to be replaced after *k* days, if , is , as the vehicle will need to work fine for the first days (with probability for each day) and then break or crash on day *k*, with probability *p*. The probability that a vehicle will need to be replaced after *n* days is , as this is the probability that the vehicle will work fine for days. (It doesn’t matter whether it breaks on day *n* or not; it will still be replaced after day *n*.) Letting , the expected amount of time that a vehicle is in operation is thus (using the definition of expected value) given by

Here, we in the first line we use the trick of rewriting as and then swapping the order of summation. In the second line we use the geometric sum formula, and in the third line we use the quotient rule for derivatives.

]]>Claim 1: For all *n*, .

“Proof”: Let denote that claim that . Suppose that is true for some *k*; that is, suppose . Now, is the claim that . If is true, then , which proves that the truth of implies the truth of . By the principle of mathematical induction, then, is true for all *n*; that is, for all *n*.

Claim 2: For all , all people in a group of size *n* share the same birthday.

“Proof”: Let denote the claim that all people in a group of size *n* have the same birthday. Clearly, is true, as all people in a group of size 1 have the same birthday. Now, suppose that is true; that is, all people in a group of size *k* have the same birthday. Suppose now that we have a group of people. Single out one of those people; perhaps his name is Al. Without Al, we have a group of *k* people, all of whom must, by our inductive hypothesis, share the same birthday. Now, swap Al with one of those other *k* people. Now Al is in a group of *k* people. Again, by hypothesis all of them must share the same birthday. So Al must have the same birthday as all the others in his group. Thus these people all share the same birthday, and so is true. By the principle of mathematical induction, then, every member of a group of size *n* must have the same birthday.

Clearly, both Claim 1 and Claim 2 are incorrect. The question, then, is this: Where are the errors in their “proofs”?

For the “proof” of Claim 1, the argument that implies is actually valid. The logic error lies in the failure to prove a base case. And in fact, is false for any base case you can think of, so any attempt to prove a base case will fail. And if there’s no valid base case, then the chain-like logic of induction doesn’t have an initial link to start with. Thus the “proof” is invalid. The moral of the story here is that, while proving the base case may seem perfunctory, it’s actually crucial to the logic of induction.

For the “proof” of Claim 2, the error is more subtle. The argument for the base case is valid. The argument for implies is also valid—except for one, single, solitary value of *k*. When , and we remove Al from the group of two people, we then have Al and a group of size 1. Swapping Al with that one other person does put Al in a group of size 1, and he does share the same birthday as everyone else in the group (namely, just himself), but he doesn’t necessarily share the same birthday with that one other person. So does not imply , even though does imply for all larger values of *k*. Thus while the first link in a chain-like induction argument holds, the attempt to attach a second link to the first one fails. So we can’t attach any more links, and so the “proof” is invalid. The moral of the story here is that, for an induction argument to work, implies has to be true for *all* values of *k* (well, values at least as large as the value for *k* used in the base case). If it fails for even one value of *k*, then the induction chain breaks at that point, and the statement may not be true for any values larger than *k*.

Recently, however, I received an email from Michael Maltenfort at Northwestern University, pointing out a couple of errors in the paper. I’m recording those errors here.

The most serious mistake Maltenfort pointed out to me is the paper’s claim that *m* is a nonnegative integer. The formulas actually require *m* to be a positive integer. For example, in the paper I state the following.

**Theorem** **1** (Original). The power sum is the number of functions such that, for all , .

However, when this doesn’t work. The power sum as I stated it entails adding up *n* copies of 1 and so evaluates to *n*. On the other hand, the set is the set . This means that all functions from to vacuously satisfy the condition in the theorem. The theorem as stated in the paper is off by 1, then, for the case .

Maltenfort suggests changing the lower index on the sum to start at , so that we have the following.

**Theorem** **1** (Updated). The power sum is the number of functions such that, for all , .

As long as we are fine with the convention that (and I am a fan of this convention in a combinatorial setting), this allows the formula to hold in the case as well.

Maltenfort also points out that the two formulas for the power sum need to be updated in order for them to hold for the case. My paper has

**Theorem 2** (Original): , and

**Theorem 3** (Original): .

These should be updated to

**Theorem 2** (Updated): , and

**Theorem 3** (Updated): .

The other mistake in the paper is in the definition of the induced permutation . The definition for in the paper has the requirement

That should instead be

Thanks to Professor Maltenfort for these corrections!

**References**

Spivey, Michael Z. “A Combinatorial View of Sums of Powers,” *Mathematics Magazine*, 90 (2): 125-131, 2021.

The *power sum* is given by . (Sometimes *M* is given as the upper bound, but for this post it’s more convenient to use .)

Recently I learned of a really nice relationship between the zeta function and the power sum for . It’s due to Mináč [1], and I reproduce his proof here.

**Theorem:** For positive integers *a*, .

Now, of course *M* in is a positive integer, so what do we mean by integrating from 0 to 1? Well, it’s also known that is a polynomial of degree in *M*. For example,

So what we mean when we’re integrating from 0 to 1 is that we’re integrating the polynomial representation of from 0 to 1.

**Proof.** First, we need a few known facts about the Bernoulli numbers and Bernoulli polynomials:

- The known representation of the power sum in terms of Bernoulli polynomials: .
- The derivative of a Bernoulli polynomial: .
- Some specific values of Bernoulli polynomials: .
- All the odd Bernoulli numbers (except ) are 0.
- A relationship between the zeta function and Bernoulli numbers: .

Now, using these facts, we have

For example, Theorem 1 gives us that

**References **

[1] Ján Mináč, “A remark on the values of the Riemann zeta function,” *Expositiones Mathematicae*, 12: 459-462, 1994.

Suppose we have a primal problem as follows.

Now, suppose we want to use the primal’s constraints as a way to find an upper bound on the optimal value of the primal. If we multiply the first constraint by 9, the second constraint by 1, and add them together, we get for the left-hand side and for the right-hand side. Since the first constraint is an equality and the second is an inequality, this implies

But since , it’s also true that , and so

Therefore, 18 is an upper-bound on the optimal value of the primal problem.

Surely we can do better than that, though. Instead of just guessing 9 and 1 as the multipliers, let’s let them be variables. Thus we’re looking for multipliers and to force

Now, in order for this pair of inequalities to hold, what has to be true about and ? Let’s take the two inequalities one at a time.

**The first inequality**:

We have to track the coefficients of the and variables separately. First, we need the total coefficient on the right-hand side to be at least 5. Getting exactly 5 would be great, but since , anything larger than 5 would also satisfy the inequality for . Mathematically speaking, this means that we need .

On the other hand, to ensure the inequality for the variable we need the total coefficient on the right-hand side to be exactly . Since could be positive, we can’t go lower than , and since could be negative, we can’t go higher than (as the negative value for would flip the direction of the inequality). So for the first inequality to work for the variable, we’ve got to have .

**The second inequality**:

Here we have to track the and variables separately. The variable comes from the first constraint, which is an equality constraint. It doesn’t matter if is positive or negative, the equality constraint still holds. Thus is unrestricted in sign. However, the variable comes from the second constraint, which is a less-than-or-equal to constraint. If we were to multiply the second constraint by a negative number that would flip its direction and change it to a greater-than-or-equal constraint. To keep with our goal of upper-bounding the primal objective, we can’t let that happen. So the variable can’t be negative. Thus we must have .

Finally, we want to make the right-hand side of the second inequality as small as possible, as we want the tightest upper-bound possible on the primal objective. So we want to minimize .

Putting all of these restrictions on and together we find that the problem of using the primal’s constraints to find the best upper bound on the optimal primal objective entails solving the following linear program:

And that’s the dual.

It’s probably worth summarizing the implications of this argument for all possible forms of the primal and dual. The following table is taken from p. 214 of *Introduction to Operations Research*, 8th edition, by Hillier and Lieberman. They refer to this as the SOB method, where SOB stands for Sensible, Odd, or Bizarre, depending on how likely one would find that particular constraint or variable restriction in a maximization or minimization problem.

```
Primal Problem Dual Problem
(or Dual Problem) (or Primal Problem)
Maximization Minimization
Sensible <= constraint paired with nonnegative variable
Odd = constraint paired with unconstrained variable
Bizarre >= constraint paired with nonpositive variable
Sensible nonnegative variable paired with >= constraint
Odd unconstrained variable paired with = constraint
Bizarre nonpositive variable paired with <= constraint
```

.

In other words, the square of the sum of the first *n* positive integers equals the sum of the cubes of the first *n* positive integers.

It’s probably less well-known that a similar relationship holds for , the function that counts the number of divisors of an integer:

.

In this post we’re going to prove this formula for .

First, it’s pretty easy to see what the value of is for prime powers; i.e., integers of the form , where *p* is prime. Since the only divisors of are , the number of divisors of is given by .

Let’s check the identity we’re trying to prove when . We have

We also have

Clearly, the two expressions are equal, so the identity we’re trying to prove holds in the prime-power case. (And, in fact, the derivation uses the identity about the sum of the first several positive integers mentioned at the beginning of the post!)

Let and . What we’ve shown thus far is that .

Now, we’re going to pull some elementary number theory. One fact about is that it is multiplicative; i.e., when *m* and *n* are relatively prime. This is one of the first properties you learn about once you learn its definition, and we’re not going to prove it here.

It turns out that both *f* and *F* are multiplicative as well! First, the product of two multiplicative functions is also multiplicative. (This is a one-line proof using the definition of multiplicative.) So is multiplicative.

Another property of multiplicative functions is that if *g* is multiplicative, then is also multiplicative. This is a special case of the more general result that the Dirichlet convolution of two multiplicative functions is multiplicative. (In the Dirichlet convolution , take *h* to be the identity function; i.e., .) This means that our functions *f* and *F* defined in the previous paragraph are both multiplicative.

Therefore, with the prime-power factorization of *n* given by , we have

For an even further generalization, see Barbeau and Seraj [1]. (The proof we give in this post follows the same basic argument as the proof of Proposition 1 in Barbeau and Seraj’s paper.)

- Barbeau, Edward, and Samer Seraj, “Sum of cubes is square of sum,”
*Notes on Number Theory and Discrete Mathematics***19**(1), 2013, pages 1–13.

]]>

I only have one small thing to add. A few years ago I wrote an interactive text-based game, *A Beauty Cold and Austere*. You can read some reviews of it and play it here, and you can read some of my thoughts about it here. The connection to Mandelbrot is that I used part of the Mandelbrot set for the cover art for the game, as you can see below.

]]>

**Theorem**: There are no integer solutions to the equation .

**Proof**.

**Case 1**. First, suppose that there is a solution in which *x* is even. Since , . Looking at the equation modulo 8, then, we have

.

However, if we square the residues and reduce them modulo 8 we have . So there is no integer *y* that when squared is congruent to 7 modulo 8. Therefore, there is no solution to when *x *is even.

**Case 2**. Now, suppose there is a solution in which *x* is odd. If so, then we have or .

If then we have . However, if we square the residues and reduce them modulo 4 we get . So there is no integer *y* that when squared is congruent to 2 modulo 4. Thus there is no solution to when .

Now, suppose . Applying some algebra to the original equation, we have

.

By assumption, . If has prime factors that are all equivalent to 1 modulo 4, then their product (i.e., ) would be equivalent to 1 modulo 4. Thus has at least one prime factor *q* that is congruent to 3 modulo 4.

However, if , then . This means that . However, thanks to Euler’s criterion, only odd primes *q* such that can have a solution to . Since , has no solution. Thus there is no solution to when , either.

Since we’ve covered all cases, there can be no solution in integers to the Mordell equation .

]]>**Math**

**Khan Academy**. This one should be obvious to anyone who knows anything about learning math online. The videos on this site are quite good – among the best online math videos I’ve seen. The site also features regular self-assessments ranging from quick quizzes to end-of-course tests so that you can gauge your learning. From what I can tell, Khan Academy is the gold standard for online learning, and I have no problems recommending it to my children (ages 9, 9, and 12) or to my college students. (While Khan Academy got their start with math, they’ve branched out to many other subjects as well.)**Numberphile**. This is a YouTube channel sponsored by the Mathematical Sciences Research Institute. It features a wide variety of mathematical topics generally aimed at those who know something about math and are curious to learn more. I’ve only watched two Numberphile videos – both on Möbius strips – but they were both quite good, and I even learned something from them! (I also showed them to my children.) I wouldn’t normally recommend a YouTube channel based on just two videos, but their quality plus the fact that my college students have often spoken highly of Numberphile is sufficient to make me comfortable recommending this channel.**Prodigy**. This is an online role-playing game in which players have to solve math problems in order to defeat monsters in battle. While I have some pedagogical criticisms of Prodigy, the game has good production values for its target audience (mostly elementary school children), it successfully ramps up the difficulty level as players demonstrate greater math knowledge, and all three of my kids have had fun with it.

**Geography**

**Geography Now**. Paul Barbato deserves an award for this YouTube channel, in which he covers all the countries in the world in alphabetical order. He’s funny and informative, giving an overview of the physical geography, the people, the culture, and the political relations of each country he discusses. The production values are much better than any of the other general-interest geography channels I’ve seen, too. He’s only up to the Seychelles at this point, so if you’re interested in countries like Spain or the UK you’ll have to wait a bit, but this has been the go-to site for geography homeschooling with my kids the past several months. (“Hast du gluten-free?” “Nein!” still brings a chuckle in my household.)**Touropia**. This is the best YouTube travel channel I’ve found. I generally pair a country’s Touropia “Top Ten Places to Visit” video with the country’s corresponding Geography Now video for two different perspectives on the same country.

**Science**

**National Geographic**. As you can imagine, this venerable institution has some high-quality videos out there. I’m recommending them under “science” because we’ve only watched their science videos.**Mystery****Science**. This is a series of hands-on video lessons for K-5. My children’s teachers used them in the classroom pre-COVID, and I’ve used several as well for homeschooling. The science is solid and at the appropriate level, and the hands-on activities help engage the children. When I was using them more regularly back in the spring, some of the video lessons were available for free and others you had to purchase. As of right now they are offering a limited number of free memberships that presumably allow you to access all the videos.

**History**

**Crash Course in World History**. This YouTube series features an irreverent overview of world history that should appeal to people of all ages. I haven’t watched any of their videos all the way through, but I’ve seen segments, my wife has used them when she’s homeschooling, and my kids have enjoyed them. This link is just to the first video in the world history series, and they have other series as well (including U.S. history). “Except for the Mongols!” has become a catchphrase in my house.

**Philosophy**

**Philosophy of the Humanities**. These YouTube videos simply feature Leiden University professor Victor Gijsbers giving a series of lectures on the philosophy of science, history, knowledge, and the humanities in general. There’s nothing fancy here, video-wise, but Victor is an amazingly clear lecturer, elucidating intricate philosophical concepts with clarity and easy-to-understand examples. This is the only recommendation in this post that I haven’t used with my kids; this is advanced high school level material at the very least. Favorite quote: “Hegel is evidently a comic historian. Which, by the way, doesn’t mean we will laugh a lot when we read Hegel. Because, believe me, we don’t.” (I actually know Victor in another context: He and I have both written interactive fiction!)

**English**

**Schoolhouse Rock**. If you were an American child in the late 70s or early 80s you will know exactly what this video series is, as it was ubiquitous during prime Saturday-morning cartoon-watching. My kids and I viewed their videos on the eight parts of speech, but they have some history videos and even a solid video on how a bill becomes law as well. Enjoy the 70s-style animation and music, and expect to emerge with a few extra earwigs. (“Conjunction junction, what’s your function?” and half of the interjections video continue to be repeated in my house.) The link is to the YouTube channel, which doesn’t have all the videos. However, they are easy to find online.

**French**

**Get Started with French Like a Boss!.**I am not anywhere near fluent in French, but I did study it in high school and college, and I decided homeschooling would be a great opportunity to introduce my kids to a foreign language. Lya, the host of this video that introduces basic French words and phrases, is funny and a little goofy in an endearing way. She’s really good about using the vocabulary in different contexts, too, to the point that my 12-year-old was able to start picking up basic French sentence structure just from Lya’s examples. This video is part of a larger series, but it’s the only one from that series I’ve seen.**Rock ‘N Learn**. This brightly-animated series aimed at young children pairs French vocabulary with corresponding English vocabulary. My kids are older than the target audience for the series, but the vocabulary is right at their level, and they’re old enough that they can laugh about how goofy it is. Rock ‘N Learn actually covers a wide variety of subjects, but we’ve only watched it for French. (Also, they appear to have a series of French language videos for teens and adults, but I haven’t watched those yet.)

One of these enjoyable aspects has been introducing my children to some mathematical concepts that are more advanced than they would normally get in third or sixth grade. My sixth grader in particular is ready for some basic number theory, such as the representation of numbers in bases other than 10.

Here’s a problem I posed for him a few weeks ago, after making sure he understood the conversion concept.

**Take the number 4217 _{8} and convert it to base 2.**

Dutifully, he began converting 4217_{8} to base 10. It took him a minute or two, but he got the correct answer of 2191_{10}. Then he started working on the conversion from base 10 to base 2. I told him to tell me when he finished the calculation but not tell me what the answer is. After another couple of minutes, he did so. I then quickly wrote down the answer of 100010001111_{2} off the top of my head. His eyes bugged and his jaw dropped – a response that is always gratifying to see from a middle-schooler.

I didn’t keep him in suspense long, though. Since 8 is a power of 2, there’s a fast way to convert between those two bases. In particular, 2^{3} = 8, so you can convert the digits in the base-8 representation of a number in groups of three. For the example of 4217_{8}, we have 4_{8} = 100_{2}, 2_{8} = 010_{2}, 1_{8} = 001_{2}, and 7_{8} = 111_{2}. (All of these base-2 representations I had in my head.) String those four together to get

**4217 _{8} = 100010001111_{2}**.

This process goes in the other direction, too. And let’s convert from binary to base 16, just to work with a different number than 8. Thus, for example,

**110101000111 _{2} = D47_{16}**,

as 0111_{2} = 7_{16}, 0100_{2} = 4_{16}, and 1101_{2} = D_{16}. (Note that we have to do the conversion starting with the least significant digit; i.e., from right to left.)

This process works when converting between any two bases where one base is a positive integer power of the other.

]]>