Last time we looked at a classic problem for which there is a nice formula, namely counting all divisors of a given number. This time, we will examine a question from last August where we have to count the number of divisors *of a specific type*, making it more challenging. This also demonstrates what it can take to help someone without being sure what methods he will be able to understand (and without being an expert in this area myself). I find it helpful sometimes not to be an expert, because that lets me feel my way through a problem just as a student has to …

Here is the question:

Q) Total number of divisors of N = (3^5).(5^7).(7^9) that are of form 4n+2, n≥0 , is equal to …

I gave a quick initial answer, knowing there must be more:

Hi, Arsh.

At first I thought this might be beyond my limited knowledge of number theory — I know how to find the total number of divisors; but only those of a certain form??

But then I looked again, and (unless I’m missing something) it seems so easy I’d almost call it a trick question.

If a number has the form 4n+2, what divisor do we know it has?

What kind of numbers can divide N?

What I saw here was that \(N = 3^5 5^7 7^9 = 766,088,007,890,625\) can’t have any divisors of the form \(4n+2\), because it is not even. So the answer is 0. But Arsh replied,

Sorry, by mistake I have written 4n+2 instead of 4n+1.

I see that for 4n+2 = 2(2n+1) we need one power of 2 and it is an odd no. so total should have been 0 as no power of 2 is present.

He saw my point! I replied,

Ah! Now it’s a much more interesting problem.

He continued,

I have checked powers of 3 and got 4n+1 is divisible by even powers of 3 – 3^0, 3², 3⁴.

Similarly I got that 4n+1 is divisible by all powers of 5.

And divisible by even powers of 7.

Total no. of ways = 3*8*5 = 120. But then I see at n = 5, we get 21 which is divisible by 3¹ and 7¹ which we have not counted.

This is where I have reached, please explain further.

This doesn’t quite make sense as written, though I could unravel it.

I offered a correction to his statements about \(4n+1\), where he surely can’t have meant to say that for any \(n\), \(4n+1\) is divisible by 5, 25, 125, …, for example.

I don’t think you mean what you said; it’s very easy to misstate facts about divisibility. I think you’re saying this:

I have checked powers of 3, and found that even powers of 3 (3

^{0}, 3², 3⁴)are all of the form4n+1.Similarly I got that all powers of 5

are of the form4n+1.And even powers of 7

are of the form4n+1.Am I right?

To make sure that this is what he had determined, I had to make sure that the statements are correct:

Now,

is this true?Starting with the last, 7^2 = 49 = 48 + 1 = 4*12 + 1, so itmaybe true; you didn’t say how you proved it, but one elementary way is to see that we want to show that 7^(2n) – 1 = 4k for any n, and in fact 7^(2n) – 1 = (7^n + 1)(7^n -1); both factors are even, so the conclusion is true. You may have a very different way to prove these facts; I’d like to know what it is, if only so I can see what your level of knowledge is.How much modular arithmetic do you know?

What I did here was to prove that, as he presumably meant to say, any even power of 7 (that is, any power of 49) has the form 4n+1 (for some integer n), by showing that \(49^n-1\) is a multiple of 4.

If I had thought that Arsh was familiar with modular arithmetic (and it turns out he is not), I could have shown this much more simply: since \(49 = 4\times12+1\), we know that \(49\equiv 1 (mod 4)\), and consequently \(49^n\equiv 1^n\equiv 1 (mod 4)\).

Or, I could do the same thing in terms of factoring: \(49^n = (48+1)^n = 48^n + … + 1 = 4k + 1\) because the binomial expansion of the power consists of terms that are multiples of 4, plus one final term that is 1.

The same can be done with each of the other claims. Since 9 and 5 are each 1 more than a multiple of 4, any power of either is also 1 more than a multiple of 4.

I continued, commenting on his conclusion:

You said,

Total no. of ways = 3*8*5 = 120. But then I see at n = 5, we get 21 which is divisible by 3¹ and 7¹ which we have not counted.

You’re right that counting pure powers of the right form will miss all the mixed products; I’m not sure whether this approach will be helpful.

The method I see that works starts with modular arithmetic. If you are sufficiently familiar with it, you might try thinking about factors of (3^5)(5^7)(7^9) mod 4. Start by thinking about 3, 5, and 7 mod 4.

He had been thinking that he had to consider only three powers of 3 (\(3^0, 3^2, 3^4\)), eight powers of 5 (\(5^0, 5^1, 5^2, 5^3, 5^4, 5^5, 5^6, 5^7\)), and five powers of 7 (\(7^0, 7^2, 7^4\)), for a total of \(3\times 8\times 5 = 210\) possible factors (using the same technique we looked at last time, multiplying the number of choices for each exponent). But then he realized that divisors of our *N* other than prime powers can have the form 4*n* + 1.

Arsh replied:

No I don’t know much of modular arithmetic. Although I know that any number mod 4 would mean finding the remainder.

I get (3^5)(5^7)(7^9) = (4k+1)(4k+3)² [ 3^5 mod 4 = 3 , 5^7 mod 4 = 1 , 7^9 mod 4 = 3] (by cyclicity or binomial)

Now, how can I reach the answer from here?

I’d be able to mention modular arithmetic, but not depend on it heavily. Arsh has mentioned two possible tools to use in its place; at this point I can’t be sure exactly what he means by using cyclicity (presumably observing some cyclical behavior) and binomial (the binomial formula), but they suggest he is doing some reasonable thinking. What he is saying, as I read it, is that \(3^5 = 4k+3\), \(5^7 = 4k+1\), and \(7^9 = 4k+1\), each for some integer value of *k*, which is equivalent to saying \(3^5 \equiv 3 (mod 4)\), \(5^7 \equiv 1 (mod 4)\), and \(7^9 \equiv 1 (mod 4)\), respectively. Probably “cyclicity” means that he observed, for example, that \(3^1 = 3 = 4\times0 + 3\), \(3^2 = 9 = 4\times2 + 1\), and subsequent powers will repeat this pattern: \(3^3 = 27 = 4\times8 + 3\), \(3^4 = 81 = 4\times20 + 1\), \(3^5 = 243 = 4\times60 + 3\), … . Once a power leaves a remainder of 1, remainders repeat. Something similar can be done using a binomial expansion as I did before for 49, but I’m not sure exactly what his approach is. What I know is that he is doing some good thinking, but needs a little more guidance. So I answered,

Hi, Arsh.

What you say,

I get (3^5)(5^7)(7^9) = (4k+1)(4k+3)² [ 3^5 mod 4 = 3 , 5^7 mod 4 = 1 , 7^9 mod 4 = 3] (by cyclicity or binomial)

is not valid, but it shows you have an important part of the idea. Primarily, you can’t use the same k for different numbers. Secondarily, this specific statement, even after correction to (3^5)(5^7)(7^9) = (4i+3)(4j+1)(4k+3), is probably not quite on the path to an answer. But something very close to it is.

The use of the same constant *k* in three places, where they will actually be three different integers, is a common mistake in doing this kind of work; in one sense it is a minor error that could be overlooked if he knows what he means, but it can lead to major trouble if what was written is used as written.

In terms of modular arithmetic, what Arsh has done is definitely on the right path; he has shown that \(3^5 5^7 7^9 \equiv 1\cdot3^2 = 9 \equiv 1 (mod 4)\), which could work nicely. But using the tools he has, he will probably miss the mark.

I continued,

I’d like to see exactly what you mean by “cyclicity or binomial”; both of those are appropriate, and seeing how you perceive them might help me express things appropriately for your background. You may know enough of modular arithmetic to use it here; but binomials may be easier for you.

But let’s try this approach: First, note that 3 ≡ -1 (mod 4), 5 ≡ 1 (mod 4), and 7 ≡ -1 (mod 4), Note that I have used -1 in place of your 3, which will make what follows easier. If you don’t understand my notation or my use of -1 (which is not what we typically think of as a remainder), then we’ll have to use the binomial approach.

I expressed this in terms of modular arithmetic, since Arsh had shown some familiarity with the notation. The idea is that whereas we normally think of a remainder as positive, we don’t have to use that as our “final” form all the time; we can choose whatever representation will be easiest to work with. Here, I chose to write 3 as \(1\cdot 4 – 1\) rather than as \(0\cdot 4 + 3\), because it is easier to work with -1 than with 3.

In closing, I expressed the same idea in those terms, and gave references that explain the notations and concepts of modular arithmetic. [Note to self: let’s have a post about that soon …]

Now, rather than focusing on 3^5, 5^7, and 7^9, think about any powers, i.e. 3^m, 5^n, and 7^p. What can you say about each of these, mod 4?

In terms of binomials, I would say that 3^m = 4i – 1, 5^n = 4j + 1, and 7^p = 4k – 1. What, then, can you say about their product?

For some information on modular arithmetic, see

Three days later, Arsh got back to me:

Sorry for the late reply. I know what you mean by negative remainders, but I still can’t reach to the answer. By observing the product as you told me, I get that putting various values of i, j and k give me all the combinations of numbers but how to proceed further.. ..

We don’t have the further information I’d hoped for (about methods being used or specific attempts made), so I just answered with a more specific hint:

We’re trying to count

numbers of the form 3^m 5^n 7^p, where 0 ≤ m ≤ 5, 0 ≤ n ≤ 7, 0 ≤ p ≤ 9, that are congruent to 1 (mod 4).I’ve pointed out that 3 ≡ -1 (mod 4), 5 ≡ 1 (mod 4), and 7 ≡ -1 (mod 4). So you can think of it as looking for

numbers of the form (-1)^m (1)^n (-1)^p, where 0 ≤ m ≤ 5, 0 ≤ n ≤ 7, 0 ≤ p ≤ 9, that are equal to 1. What is required of the exponents for this to be true?

The first paragraph explicitly states what has been in the background all along, but never explicitly stated, and which we used last week for the general case of counting divisors: We will be counting all combinations of the three exponents, within their ranges, that will yield a result congruent to 1 (that is, leaving remainder 1). It is often helpful to explicitly state the goal so we can relate it to what we are doing.

The second paragraph restates that goal in terms of modular arithmetic (hoping that Arsh understands enough to apply this idea to whatever method he ends up using).

Within half an hour, Arsh got back to me:

I think I have found an answer.

Case 1: Even values of m, p and all values of n. 3*8*5=120

Case 2: When m and p both are odd and all values of n. 3*8*5=120

So total values 240.

I think I have understood how to do it by binomial theorem also.

Numbers are of form – (4i-1)^m (4j+1)^n (4k-1)^p

(4i-1)^m = 4h-1 where h is any integer. (All terms except -nCn are divisible by 4)

Similarly we get for rest 2 factors – and following the steps as you told

Good! What Arsh has seen is that the exponents on 3 and 7 can both be even, or both be odd; this is because in order to get 1 from powers of -1, we need either two positive numbers or two negative numbers. The exponent on 5 can be anything. In each case, this gives us 3 choices for *m* (1, 3, 5, or 0, 2, 4) and 5 choices for *p* (1, 3, 5, 7, 9, or 0, 2, 4, 6, 8), and 8 choices for *n* (0, 1, 2, 3, 4, 5, 6, 7). That gives a total of 120 possible divisors in each case, and 240 in all.

Then he expressed the same in terms of binomials, where only the last term matters. This could have been done with the 3’s instead of the -1’s, but would have needed an extra step or two, and would have been harder to see.

I congratulated him:

You got it!

And, yes, binomials are just a slightly bulkier way to say the same thing. Modular arithmetic just makes what has to be done more visible.

Also, this trick of seeing the remainder as -1 rather than n-1 (mod n), because -1 has nicer properties, is useful in a number of other familiar problems. That’s why I saw it easily, having seen it before.

It was another nice problem, and led to a good discussion. I always like it when I can trust a student to be able to take hints and run farther with them, rather than need to be led along by the hand; and I think using modular concepts to state the hint helped to stretch his understanding.

]]>We’ll start with a question from 1995, in which Kelly presented us with an investigation assignment she was given:

Divisor Counting Problem of the Week: Divisor Counting You may already know that a prime number is a whole number which has exactly two whole number divisors, 1 and itself. For example, 7 is a prime, since it has exactly two whole number divisors, namely 1 and 7. On the other hand, 10 is not a prime, since it has four whole number divisors, namely, 1, 2, 5, and 10.The goal is for you to figure out more about how many divisors a number has.The concept of prime number may be useful in stating your conclusions. Here are some questions to look at: 1) What kinds of numbers have exactly 3 divisors? exactly 4? etc. 2) Do bigger numbers necessarily have more divisors? 3) Is there a way to figure out how many divisors 1,000,000 (one million) has without actually listing and counting them? How about 1,000,000,000 (one billion)? 4) What's the smallest number that has 20 divisors? These are examples of questions to ask yourself. But you should not stop at answering these questions or ones like them. You should come up with your own questions and find rules for different kinds of numbers. P.S. I've read some of the things on your page. But, I feel that this problem is different since it is talking about divisors, not just primes. I'm only a 14 year old sophomore, so I don't really understand some of those formulas like log, so please explain any formula you give. I also want to know how you could determine if a number is a prime.

This is very open-ended; Kelly appears to have approached it not by experimenting for herself as intended, but by searching for ready-made answers. Doctor Ken chose to guide her investigation rather than show the formula:

I remember when someone showed mehow to count all the divisors of a number without having to list them all and count them up. I thought it was so darn cool. I still do. I think I was shown it when I was a sophomore in high school too, so you'll be able to understand just fine if I describe it correctly. Let'sthink about how a number gets to be a divisor of another number. If a divides b, then all the prime factors of a are also factors of b, right? For example, 6 divides 24, because 6 = 2 * 3, and 24 = 2^3 * 3, so all the divisors of 6 are present in the divisors of 24. In another example, 14 doesn't divide 50 because 14 = 2 * 7, and 50 = 2 * 5^2, and there's no 7 in 50.

If all the *prime* factors of *a* are factors of *b*, then *every* divisor of *a* is a divisor of *b*. On the other hand, if any prime factors of *a* are *not* factors of *b*, then *a* can’t be a divisor of *b*.

So we want to figure out all the different numbers we can make out of the factors of the given number. For example, let's find all the divisors of 60: 60 = 2^2 * 3 * 5. So let's make a list of the divisors: 1 1 * 3 1 * 5 1 * 3 * 5 2 2 * 3 2 * 5 2 * 3 * 5 2^2 2^2 * 3 2^2 * 5 2^2 * 3 * 5 That's 12 factors. Let's try another one, 2^3 * 7^2 = 392 1 1 * 7 1 * 7^2 2 2 * 7 2 * 7^2 2^2 2^2 * 7 2^2 * 7^2 2^3 2^3 * 7 2^3 * 7^2 So that's 12 factors again. Looks like all numbers have 12 factors. Just kidding.

Every combination of prime factors of a number gives us a divisor of that number. Can you see the pattern Doctor Ken used to list them?

Anyway, I haven't given you the final answer;there is a formulathat you can use to find out the number of divisors of a number, but I thought I'd let youtry to figure it out first for yourself. If you don't get it, you can always write back to us and we'll help you out again.

Kelly wrote back without showing any work of her own, just asking for the formula and the answer to one of the questions:

So,what's the formulafor finding how many divisors a number has? And how could I find the answer to this question: "What's the smallest numberthat has 20 divisors?"

Doctor Andrew replied this time, again offering ideas to think about rather than an actual formula, but leading very close:

Dr. Ken showed you thatany number is divisible by the product of any of its prime factors. Remember that you can't use a prime factor more than the number of times it appears in the factorization of the number. (i.e. 4 = 2 * 2. But 8 = 2 * 2 * 2 is not a divisor of 4). So if a number n looks like this: n = a^p * b^q * c^r * d^s * e^t * f^u ... , where a, b, c and so on are its prime factors, how many different products can you make out of a, b, c, ...?

That is, given the prime factorization of any number, we want to count the ways to put those primes together to make divisors.

Well,building a divisor is kind of like making stew. You grab ingredients from the shelf and put them in the pot, butyou have to decide how much of each ingredient you want, and there is a limit on how much you can use. You can use anywhere from 0 to p a's, 0 to q b's, 0 to r c's and so on. How many different ways can you build a divisor in this way?

We’ll be choosing how many of each prime to use:

Here's an example. Take the number 12 = 2^2 * 3. I can put in 0, 1, or 2 2's. That's three choices. But I double this because I can put in 0 or 1 3. So I have 6 choices. Try to generalize this to any number.

There are 3 numbers with no 3 (1, 2, 4), and 3 more with one 3 (3, 6, 12). Those are all the divisors.

How about the smallest number with 20 divisors?

Once you've got the formula figured out, try some different possibilities. I noticed you suggest 2^19. It does have 20 divisors, 2^0, 2^1, ... 2^19. But each time you add a 2 to the factors of your number you only get ONE MORE divisor. Not a very good deal if you ask me. Suppose you have the number 4. So you have 3 divisors, 1, 2 and 4. Suppose you toss in another 2 to get 8. You still only have 4 divisors. But suppose you add a 3 instead. How many divisors do you have now? I'll be you've got a lot more, and only a slightly larger number (12 instead of 8).

The number \(2^{19} = 524,288\) does have 20 divisors, but there are smaller numbers that work. We’ll be seeing that soon.

Two years later, Ryan sent us exactly the same assignment:

Divisors Hello. I am totally stumped on the following question: Find a method to figuring out how many divisors a number has, and investigate the following: - what kinds of numbers have exactly 3 divisors? - do bigger numbers necessarily have more divisors? (I already know the answer to this is no.) - Is there a way to figure out how many divisors 1,000,000 has without actually listing and counting them? How about 1,000,000,000? - What's the smallest number with 20 divisors? If you could possibly give me a little help to get started on this (or an actual answer to one part or another : ) I would appreciate it a lot. Thank you, Ryan

Doctor Anthony gave a direct answer, first carrying out a specific example as we’ve already seen, and then stating the formula in general:

To find the number of divisors you must first express the number in its prime factors. Example: How many divisors are there of the number 12? 12 = 2^2 x 3 The number 2 can be chosen 0 times, 1 time, 2 times = 3 ways. The number 3 can be chosen 0 times, 1 time = 2 ways. Putting these results together we have 3 x 2 = 6 ways of finding factors of 12.

This is the same example we saw before. There are 3 ways to choose how many 2’s to use, and for each of those, 2 ways to choose how many 3’s, making a total of \(3\times 2 = 6\) ways.

Can we generalize the method? It’s hard to write as an actual formula because the number of prime factors can vary; but we can express the idea:

Note that weadd 1 to the power of the prime factorto see in how many ways that factor can be used, so if N = a^p x b^q x c^r, the total number of factors will be(p+1)(q+1)(r+1). Let us check the answer, 6 factors for the number 12, that we found earlier. Factors are 1, 2, 3, 4, 6, 12 = 6 factors. Note that our method of calculating number of factors will always include the number 1 and also the number itself.

So our calculation for \(12 = 2^{\color{Red} 2}\times3^{\color{Blue} 1}\) is \(({\color{Red} 2}+1)({\color{Blue} 1}+1) = 3\times2 = 6\).

How about that last question?

The smallest number with 20 factors requires you to find the way of reaching 20 as (p+1)(q+1)(r+1) .... = 20 20 factors, so N = 2^4 x 3^3 is a possibility, giving 5 x 4 factors another is N = 2^4 x 3 x 5 giving 5 x 2 x 2 factors The second is a smaller number so the answer is 240.

Taking this more slowly, the count of 20 could be obtained as

- \(20 = 20\), requiring the form \(a^{19}\), whose smallest value is \(2^{19} = 524,288\) as we saw before, or
- \(20 = 10\times 2\), requiring the form \(p^{11} \times q^1\), which can be as small as \(2^9 \times 3^1 = 1536\), or
- \(20 = 5\times 4\), requiring the form \(p^4 \times q^3\), which can be as small as \(2^4 \times 3^3 = 432\), or
- \(20 = 5\times 2\times 2\), requiring the form \(p^4 \times q^1\times r^1\), which can be as small as \(2^4\times 3^1\times 5^1 = 240\).

The last is the smallest.

Here is a similar problem, looking for the smallest number with 30 factors:

Factoring

Here’s a question from 1999 that applies the formula in the opposite way to what we just did:

Counting the Number of Factors Is there an easier way other than trial and error to find the number less than 100 that has thegreatest number of factors?

Doctor Rob answered, first stating our formula in words, with a brief explanation:

Yes, there is an easier way. If you factor a number into its prime power factors, thenthe total number of factors is found by adding one to all the exponents and multiplying those results together. Example: 108 = 2^2*3^3, so the total number of factors is (2+1)*(3+1) = 3*4 = 12. Sure enough, the factors of 108 are 1, 2, 3, 4, 6, 9, 12, 18, 27, 36, 54, and 108. This happens because to be a factor, a number must have the same primes, and raised to the same or lower powers. Each factor of 108 must be a power of 2 times a power of 3, and the exponent of 2 can be 0, 1, or 2, and the exponent of 3 can be 0, 1, 2, or 3. There are three choices for the exponent of 2 and 4 choices for the exponent of 3, for a total of 3*4 = 12 possible choices. Each gives a different factor, so there are 12 factors.

Sounds simple now, doesn’t it?

Now we try to make as many factors as possible, for each number of prime factors:

Now to create small numbers with many factors, you shoulduse the smallest primes. The larger the exponents, the more factors you will have, but you have to keep the number less than 100, so the exponents cannot be too large. If there is only one prime, it should be 2. To stay less than 100, the exponent can be at most 6, since 2^7 = 128 > 100. 2^6 = 64 has 6+1 = 7 factors.

So candidate #1 is \(64 = 2^6\), with 7 factors.

If there are two primes, they should be 2 and 3. To stay less than 100, the exponent of 3 can be at most 4, since 3^5 = 243 > 100. Consider numbers of the form a power of 2 times 3, 3^2, 3^3, or 3^4. Pick the power of 2 as large as possible while staying under 100. Compute the number of factors, and keep the champion(s).

This will give us several more candidates, which we’ll list below. They’ll be \(2^5 3^1 = 96\), \(2^4 5^1 = 80\), and \(3^1 5^2 = 75\). These have, respectively, 12, 10, and 6 factors, so 96 is the best so far.

If there are three primes, they should be 2, 3, and 5. To stay less than 100, the exponent of 5 can be at most 2, since 5^3 = 125 > 100. Consider numbers of the form a power of 2 times a power of 3 times 5 or 5^2. Pick a power of 3 which keeps you under 100, then pick the power of 2 as large as possible while staying under 100. Compute the number of factors, and keep the champion(s). There cannot be four or more primes, because 2*3*5*7 = 210 > 100.

We have a number of possibilities, so we need to be organized:

You get the following table, in which you can complete the last column: Exponent of 2 Exponent of 3 Exponent of 5 N Number of Factors 6 0 0 64 7 5 1 0 96 3 2 0 72 0 4 0 81 5 4 0 1 80 2 1 1 60 1 2 1 90 1 0 2 50 6 0 1 2 75 6 This systematic procedure is better than trial and error.

Here I’ve filled in the table, so we can see the answer:

Exponent of 2 Exponent of 3 Exponent of 5 N Number of Factors 6 0 0 64 7 5 1 0 96 12 3 2 0 72 12 0 4 0 81 5 4 0 1 80 10 2 1 1 60 12 1 2 1 90 12 1 0 2 50 6 0 1 2 75 6

So 60, 72, 90, and 96 all have the most possible divisors, which is 12.

For the same problem, but up to 1,000,000 rather than just 100, see this long discussion:

Multiple Personality Numbers

We’ll close with a 2002 problem from a teacher-to-be:

Factoring Strategies I am returning to school and I am having a very hard time in a math for elementary teachers class. The objective is to teach for understanding. My assignment is toexplore strategies that help you find a number having 5 factors and a number having 13 factorsand to explain my thinking and strategies. So far I think I have found thatthe number has to be a square numberbecause square numbers have an odd number of factors. For example, 16 = 1, 2, 4, 8, and 16, butI need to know why. Is there a way I can know a number has 13 factors without wrecking my brain factoring all of the square numbers? Please don't use x = y z and so on; I do not understand what all that means.

A future teacher ought to be able to handle variables; but it’s also important to be able to communicate with students who are not ready for that. I replied:

It's hard to discuss this problem without using variables; that's sort of like telling certain people to talk without moving their hands! But I'll try. That means I'll mostly have to use examples. Let's look at the factors of a square number, first; say, 6^2 = 36: 1*36 2*18 3*12 4*9 6*6 9*4 12*3 18*2 36*1 Here I listed not just the factors, but thefactor pairs. That is, for each factor, there is another number you multiply it by to get 36, and I included it in my list. We have 9 factors, and 9 factor pairs.

Of course, these are *ordered* pairs (for a reason); there are really 5 different pairs of factors.

Notice thatevery factor appears twice in the list, once as the first member of a pair, and once as the second. That means that the rows can be paired off - except for the 6*6 row: 1*36 --------+ 2*18 ------+ | 3*12 ----+ | | 4*9 --+ | | | 6*6 o | | | | 9*4 --+ | | | 12*3 ----+ | | 18*2 ------+ | 36*1 --------+ The only exception is the 6*6 row, because thereboth occurrences of 6 are in the same row.

The factor 6 is “paired” with itself!

Now, when you can pair everything up, you have an even number; when you can't you have an odd number. In this case, we have an odd number of rows, namely 9 factors.If the number were not a square, we would have an even number of rows, because there would be no special row like 6*6. For example, here are the factor pairs for 35: 1*35 ---+ 5*7 -+ | 7*5 -+ | 35*1 ---+ Here every factor pairs up with another in a different row, and there is an even number of them. Does that demonstratewhy you need a square in order to have an odd number of factors?

We’ll see another argument below.

So far, I haven’t used the divisor-counting formula. I introduced that with an example:

Now things will get a little more complicated, because I'm going to show how you can find the number of factors without listing them. Let's work with 36 again. First we'll find the prime factorization: 36 = 2*2*3*3 Now,when we make a factor pair, what we are really doing is just splitting these prime factors up between two numbers. For example, the factor pair 3*12 is 36 = 3 * 2*2*3 where I took 3 for the first factor, and all the rest for the second. Do you see why this has to be true? When you multiply two numbers together, the prime factors of the product are the prime factors of the factors, combined; we're just pulling them apart.

That tied the idea to the factor pairs we’d been considering; now we can make a list of divisors and relate it to the choice of exponents:

Now, how many ways can you split up the prime factors of a number? Let's make a table, listing how many of each prime factor we use for thefirstfactor: number number product of of 2's of 3's 2's and 3's --------+--------+------------ 0 | 0 | 2^0*3^0 = 1 0 | 1 | 2^0*3^1 = 3 0 | 2 | 2^0*3^2 = 9 1 | 0 | 2^1*3^0 = 2 1 | 1 | 2^1*3^1 = 6 1 | 2 | 2^1*3^2 = 18 2 | 0 | 2^2*3^0 = 4 2 | 1 | 2^2*3^1 = 12 2 | 2 | 2^2*3^2 = 36 I can choose anything up to the maximum number of 2's in 36, namely 0, 1, or 2 of them; and the same with the 3's. Altogether, this gives me 3 times 3, or 9, ways to choose the prime factors I want to use; and that gives me 9 factors of 36.

Now we can do the same without explicit reference to exponents, which might be better for younger students:

Just in case you're not fully comfortable with powers (especially when the exponent is 0), here's another way to look at the same thing: product of 2's 3's 2's and 3's --------+--------+------------------- | | 1 = 1 | 3 | 1 * 3 = 3 | 3*3 | 1 * 3*3 = 9 2 | | 1 * 2 = 2 2 | 3 | 1 * 2 * 3 = 6 2 | 3*3 | 1 * 2 * 3*3 = 18 2*2 | | 1 * 2*2 = 4 2*2 | 3 | 1 * 2*2 * 3 = 12 2*2 | 3*3 | 1 * 2*2 * 3*3 = 36

Nothing is different here except for the notation.

I'll leave it to you to generalize this idea, and try it on some other numbers. The idea is that youcount the number of each prime factor in your number; the number of factors will be one more than the number of each prime factor, all multiplied together. In this case, we had two 2's and two 3's, so (2+1)*(2+1) = 3*3 gives 9 factors. For 35, we have one 5 and one 7, so the number of factors is (1+1)*(1+1) = 2*2 = 4, as we saw.

Observe that in order to get an odd number of factors, we can’t have any even factors; so each exponent must have been even. That forces the original number to be a square.

Now you need to apply this to your problem. If a number has 13 factors, what does that tell you about its prime factors? Can you find a number like this? Can you find more of them?

Again, it has to be a square; and because 13 is prime, it has to be something like \(2^{12} = 4096\) (or the 12th power of some other prime, which would be much larger).

]]>Sometimes when we are learning a new subject, in this case calculus, a superficially simple question can be confusing. And that can be a good thing! Let’s look at a question about a derivative that, while not using very advanced concepts, gives a challenge to the learner that forces deeper thought about the concept, requiring distinctions that a routine question would not require the student to make.

The question came from Akhtar (father of a student), last August:

Dear Sir, Hi,

I have a question related to derivative (rate of change).

Suppose you are manager of a trucking firm and one of your drivers reports that, according to her calculations, her truck burns fuel at the rate of

G(x) = (1/200)(800/x + x),

G(x) = (1/200)((-800/x^2) + 1)

gallons per mile when traveling at x miles per hour on a smooth dry road.

- If the driver tells you that she wants to travel 20 miles per hour, what should you tell her?
- If the driver wants to go 40 miles per hour, what should you say?
I need guidance about the solution of this question.

In first part should we take x = 20 miles per hour in G'(x) to get G'(x) = -1/200 ?

Book answer is 1/200, go faster.

One thing is what does the minus sign tell us here.

Second part we get G'(40) = 1/400.

Book answer is G'(40) = 1/400, go slower.

Thanks in anticipation.

There are some points in the question to be clarified or corrected; and the problem itself, assuming it was reported fully, is a little unclear as to what kind of answer is expected. It was very helpful to be told what the book’s answers are, as that both helps us to understand the problem, and shows where Akhtar’s difficulty is. (Sometimes it turns out that a student’s only issue is that the book was wrong, and we don’t find out until the end of a confusing discussion!)

Doctor Rick answered, starting with a correction to the question:

Hi, Akhtar.

I was confused at first because you gave two different functions both called G(x). But when I started work on the problem, I realized that the second G(x) is actually G'(x), the derivative of the first G(x). I presume you accidentally omitted the prime.

So really, we are told that the fuel usage at *x* miles/hour is $$G(x) = \frac{1}{200}\left(\frac{800}{x} + x\right)\text{ gal/mi},$$ and the derivative of this is $$G'(x) = \frac{1}{200}\left(\frac{-800}{x^2} + 1\right).$$ This is the correct derivative, whether it was provided as part of the problem, or supplied by Akhtar as part of his work. (An interesting side question would be, what are the units of the derivative? It’s “gallons per mile, per mile per hour”, or \(\frac{\text{gal/mi}}{\text{mi/hr}}\) – a rate of a rate with respect to a rate, which will be part of the difficulty in this problem!)

We are not told the details of the student’s level of knowledge, but can make a guess:

It appears that this problem is presented in the lead-up to minimization/maximization problems, and maybe even before the student has become proficient at differentiation, since the problem gives the derivative. All that’s required of the student is to evaluate G'(x) for a particular value, and then to understand how the sign of G'(x) relates to the real world.

It isn’t quite clear what is actually being asked for, and what the first answer refers to; the “1/200” can’t be G(20), which is 0.3, so we have to interpret it as “G'(20) = 1/200”, which is not quite right. It’s -1/200, as Akhtar said. (Possibly, they really said that was the absolute value of the derivative.) The second answer gives us a clue about the goal: to decide whether it will be better to go faster or slower.

If the book’s answer to the first part said G'(20) = 1/200, that is incorrect; you got that part right. It’s the second task that is confusing you.

Notice what G(x)

means: it is therate of fuel consumptionin gallons per mile at speed x miles/hour. What do you suppose the manager would like to achieve? I’d say he or she will want tosave moneyby usingless fuelon a given trip (of a fixed distance).In light of this goal, can you see why in the first case you would tell the driver to go faster? If it still isn’t clear, tell me your reasoning and we can think further about it.

So we need to decide whether *increasing* or *decreasing* speed will reduce fuel usage.

Akhtar replied:

Thank you sir. If G(x) represents the rate of fuel consumption then what is G'(x)? Is it

rate of change of fuel consumption? If so then G'(20) = -1/200 =-0.005 it isvery low rate of change. Solow consumption, then why we suggest to go faster.In second part, G'(40) = 1/400 = 0.0025 so it is high as compare to first part so it is clear to go slower to save money by low consumption ….. but sir explain the first part.

Akhtar has evaluated the derivative and found that G'(20) = -0.005, while G'(40) = 0.0025. But he is interpreting these as if they were the rate of consumption, rather than *the rate of change of* the rate of consumption. This is not easy to interpret at first, particularly since the word “rate” is being used not as a rate with respect to time (as in miles per hour, as we are used to) but with respect to speed. It probably also doesn’t help that *x* here represents not position but speed! There are many things here that are unfamiliar, and require us to slow down and reevaluate what things mean.

Doctor Rick replied:

Yes, G'(x) represents the rate of change of fuel consumption (with respect to speed). If the rate of change were constant, G'(x) = -0.005 would mean that for every

increaseof 1 mile/hour in the truck’s speed, the rate of fuel consumption woulddecreaseby 0.005 gallon/mile.

So G’ tells us not how much fuel we are using, but how much (and in what direction) that amount will **change** if we change our speed. Negative means the consumption will **decrease** (get better) if we **increase** our speed.

Likewise in the second part, for every increase of 1 mile/hour in speed, the rate of fuel consumption would

increaseby 0.0025 gallon/mile. That’s a smaller rate of change than in the first part (in terms of distance from zero, that is, the absolute value of G'(x)). So if the decision were to be made on the basis ofhow muchthe fuel consumption changes, there would be even less reason to change the speed in the second part than in the first.

Akhtar’s focus on the size (absolute value) of G’ is misplaced:

But the important part is the

directionof the change, that is, thesignof the derivative. In the first part, going faster causes the rate of fuel consumption to decrease, which is what the manager wants. In the second part, going faster causes fuel consumption toincrease;going slowercauses fuel consumption to decrease. So in the second part the manager says to slow down.

This is where the answers come from. The best speed is *greater* than 20 mph, and *less* than 40 mph.

That’s sufficient to answer the question, but let’s consider your thought that G'(x) = -1/200 is “a

very low rate of change.” We may not have a good feeling for the size of a rate of change of fuel consumption — that isn’t something we talk about often. To help us think about it, I’ve graphed G(x):

At x = 20 miles/hour (and also at x = 40 miles/hour), the fuel consumption rate is 0.3 gallons/mile. We could also say that the “mileage” of the truck at these speeds is 1/0.3 = 10/3 = 3.33 miles per gallon; that is, the truck will only go 3.33 miles on each gallon of fuel. (The mileage is a more familiar number to me, in the USA, and this is a very low number compared to that for automobiles, where we’d like to go 30 miles or more on a gallon of gasoline. I can believe, however, that 3.33 miles per gallon is reasonable for a large truck.)

So at both 20 mph and 40 mph, the fuel consumption itself is the same, and that is a relatively high number. (At 30 miles per gallon, the consumption would be 1/30 = 0.0333 gallons per mile, much less than in our story.)

Now compare with the minimum rate of fuel consumption, which I have found and labeled to be about 0.283 gallons/mile at a speed of about 28.284 miles/hour. By increasing the speed by 8.284 miles/hour, we have reduced the fuel consumption rate by 0.3 – 0.283 = 0.017 gallons per mile. If the truck goes 100 miles, we save 1.7 gallons of fuel. On that 100-mile journey, we use 28.3 gallons rather than 30 gallons, a saving of 5.7%, which the manager probably doesn’t consider to be negligible.

A small change in the fuel consumption can be very significant.

The way to find the minimum, you may see from the graph, is to find when G'(x) = 0:

$$\frac{1}{200}\left(\frac{-800}{x^2} + 1\right) = 0$$

$$\frac{-800}{x^2} + 1 = 0$$

$$x^2 = 800$$

$$x = \sqrt{800} = 28.284$$

The student at this point hasn’t gotten to the point of finding that minimum, and therefore being able to tell

how muchfaster or slower to go, only thedirectionin which to change the speed to reduce fuel consumption. Yes, increasing speed by just 1 mile/hour won’t do much, but the saving adds up. I hope this helps.

So what have we learned?

When a problem is confusing, we need to decide what part to focus on, in this case the sign. We have to think carefully about what it means, and apply that to the goal. And that careful thought will hopefully lead to better understanding in the future.

]]>Our first question is from 1997:

Formula for the Day of the Week Would you please tell us what day of the week the Declaration of Independence was signed on as well the formula to determine such? Thank you very much!

Doctor Rob answered, with what I presume is the source of the FAQ’s version; but first, a historical note:

This is a trick question, of course. The date at the top of the document is July 4th, 1776. I believe it was actually signed on July 2nd, however. Ignoring this historical technicality, the day of the week upon which July 4th, 1776, fell was Thursday.

So how can we determine this mathematically?

The rule is quite complicated. It goes like this:Let k be the day of the month. In this case, k = 4.Let m be the month, counting March as 1 and February as 12. (Here January and February are considered as the last months of the preceding year. This is to make Feb. 29th [if any] be the last day of the year. This also means that the values of C and D are those for the preceding year, so, for example, 1 Jan 2000 would have C = 19 and D = 99.) In this case, m = 5 (July).Let D be the last two digits of the year. In this case, D = 76.Let C be the first two digits of the year(the century). In this case, C = 17. For any real number x,let [x] be the greatest integer less than or equal to x, which you get by truncating any fractional part. Then compute: f = k + [(13*m-1)/5] + D + [D/4] + [C/4] - 2*C. Once you have this, then f - 7*[f/7] will give you the day of the week, withSunday = 0, Monday = 1, and so on.

As we’ll see below, he has slightly misstated what [*x*] means; if *x* is negative, you can’t just truncate. Technically, [*x*] is the “floor function”, also written as floor(*x*) or \(\lfloor x \rfloor\).

The last step means finding the (positive) remainder after division by 7. This, too, will need further discussion.

In your case f = 4 + [64/5] + 76 + [76/4] + [17/4] - 34 = 4 + 12 + 76 + 19 + 4 - 34 = 81 and f - 7*[f/7] = 81 - 7*[81/7] = 81 - 7*11 = 81 - 77 = 4, or Thursday.

That last step means that when we divide 81 by 7, we get 11 R 4; that is, \(81 = 11\times7+4\).

This rule was given by a certain Rev. Zeller, and so is called Zeller's Rule. This works for the Gregorian calendar only. There is a simpler version for the Julian calendar. Recall that English-speaking countries used the Gregorian calendar beginning 14 Sep 1752, and before that used the Julian calendar.

The rule is also called Zeller’s Congruence, a reference to its use of modular arithmetic (the remainder).

This formula is given a little more fully in the FAQ (which uses a better example, and was edited a couple times over the years as we found that the original version was misstated, misinterpreted, or misapplied by readers). Here it is, with an extra small correction that was discussed but never made:

Zeller’s RuleThe following formula is named Zeller’s Rule after a Reverend Zeller. [x] means the greatest integer that is smaller than or equal to x. For positive numbers, you can find this number by just dropping everything after the decimal point. For example, [3.79] is 3.

Here’s the formula:

f = k + [(13*m-1)/5] + D + [D/4] + [C/4] – 2*C.

k is the day of the month. Let’s use January 29, 2064 as an example. For this date, k = 29.m is the month number. Months have to be counted specially for Zeller’s Rule: March is 1, April is 2, and so on to February, which is 12. (This makes the formula simpler, because on leap years February 29 is counted as the last day of the year.) Because of this rule,January and February are always counted as the 11th and 12th months. In our example, m = 11.of the previous yearD is the last two digits of the year. Because in our example we are using January (see previous bullet) D = 63 even though we are using a date from 2064.C stands for century: it’s the first two digits of the year. In our case, C = 20.Now let’s substitute our example numbers into the formula.

f = k + [(13*m-1)/5] + D + [D/4] + [C/4] – 2*C

= 29 + [(13*11-1)/5] + 63 + [63/4] + [20/4] – 2*20

= 29 + [28.4] + 63 + [15.75] + [5] – 40

= 29 + 28 + 63 + 15 + 5 – 40

= 100.Once we have found f, we divide it by 7 and take the remainder.

Note that

if the result for f is negative, care must be taken in calculating the proper remainder. Suppose f = -17. When we divide by 7, we have to follow the same rules as for the greatest integer function; namely we find the greatest multiple of 7lessthan -17, so the remainder will be positive (or zero). -21 is the greatest multiple of 7 less than -17, so the remainder is 4 since -21 + 4 = -17. Alternatively, we can say that -7 goes into -17 twice, making -14 and leaving a remainder of -3, then add 7 since the remainder is negative, so -3 + 7 is again a remainder of 4.

A remainder of 0 corresponds to Sunday, 1 means Monday, etc. For our example, 100 / 7 = 14, remainder 2, so January 29, 2064 will be a Tuesday.

The paragraph about negative values of *f* corrects a common misinterpretation of “remainder”. If you just divided \(-17\) by 7 and got \(-2\frac{3}{7}\), you might think the remainder is 3. One way to avoid this whole issue would be to add 7C to the formula, which doesn’t change the remainder but eliminates any negative terms:

$$f = k + \frac{13m-1}{5} + D + \left[\frac{D}{4}\right] + \left[\frac{C}{4}\right] + 5C$$

Another thing I have observed is that some people confuse remainders with decimals. For example, one student wrote this in 2013 (unarchived):

I was trying to calculate which day of the week my birthday (12/07/1994) fell on. I plugged in all the correct information into Zeller's Formula and I checked my answer against an actual calendar and my answer was wrong. I know for sure that I solved the formula correctly, following all the rules associated with Zeller's Rule, however the outcome was wrong. Here is the formula including my birth date: f=7+[(13*10-1)/5]+94+[94/4]+[19/4]-2*19 I worked this out both by hand and by calculator and my answer was still off by at least four days. Any help you have would be much appreciated. Thank You! f=7+[(13*10-1)/5]+94+[94/4]+[19/4]-2*19 f=7+[(130-1)/5]+94+23+4-2*19 f=7+[129/5]+94+23+4-2*19 f=7+25+94+23+4-2*19 f=2869 2869/7=409R8 The problem is that a remainder of 8 does not correspond to any day of the week according to the rules for Zeller's Rule.

The “remainder” of 8 was strong evidence that Jacob had divided \(2869\div7=409.8\) and took the tenths place, 8, as the remainder.

I replied:

The last couple steps of your work can't be right. Your value for f is much too large, and the remainder when you divide by 7 can't be greater than 6! I get this: f = 7+25+94+23+4-38 = 115 115/7 = 16 r 3 My guess is thatyou didn't follow the order of operationsfor the first line (that is, you subtracted 2 before multiplying by 19), and thatyou confused the tenths place of a decimal quotient for the remainderin the second.One way to get a remainder on a calculatoris to first round down the quotient (409.857 --> 409, for your division), and then subtract the quotient times the divisor from the dividend to get the remainder, just as you would in dividing by hand: 409 ------- 7 ) 2869 -2863 <-- 7*409 ----- 6 <-- remainder Of course, the correct remainder is 115 - 7*16 = 115 - 112 = 3

Another common error is just to miss the special rules about January and February.

So how did Zeller come up with the formula? We don’t know for sure. But if we try to derive it ourselves, we *might* be doing what Zeller did.

Here is a question from 2003:

Deriving Zeller's Rule I am doing a report on the formula for the day of the week for any day, but I cannot completely figure out how to derive it. How do you derive the formula f=k+[(13*m-1)/5]+d+[d/4]+[c/4]-2*c ?

I answered, first restating the definitions of the variables, which are essential:

Since there are several slightly different formulations of this formula, we'll use the one you are using, from our FAQ: The Calendar and the Days of the Week http://mathforum.org/dr.math/faq/faq.calendar.html Here we're defining k = day of month m = month number, taking Mar=1, ..., Dec=10, Jan=11, Feb=12 d = last two digits of year, using the previous year for Jan and Feb c = first two digits of year The formula is then f = k + [(13*m - 1)/5] + d + [d/4] + [c/4] - 2*c and we use the remainder after dividing f by 7 to find the day of the week.

Having fully stated the theorem, we can prove it.

Where does this come from? Let's first note the reason for the odd handling of months: we want leap day not to affect the formula, so we move it to the end of the 'year', andact as if the year began on March 1. Now note that in defining f, all we care about is the remainder after dividing, so it will be enough to make sure that f increases by 1 whenever the day of the week advances by one day;we don't care about the actual value of f.

The funny thing is, at one time the year *did* begin in March, and that is why leap day is at the end of February.

Now let's build the formula piece by piece.How does the year affect the day?Well, since 365 = 7*52+1, each normal year advances the day by 1, so our formula can start with the year number: f = d Whenever the year advances by 1, so does the day of the week. But we have to adjust this to account for leap years.Every four years we have an extra day, so we'll want to add 1 to f. This is done by adding [d/4], since this increases by 1 only when d becomes a multiple of 4, which is a leap year. So now we have f = d + [d/4]Now how do centuries affect the day?A century contains 100 years, 24 of which normally are leap years (since century days, like 1900, are NOT leap years). So each century the day advances by 124 days, which is 7*18-2, and therefore the day of the week goes BACK 2 days. So we have f = d + [d/4] - 2*c Butevery fourth century year IS a leap year(as 2000 was), so we have to adjust just as we did for leap years: f = d + [d/4] - 2*c + [c/4]

That handles the entire leap-year part of the Gregorian calendar.

Now we come to the months, and this is the cute part. Consider, for each month, how many days it has BEYOND 28, and then add that up to see the effect the months have on the day of the week: 1 2 3 4 5 6 7 8 9 10 11 12 Month Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Days 31 30 31 30 31 31 30 31 30 31 31 (28) Excess 3 2 3 2 3 3 2 3 2 3 3 0 Accum 0 3 5 8 10 13 16 18 21 23 26 29 \_________________/\__________________/\_______ The number of accumulated days is counted at the start of the month, so if we divide it by 7, the remainder shows how many weekdays the start of the month is from the starting day for the 'year'.

The “accum” row starts at 0 for the first month, then adds the excess from that month at the start of the *next* month. Now we want to find a formula for this last row, just as we have done in sequence puzzles. I start as I often do in such puzzles, trying an appropriate multiplier and then seeing what further adjustment will be needed:

Notice the pattern in the excess: 3,2,3,2,3 repeats every five months, and the accumulation reaches 13 in that time. Soevery 5 months, we want to add 13 days. That suggests that we want to add a term like [13m/5]. That doesn't quite give us what we want: 1 2 3 4 5 6 7 8 9 10 11 12 Month Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Days 31 30 31 30 31 31 30 31 30 31 31 (28) Excess 3 2 3 2 3 3 2 3 2 3 3 0 Accum 0 3 5 8 10 13 16 18 21 23 26 29 13m 13 26 39 52 65 78 ... [13m/5] 2 5 7 10 13 15 ... If we subtract 2 from this, it isn't quite right; we have to shift it a bit. So after playing with it a bit, we find 13m-1 12 25 38 51 64 77 ... [(13m-1)/5] 2 5 7 10 12 15 ... [(13m-1)/5]-2 0 3 5 8 10 13 ... That's just what we want. So we'll use f = d + [d/4] - 2*c + [c/4] + [(13m-1)/5] - 2

This part is basically a lucky accident, based on the (rather messy) way in which the months have ended up being defined. Without that, we’d just have to look up the month in a table, rather than use a neat formula.

Finally, we have to add the day, since each day obviously adds one to the day of the week; and adjust to get the right day of the week for, say, Mar 1, 2000, since nothing we've done so far actually determined WHICH day we start the whole pattern on. It turns out that we can just remove the -2, and we get f = d + [d/4] - 2*c + [c/4] + [(13m-1)/5] + k And there's the formula!

For some information on the history of months, including why the year started in March, and why their names and lengths are strange, see

The Origin of Month Names Number of Days in a Month

For another derivation of the month part of the formula (by Doctor Rob), see

Formula for the Day of the Month

There are other ways to write the rule. Here is a question from 1998, which led to an interesting follow-up question:

Formula for the First Day of a Year Is there an equation to find the first day of a year if you are given the year?

Doctor Bill answered the more general question, but with a different formula than Doctor Rob’s:

Here is a formula for finding the day of the week for ANY date. N = d + 2m + [3(m+1)/5] + y + [y/4] - [y/100] + [y/400] + 2 whered is the number of the day of the month,m is the number of the month, andy is the year. The brackets around the divisions mean to drop the remainder and just use the integer part that you get. Also, a VERY IMPORTANT RULE is the number to use for the months forJanuary and February. The numbers of these months are13 and 14 of the PREVIOUS YEAR. This means that to find the day of the week of New Year's Day this year, 1/1/98, you must use the date 13/1/97. (It sounds complicated, but I will do a couple of examples for you.) After you find the number N, divide it by 7, and the REMAINDER of that division tells you the day of the week; 1 = Sunday, 2 = Monday, 3 = Tuesday, etc; BUT, if the remainder is 0, then the day is Saturday, that is:0 = Saturday.

This differs from the FAQ version in having a single number *y* for the year rather than *C* and *D*, and in using the usual month numbers except for January and February. The formula treats months differently in several ways.

As an example, let's check it out on today's date, 3/18/98. Plugging the numbers into the formula, we get; N = 18 + 2(3) + [3(3+1)/5] + 1998 + [1998/4] - [1998/100] + [1998/400] + 2 So doing the calculations, (remember to drop the remainder for the divisions that are in the brackets) we get; N = 18 + 6 + 2 + 1998 + 499 - 19 + 4 + 2 = 2510 Now divide 1510 by 7 and you will get 358 with a remainder of 4. Since 4 corresponds to Wednesday, then today must be Wednesday.

We’d have the same issues with remainder, and with the floor function, that I discussed under the FAQ; but they should show up rarely if at all (can you see why?).

You asked about New Year's Day, so let's look at this year,1/1/98. Because of the "Very Important Rule,"we must use the "date" 13/1/97to find New Year's Day this year. Plugging into the formula, we get; N = 1 + 2(13) + [3(13+1)/5] + 1997 + [1997/4] - [1997/100] + [1997/400] + 2 N = 1+ 26 + 8 + 1997 + 499 - 19 + 4 + 2 = 2518 Now divide 2518 by 7 and look at the remainder: 2518/7 = 359 with a remainder of 5. Since 5 corresponds to Thursday, New Year's Day this year was on a Thursday.

In 2002, we got the following question about that page (which was appended to it):

Doctor Peterson, In your FAQ, you give the following formula for finding the day of the week for a given date: f = k + [(13*m-1)/5] + D + [D/4] + [C/4] - 2*C But in your archive, you give a different formula: N = d + 2m + [3(m+1)/5] + y + [y/4] - [y/100] + [y/400] + 2 Obviously these two formulas are equivalent, but I can't see why. Why the 2m? Why the +2? Could you be so kind as to explain this equivalence? I guess I'm trying to understand why the formula works; what is the underlying idea. The 2m and the +2 throw me.

I answered:

The first thing to do is to note the differences: In the FAQ, f = k + [(13*m-1)/5] + D + [D/4] + [C/4] - 2*C "m" is the month numberstarting with March as 1; "k" is the day of the month; the year is given by C, the century, and D, the last two digits; in the result,0 means Sunday. In the alternative formula, N = d +2m+ [3(m+1)/5] + y + [y/4] - [y/100] + [y/400] +2"m" is the month numberstarting with January as 1; "y" is the year; in the result0 means Saturday.

It’s easy to miss the different interpretation of the final number.

Now we apply Doctor Bill’s formula to Doctor Rob’s variables:

So if we try to write the latter using the variables of the former, we will have to replace d with k m with m+2 (so March is 3) y with 100C+D and subtract 1 from N to get f (so Sunday is 0). We get f = N-1 = k + 2(m+2) + [3((m+2)+1)/5] + (100C+D) + [(100C+D)/4] - [(100C+D)/100] + [(100C+D)/400] + 2 - 1 = k + 2m + 4 + [3(m+3)/5] + 100C + D + [25C + D/4] - [C + D/100] + [C/4 + D/400] + 1 = k + 2m + 4 + [3m/5 + 9/5] + 100C + D + 25C + [D/4] - C - 0 + [C/4] + 0 + 1 = k + [10m/5 + 4 + 3m/5 + 9/5 + 1] + 124C + D + [D/4] + [C/4] = k + [(13m + 4)/5 + 6] + D + [D/4] + [C/4] + 124C = k + [(13m-1)/5 + 7] + D + [D/4] + [C/4] + 124C This isn't quite right, is it? Unless 7 + 124C = -2C, it can't be the same.

But … remember I said the actual value of *f* doesn’t matter, as long as the remainder is right.

The answer is not this whole expression, but the remainder when we divide by 7. The two forms will be the same if 7 + 124C = -2C (mod 7). And since 124 = 7*17 + 5 = 7*18 - 2, it is in fact true that the remainder of the left side, 7*(1+18C) - 2C, will be the same as the remainder of -2C. The two formulas are indeed equivalent.

The two formulas’ values of *f* are not the same, but they always differ by a multiple of 7, so the remainder is always the same.

For another way to find the day of the week, using a table for the months, see

What Day of the Week Was a Given Date?

And the FAQ also shows a method that can be used as a “mental math” trick.

]]>We had a long discussion last August about domain and range of functions involving either quadratic functions or restricted domains (or both). Two Math Doctors got involved, offering different ways to approach the same problem. I’ve edited the discussion to avoid some intermingling of topics.

Here is the question, from Mooija:

Hi, I tried this, but just can’t get to the right answer.

I watched a few videos to try and understand better, but it did not help.

The answer to the question is x ≥ 4 and x ≤ 3.

Please help me to find out what I’m doing wrong.

I need to find the largest possible domain of the function.

Take the time to identify any errors you see here.

Doctor Fenton replied:

You are looking at the right information, but not analyzing it correctly. You factored the quadratic correctly, and you are looking at the sign of each factor, finding the interval where each factor is non-negative.

What you are overlooking is that

the sign of the quadratic is not determined by the sign of a single factor, but by the signs of all the factors.

One wayto solve the problem is to note that the factor (x – 3) is positive when x > 3 and the factor (x – 4) is positive when x > 4. You can use these two points tocut the number line into three intervals: x < 3; 3 < x < 4; and x > 4. Then look at the sign of the quadratic in each interval.x-4 < 0 x-4 < 0 x-4 > 0 x-3 < 0 x-3 > 0 x-3 > 0 --------------+------------------+------------- 3 4The product of two numbers is positive when both numbers have the same sign, and is negative when the numbers have opposite signs.

Using this fact, can you now determine the intervals where (x – 3)(x – 4) is positive? Since you want the intervals where the product is non-negative, you should include the endpoints of each interval where the quadratic is positive in your answer.

Another wayto view the problem is geometric or graphical. The graph of y = (x – 3)(x – 4) is a parabola, a U-shaped curve. You arelooking for the intervals where the curve is on or above the x-axis. The factorization shows that the curve crosses the x-axis at x = 3 and at x = 4. Being U-shaped (and opening upward) it descends on the left interval, crosses at x = 3 and goes below the x-axis and stays below until x = 4, and finally rises to the right of x = 4.

The solution therefore is *x* ≥ 4 **or** *x* ≤ 3. (Mooija had said “*x* ≥ 4 **and** *x* ≤ 3″, presumably meaning the union of those two sets. From what we’ll see below, this appears to be what was taught, though I consider it incorrect.)

Mooija’s specific error was to divide by a factor; we’ll see that again below.

For a similar correction of a similar error, see:

An Odd Inequality Reversal

Mooija had a further question:

Thank you that helped lots. I get it now

I got another problem that is basically a continuation of this but with another question.

Can you help me with that too please?

You see what you explained for me was the

domain; now I need to find therange with a given domainand I don’t know how to do that.

Doctor Fenton answered,

I mentioned that the graph of this quadratic is a parabola, which is somewhat U-shaped, so there will be a lowest point on the graph. Graphically, the

rangeof a function is the set of all points on the y-axis which can be reached by going horizontally from a point on the graph. Once you know a point (x_{0}, y_{0}) on the graph, that number y_{0}will belong to the range, and any y-value larger than y_{0}will also be in the range.In particular, if you know the y-coordinate y

_{0}of the lowest point on the graph, the set of all y ≥ y_{0}will be in the range.What do you know about finding the lowest point on a parabola y = ax

^{2}+ bx + c?

The range of \(x^2 – 7x + 12\), which can be rewritten as \(\left(x – \frac{7}{2}\right)^2 – \frac{1}{4}\), is \(x \ge -\frac{1}{4}\). This turns out not to be needed …

Doctor Rick jumped in, having seen a missing aspect of the problem:

Hi, Mooija, I’d like to add something to what Dr. Fenton has said, because I’m not sure we have really answered the question. I’d like to see exactly what the question asked!

You gave an

inequality,x

^{2}– 7x + 12 ≥ 0You showed the “answer to the question” as “x ≥ 4 and x ≤ 3”, which tells me that the “question” is to solve the inequality. But then you added, “I also need to find the largest possible domain of the

function.” Can you tell us what function that is talking about?If it’s the function

f(x) = x

^{2}– 7x + 12then the largest possible

domainof f is not what you discussed with Dr. Fenton, but rather the set of all real numbers. This question has nothing to do with whether f(x) is positive or negative, only with whether f(x) can be evaluated.Now, if the problem was dealing with the function

g(x) = √ f(x)

= √(x

^{2}– 7x + 12)then you’ve done the right thing in determining the interval(s) on which f(x) ≥ 0. I just can’t be sure that this is what you’re doing, because you haven’t told us. That’s why I hope that you will clarify what the problem actually says.

Mooija replied:

Okay now to clarify I asked for help with question 7g. This is straight out of my textbook now:

Solutions:

Doctor Rick had made the right guess! He responded,

Thanks, Mooija, that answers my question! You were finding the greatest possible domain of the function

f(x) = √(x

^{2}– 7x + 12)so you did exactly the right thing when you solved the inequality asserting that the quantity under the radical is non-negative.

I see that

you are not asked to find the rangeof the function above, which is uninteresting – it is the set of all non-negative numbers. There is no need to find the minimum of the quadratic function, as that minimum does not occur within the domain of f. If this isn’t clear, we can certainly discuss any questions you have about it.If you have problems of the sort you described (finding the range of a function with a restricted domain), feel free to show us such a problem with your work, and we can discuss that.

The process of finding the range can depend strongly on the details of the particular function. The parts of problem 8 that I can see, however, are all linear functions, so if that’s what you are asking about, it will be relatively easy. Pick one problem and give it a try, and I or Dr. Fenton can take it from there.

Mooija later showed work on problem 7e; I’ll insert that discussion here, and we’ll move on to 8 after this.

I am really sorry but I still don’t get how to solve the domain of a function.

In the attachment I tried two different methods; the first was wrong.

In the second method I think a) is right but the book says that b) is right, which means I am completely wrong, so please tell me what I’m doing wrong.

The error here is the same as before. Doctor Fenton answered with a different perspective:

You

dividedthe inequality x(x – 4) ≥ 0 by x in the left half of the second line, getting x ≥ 0 on the left side of the third line, and then divided x(x – 4) ≥ 0 by (x – 4) on the right half of the second line, getting x ≥ 0 on the right side of the third line.This method of simplifying the inequality doesn’t work in the same way it does for equations. The problem is that

if you divide an inequality by a negative number, the resulting inequality is not true. For example, 4 < 6 is a true inequality, and if we divide the inequality by a positive number, 2, the resulting inequality is 2 < 3, which is also true. But if we divide 4 < 6 by a negative number -2, the resulting inequality is -2 < -3, which is false. When you divide x(x – 4) ≥ 0 by x, the resulting inequality x – 4 ≥ 0 is only true if x > 0.While

this process can be made to work by considering caseswhere x > 0 and where x < 0, it becomes messy. A simpler approach is tolook at each factor in the problem separately, and find the values of x that make each inequality true: in this case, you find where x ≥ 0 and where x – 4 ≥ 0. The first inequality is already solved: x ≥ 0; and the second becomes x ≥ 4.We can graph these solutions on the number line:

x ≥ 0 •-------------------------------------------------> x-4 ≥ 0 •-----------------------------> +----+----+----+----+----+----+----+----+----+----+----+----+----+ ... -2 -1 0 1 2 3 4 5 6 7 8 ...The top line shows the solution of x ≥ 0, in the sense that all points on the number line below the top line are solutions of x ≥ 0. Similarly, all the points under the bottom line are solutions of x ≥ 4 (or x – 4 ≥ 0). The product x(x – 4) ≥ 0 will be true if both factors have the same sign: both are positive or both are negative (or if one factor is 0). The points on the number line where that is true are the point under both lines, or not under either line. The points under both lines are the points where x ≥ 4 (we include 4 because the factor x – 4 = 0 there. The points not under either line are the points where x < 0, and we include x = 0 because we are only requiring that x(x – 4) = 0, which is true at x = 0. (If the inequality were x(x – 4) > 0, then we would not include either x = 0 or x = 4.)

Does this make sense to you?

Now we can move on to the range question.

Mooija had this to say about problem 8 and range:

To tell you the truth I am stuck with number 8, because

I don’t know how to find the range with a domain of all real values.If the domain is all real values it means the domain is basically infinite and so is the range.

Mooija has misstated problem 8, which specified the domain as “all *positive* real numbers”. This was to cause some misunderstandings.

Doctor Rick looked at problem 8(a):

You want to understand how to find the range of a function when the domain is restricted – when it is

less than all real numbers. In problem 8, the domain is restricted to allpositivereal numbers; thus the answer you found does not help us – it’s talking about a different kind of problem.Now let’s look at one of the parts of problem 8. If we define

f(x) = 2x + 7 with domain {all positive numbers}

then we’re asking, if x > 0, what inequality applies to 2x + 7? Watch as I start with x > 0 to get the result we want:

x > 0

2x > 2(0) (multiplied both sides by 2, which is positive)

2x > 0 (since 2(0) = 0)

2x + 7 > 0 + 7 (added 7 to both sides)

2x + 7 > 7

Thus I’ve found that 2x + 7, that is, f(x), must be greater than 7. That’s the range of f. All I did was to “build up” the function f(x) = 2x + 7 step by step, starting with x, and work with the inequality as I went to obtain an inequality equivalent to x > 0.

There are other ways one might approach the problem of finding the domain of a restricted linear function. We might think graphically, for instance — that may give you a better feel for what is going on. But this is a starting point for discussion, at least.

The “building up” approach works nicely here, but we’ll see the trouble Mooija gets into trying to use it naively in a quadratic case below.

Mooija showed us the rest of problem 8, which is about quadratic functions (and therefore takes us back to the original question about range):

There are other parts to number 8.

I have been able to solve them all except for one, the last one of number 8.

Doctor Fenton asked to see Mooija’s work, suspecting that the method might be wrong on all three even if the answers were right:

For problem 8(f), you say you had no trouble with the earlier parts of problem 8. However, the last three parts of problem 8 are very similar. Can you show me how you found the range in problem 8(d) or 8(e)?

Mooija answered, showing an incorrect attempt at the “building up” approach, which happened to work for (d) and (e), but was not robust enough for (f):

I did (d) and (e) but could not get (f) right, even though I used the same method I used in (e).

Doctor Fenton pursued this for a bit, having forgotten that the domain in problem 8 is restricted to positive numbers, so that merely finding the vertex is not enough. Doctor Rick rejoined with two ways to handle that:

Hi, Mooija, it’s Dr. Rick again. It’s probably getting confusing with all the back-and-forth, but I think another eye is needed. Let me take another look at problem 8(e).

You need to find the range of the function

f(x) = (x + 2)

^{2}– 1; domain: x > 0Here’s what I would do – similar to what I did with the linear function earlier. I start with the inequality defining the range, and change it step by step, doing valid things (things that produce equivalent inequalities):

[1] x > 0

[2] x + 2 > 0 + 2 = 2

[3] (x + 2)

^{2}> 2^{2}= 4[4] (x + 2)

^{2}– 1 > 4 – 1 = 3Thus I’ve shown that f(x) > 3 for all x in the domain x > 0. That’s the answer the book gave.

We have to be careful when working with quadratics — the squaring step above, step [3], is only valid

because we already know that the quantity being squared, (x + 2), is positive. If the domain were x < 0 instead of x > 0, the same set of steps (seeming to give the result f(x) < 3) would be wrong – the correct range would in fact be x > -1 (the range of the unrestricted quadratic).The graph of the function may help you to see what’s going on, as I suggested with the linear functions. The red graph in the attached image is f(x) = (x + 2)

^{2}– 1 subject to the domain restriction x > 0; you’ll see that the lowest value of y on that curve is y = 3. The dashed curve is the rest of the quadratic, whose minimum y value is y = -1.

Now Mooija tried 8(f):

Okay I did 8(f) using both your methods:

With Dr. Rick’s method I think I did something wrong.

With Dr. Fenton I missed a few steps.

The thing is even if those mistakes are corrected it will still be wrong because f uses the inequality ≥ where the rest does not, can you tell me why?

Doctor Fenton’s method referred to here did not take the restricted domain into account, and just used the vertex. He explained:

Your error in Dr. Rick’s method is where you squared (x – 1) > -1 to get (x – 1)

^{2}> 1. If a < b, then you can only conclude that a^{2}< b^{2}if both a and b are positive. For example, -1 < 0, but it is not true that (-1)^{2}< 0^{2}: that would say that 1 < 0.You conclude that (x – 1)

^{2}> 1 for all x > 0, but that is not true. If x = 1, then x – 1 = 0. so (x – 1)^{2}= 0 and (x – 1)^{2}+2 ≥ 2. (If you know what increasing functions are, then you are treating (x – 1)^{2}+2 as if it were increasing on the interval x > 0, but it actually decreases for 0 < x < 1, and then increases for x > 1.)When you try to use “my” method, you go from x > 0 directly to (x – 1)

^{2}+2 > 2. That suggests that you think that because x > 0, that (x – 1)^{2}> 0, but when x = 1, (x – 1)^{2}= 0, so (x – 1)^{2}+ 2 ≥ 2.This goes back to what I said above, that if a < b, then we can only conclude that a

^{2 }< b^{2}if a and b are both positive. In problem 8(e), you wanted the range of (x + 2)^{2 }– 1 for x > 0. If x > 0, then x + 2 > 2, so you can conclude that (x + 2)^{2 }> 4, since both (x + 2) and 2 are positive. In problem 8(f), the quadratic is (x – 1)^{2}, so when 0 < x < 1, (x – 1) < 0, and so (x – 1) > -1. But since it is not true that both x – 1 and -1 are positive, you cannot conclude that (x – 1)^{2}> (-1)^{2}.

Then Doctor Rick added:

You will recall that after I showed my method for problem 8(e), I pointed out that it won’t always work —

only when both quantities to be squared are known to be positive. As Dr. Fenton said, problem 8(f) is one of the problems for which that caveat applies. So you’ll need another method …I don’t know what methods you are being taught for solving these problems. Personally I would sketch a graph of the parabola and make decisions based on that. If you have learned to sketch parabolas, then you know that the graph of the function

f(x) = (x – 1)

^{2}+ 2is a parabola with vertex at a certain point, and that it opens upward. This tells us that, regardless of domain restrictions, the value of f(x) cannot be less than the y coordinate of the vertex. If the vertex is to the right of the y axis (and hence in the domain of the function), then f(x) can in fact have that minimum value. And in that case, since the entire right half of the parabola is in the domain, there is no upper limit to f(x).

If you don’t have the background to do the work I just outlined, I’d like to see some information on what you have learned, particularly how any similar problems were solved in your textbook or class.

Here is the graph of this function:

We can see that the minimum value is not at *x* = 0 as before, but at the vertex of the parabola.

These problems can be quite subtle. I would recommend at least checking your answer with a sketch of the graph, even if you carefully use a strictly algebraic method!

]]>Here is the question from 1999:

Year 2000Why isn't the year 2000 a leap year?Since every year is 365.26 days long, wouldn't every 100 years be a double leap year? Does it have to do with some weird mathematical process? Thanks.

There are a couple misunderstandings here to be untangled!

Doctor Rick answered:

Hi, Ben. I don't know where you got your information, but2000 _will_ be a leap year. The years 1900 and 1800 and 1700 werenotleap years, but 1600 was, and 2000 will be.

That is, 2000 was special, not because it was **not** a leap year, but because, unlike other century years, it **was**!

Here is an interesting Web site with information about the Gregorian calendar (which we use now) and its leap-year rule, which I quote: The Julian and the Gregorian Calendars, by Peter Meyer http://www.magnet.ch/serendipity/hermetic/cal_stud/cal_art.htm "In the Gregorian Calendar a year is a leap year if either (i) it is divisible by 4 but not by 100 or (ii) it is divisible by 400. In other words, a year which is divisible by 4 is a leap year unless it is divisible by 100 but not by 400 (in which case it is not a leap year). Thus the years 1600 and 2000 are leap years, but 1700, 1800, 1900 and 2100 are not."

(The link in the original answer is dead, but I have updated it here to its current location; the quote below is no longer present, probably replaced by more detailed data.)

You can think of the rule this way:

- Start with a basic calendar in which every year has 365 days:

no leap years - Change every year divisible by 4 to a leap year:

leap years 1600, 1604, 1608, 1612, 1616, …, 1696, 1700, 1704, … - Now change every year divisible by 100 back to a normal year:

leap years 0000, 1604, 1608, 1612, 1616, …, 1696, 0000, 1704, … - Finally, change every year divisible by 400 to a leap year again:

leap years**1600**, 1604, 1608, 1612, 1616, …, 1696, 0000, 1704, …

So 2000 was the first application of this last rule since the Gregorian calendar began; but that means that my generation missed its only chance to see a multiple-of-4 year that wasn’t a leap year. It’s sort of an “Oops, nothing special here, folks!” sort of rule.

This Web site also differs with you about the length of a year, stating: "The mean solar year during the last 2000 years is365.242 days(to three decimal places)." It is because this figure is slightly _less_ than 365 1/4 days (not greater, as you stated) that it is necessary to _omit_ occasional leap days (rather than add any). To be precise, 3 days are omitted every 400 years. The average length of a calendar year is thus 365 1/4 - 3/400 = 365.25 - 0.0075 = 365.2425, which matches the astronomical figure given above pretty well.

So rule 2 above would raise the length of a year to 365.25 (by adding 1/4 = 0.25 day per year), and rule 3 reduces that by 1/100 = 0.01 day, to 365.24. Then rule 4 raises it by 1/400 = 0.0025 day, to 365.2425 days. To match the current length of a year, it should be 365.2424, so this is good enough for now. (See below for more!)

If the year were 365.26 days long, your calculation would be correct, we would need to insert an extra leap day every 100 years. The calculations I've described don't seem too weird to me, but the matter of defining exactly what a year is turns out to be pretty complicated, as you will see from this Web site.

Be sure to read the whole linked page if you are interested!

Ben replied:

Thanks, I am skilled in Math and I didn't really mean weird, sorry 'bout that. I always thought years were 365.26 so it's good to know that they are 365.242. Thanks again.

Doctor Rick explained:

Hi again, Ben. I took no offense at the word "weird"; in fact I wanted to acknowledge thatthe definitions of year and day do get pretty complex and even weird- though they make sense when you get to know them. I did a quick Web search to verify my hunch about your figure for the length of a year. One site I found has a long list of definitions of various astronomical periods: PREDICTABLE PERIODIC EVENTS (Jan Curtis, Alaska Climate Research Ctr.) http://climate.gi.alaska.edu/Curtis/astro1.html

This time the link is still good.

I will quote the relevant sections: "Earth'sTropical year365.24219 Days "Interval for Earth to return to same equinox. This explains why leap years exist. Leap years also occur only in years when centuries are evenly divisible by four (e.g., 1600, 2000, 2400, etc.). The Gregorian calendar therefore is equal to 365 days 5 hours 49 minutes 12 seconds. "Earth'sSidereal year365.25636 Days "Interval for Earth to return to same fixed star. "Earth'sAnomalistic year365.25964 Days "Interval for Earth to orbit the Sun as measured from its closest point (perihelion) to its return back. This period is slightly less than five minutes longer than the sidereal year because the position of the perihelion point moves along the Earth's orbit by about 1.1 minutes of arc yearly. During this current epoch, the Earth is closest the Sun just after the new year. It will take about 12,500 years for this date to advance six months." In other words, the length of a year depends on whether you are measuring the time for the earth to return to the same place in orbit relative to the stars (sidereal year), or relative to the direction of the earth's tilt (tropical year), or relative to the perihelion of the earth's orbit (anomalistic year).The figure relevant to the calendar is the tropical year, because it relates to the seasons. The figure you know is correct, but it's one of the other kinds of "year."

The tropical year is relevant because the purpose of the calendar is to keep the equinoxes (and therefore the seasons) aligned with the calendar. (The distance from the earth to the sun has only a small effect on the seasons; so at most the change in the perihelion will only make the northern hemisphere summer a little warmer. The bigger effect is that, because the earth moves faster in orbit near perihelion, northern hemisphere winter is currently shorter than southern hemisphere winter, and that will reverse in 12,500 years! For a nice explanation from an Australian perspective, see here! For a Maine perspective, see here.)

Now let’s back up to a 1998 question about leap years in general, for a good summary:

Why Do We Have Leap Year? Dear Dr. Math, Why do we need to have one extra day each 4 years? Thanks, Pat

Doctor Rob answered:

This is an astronomical question, but I think I know the answer. In short, the reason is to preserve the alignment of dates on the calendar with the seasons of the year. As the Earth revolves around the Sun, it rotates on its axis. When it has made exactly one orbit around the Sun, it has made 366.2422 rotations on its axis. One of those rotations is accounted for by its revolving about the Sun. (Think of a planet like Mercury for which one side always faces the Sun. After one revolution, it has made one rotation, but the Sun has never set on one side of Mercury, and never risen on the other.) That means that 365.2422 days have elapsed. An ordinary year contains 365 days, not 365.2422 days. Since .2422 is about 1/4, every four years we have fallen behind by almost a full day. If we didn't do anything about this, after 700 years we would have Summer in January and Winter in July! As a result, we insert an extra day, 29 February, to make a Leap Year. This arrangement results in what is called theJulian Calendar, supposedly invented by Julius Caesar (more likely just decreed by him). The average year is 365.25 days under this calendar.

This covers my rules 1 and 2.

If you thought the mention of 366.2422 was wrong, and still don’t get it after it was explained, see here:

One Circle Revolving Around Another

Now we need rules 3 and 4:

Of course .2422 is not exactly 1/4, so we will be drifting a little, even with Leap Years. As a result,every year divisible by 100 is declared *not* to be a leap year. 1900 was not a leap year under this calendar. That means that the average year is 365.24 days, still a little off. To be even more accurate, every year divisible by 400 is declared to be a leap year, after all! Thus 2000 will be a leap year. This system is called theGregorian calendar, since it was established by order of Pope Gregory in 1582. This was only adopted in English-speaking countries in 1752, however, to be made retroactive. In the Gregorian calendar, the average year is 365.2425, which isoff only 3 days every 10000 years. No doubt someone will make more rules to fix even that slight deviation sometime in the future. If you think this is complicated, you should see how the date of Easter is calculated!

Now, how about a Rule 5 to handle that extra little drift?

Here’s a question about the future of leap years, from 2004:

Will Zeller's Rule Work Indefinitely? I showed an equation involving Zeller's Rule to a college teacher and he told methe equation may not work for very distant years. He said that it may be impossible to write an equation relating the day of the week to a given year; month; and day of month because the exact value relating the two may haveirrational numbersinvolved. His statement came as a shock to me; I thought that since the use of the rounding down function is used throughout "Zeller's Rule," the equation would work indefinitely. Who's right? Is the equation sure to work in 4561? Indefinitely?

Zeller’s Rule is a formula for finding the day of the week, which encapsulates the rules of the Gregorian calendar. We’ll be examining Zeller’s Rule next week; the question here is really about the calendar itself, not the formula. I replied to this intriguing question:

Hi, Hunter. Zeller's formula exactly corresponds to the Gregorian calendar, andwill work as long as that calendar is used. It is true that, over a very long time, that calendar would need further adjustment, just as the Julian calendar did; but until a new calendar is defined, you can't say the formula is wrong! The point is thata calendar is not a measurement of reality, but a legal concept established by law, and therefore it remains valid as long as, but ONLY as long as, the law is in effect. So the formula you havedoes not refer to the astronomically measured length of a year, and does not depend on physical reality for its accuracy; on the other hand, it depends on the whim of governments, so no one can really say how long it will remain valid!

There are several layers of reality here. The rules for the calendar, as we’ve seen, are intended to keep the calendar in sync with the solar system; and the formula is just an embodiment of those rules. The solar system gives us certain parameters that we can’t change, which accounts for the need for an approximation that, in its several rules, works something like a decimal approximation to an irrational number, each digit (or rule) getting us closer to what we need, and keeping it accurate to within a day for longer and longer time periods. But beneath this we have the fact that those parameters gradually change, so that we might eventually need to change the calendar because the year is no longer 365.2422 days long. That’s a separate issue I didn’t touch, because it’s about reality, not math.

A calendar is onlya way to fit a whole number of days into each year, while staying as close as possible to what is, as you were told, a theoretically irrational number of days per year astronomically (and also somewhat variable, and subject to errors in measurement). Thereforeno completely regular calendar can be exactly correct forever; but then, in a sense, no calendar is really exact anyway, since the whole point is to approximate the year with whole numbers. It's just that an extra day will have to be added or dropped eventually. What is surprising is that such a simple set of rules (and therefore a simple calculation) happens to be able to do such a good job of approximating the physical length of a year.

It’s easy to imagine a world in which we’d need a leap day, say, after 3 years, and then again after 4 years, and then an extra leap day after 17 years, or whatever! All the 4’s and 100’s make it impressively simple.

The second link below has been taken down (ironically, because “astronomy and astrophysics knowledge evolves”), so it’s good that I copied the part that mattered:

Our Calendar FAQ has links to several sites about calendars; here is one that explains the Gregorian calendar with links to other details, historical and astronomical: Gregorian Calendar http://scienceworld.wolfram.com/astronomy/GregorianCalendar.html This site summarizes how the rules were changed from the Julian to the Gregorian calendar, and mentions a proposed additional rule that would keep it accurate for 20,000 years: Calendars http://csep10.phys.utk.edu/astr161/lect/time/calendars.html However, the Julian year still differs from the true year of 365.242199 days by 11 minutes and 14 seconds each year, and over a period of 128 years even the Julian Calendar was in error by one day with respect to the seasons. By 1582 this error had accumulated to 10 days and Pope Gregory XIII ordered another reform: 10 days were dropped from the year 1582, so that October 4, 1582, was followed by October 15, 1582. In addition, to guard against further accumulation of error, in the new Gregorian Calendar it was decreed that century years not divisible by 400 were not to be considered leap years. Thus, 1600 was a leap year but 1700 was not. This made the average length of the year sufficiently close to the actual year that it would take 3322 years for the error to accumulate to 1 day.

The Julian calendar, with its average year of 365.25 days, was off by 0.007801 = 1/128 year, so it gained a day every 128 years. The Gregorian calendar averages 365.2425 days, and is therefore off by 0.000301 = 1/3322 years.

A further modification to the Gregorian Calendar has been suggested:years evenly divisible by 4000 are not leap years. This would reduce the error between the Gregorian Calendar Year and the true year to 1 day in 20,000 years. However, this last proposed change has not been officially adopted; there is plenty of time to consider it, since it would not have an effect until the year 4000. That is, the length of a year in the Julian calendar was 365 + 1/4 - 1/100 = 365.24 (off by 0.002199 days, or 1 day in 454 years) and in the Gregorian calendar is 365 + 1/4 - 1/100 + 1/400 = 365.2425 (off by 0.000301, or 1 day in 3322 years) while with the 4000 year rule it will be 365 + 1/4 - 1/100 + 1/400 - 1/4000 = 365.24225 (off by 0.000051, or 1 day in 19,607 years)

So there’s our Rule 5:

5. change every year divisible by 4000 back to a normal year:

leap years **4000**, 4004, 4008, 4012, 4016, …, 4096, 0000, 4104, …

For a reference to this “Herschel proposal”, see Wikipedia.

Given that such a simple addition (which has not been made only because it is not needed yet) would fix the Gregorian calendar so effectively, we can safely say that you can use Zeller's formula up to the year 4000. After that--if the change is actually made in law-- you can just add a term to the formula and keep it correct.

But this assumes the earth’s orbit has not changed much in that time; that’s for astrophysicists, not mathematicians, to discuss.

We can close with this little puzzle, whose answer relates to leap years:

When Were They Born? Two people celebrate their birthdays on the same day this June. One of them is exactly 2555 days older than other. In what years were they born?

Doctor Ian provide a hint:

Hi Tina, Note that 2555 = 7 * 365. What this means is that there are no leap years between their birthdays. When is it possible to go seven years without a leap year?

You should be able to answer that now…

]]>A question from last August gave us some nice problems reminiscent of the Binomial Theorem, which were very deserving of discussion.

The question came from Arsh:

I have some coefficient problems which I am unable to solve. I don’t know if a single concept will work for all so I am stating them.

Q1) Find the coefficient of x^203 in the expression (x – 1)(x^2 – 2)(x^3 – 3) … (x^20 – 20)

Q2) Find the coefficient of x^49 in the product (x – 1)(x – 3)(x – 5)(x – 7) … (x – 99)

Q3) Find the coefficient of x^9 in the expansion of (1 + x)(1 + x^2)(1 + x^3) … (1 + x^100)

Please explain through these topics: Binomial theorem, or sequence and series, or permutations and combinations.

This is a well-planned question, listing several questions together in case one should provide hints for another, and telling us what methods are expected to be used. This turned out to be very helpful.

There are some areas of combinatorics that I have never learned, and at first glance I thought these might require them (though the question implied they should not). As a result, I left the question for others to take … until I realized I had something good to write about:

Hi, Arsh.

When I first saw these, I assumed they are all quite difficult, because the first one looks especially hard. I was waiting for someone who knows some more advanced methods to answer. But when I scanned all three again, to see if they were all the same, I realized that the third is much nicer than I thought, and I quickly solved it, using basic combinatorial thinking. Then I took a closer look at the second, and realized that it, too, is an “easy” case of its type. I haven’t yet seen what makes the first one solvable! But let’s look at the third:

Find the coefficient of x^9 in the expansion of (1 + x)(1 + x^2)(1 + x^3) … (1 + x^100).

It is not uncommon that a difficult *type* of problem includes special cases can be given to students who are not prepared for the general case. Rather than special knowledge, it requires creative application of the basics. All it takes, that is, is a reason to hope I will be able to do it! (This is advice I often give to students: Just try something, and you may discover that you have a better idea than you knew. You don’t have to know ahead of time all the steps you will be taking.)

One way to start, if you are unfamiliar with this sort of problem, is to try a simpler case. Consider, for example, at \((1+x)(1+x^2)(1+x^3)\), which expands to $$(1+x+x^2+x^3)(1+x^3) =\\ 1+x+x^2+x^3+x^3+x^4+x^5+x^6 =\\ 1+x+x^2+2x^3+x^4+x^5+x^6$$ Each term (before combining like terms) comes from a product of some subset of the terms \(x\), \(x^2\), and \(x^3\) (with a 1 from the other factors); and any term with exponent less than 3 must not have \(x^3\) as one of its factors. We are looking for the coefficient of \(x^9\), so all factors after \(1+x^9\) will be contributing only their 1. So:

How can you make a term with x^9? By multiplying together terms whose exponents add up to 9, right?

The first thing I realized is that

we won’t be using any of the factors beyond x^9, so the problem might as well beFind the coefficient of x^9 in the expansion of (1+x)(1+x^2)(1+x^3)… (1+x^9).

Do you see why that doesn’t change the problem?

Suddenly it’s a smaller problem than it seemed, and feels more doable. Now we think about where the specific terms in the expansion with exponent 9 come from:

Now, notice that the terms we will be using will look like (x)(x^3)(x^5), with exponents that sum to 9 and are all different (since each exponent can appear only once in the product).

So the problem reduces to this question:

In how many ways can we express 9 as a sum of distinct natural numbers?

Suddenly this is “just” a combinatorial problem. That can still be hard, but in this case is not:

Now, there may be a nice way to use combinations or something to calculate this, but

the number is small enough to just list the sums, and that’s going to be less work than a more elaborate (and general) method. So try doing that. (I think the key to these problems is exactly thatthey are not general cases, but are special.)Let me know what you find; and then while you wait for an answer (from me or someone else), give #2 a try, using similar ways of thinking. Look for what makes it easier than it could be. The first may turn out to be different from those; I don’t know yet.

Sometimes we can feel like it isn’t real math unless we have used a general method; but that is false. We’ve done plenty of good mathematical thinking by just turning the problem into a counting problem.

We’ll get back to #3 later.

Two and a half days later, Arsh had not yet replied, but I had more to say:

Hi again, Arsh.

Just to keep you up-to-date, I

havesolved the first problem; the key is to find what combinations of powers have to beexcluded. It is, as I thought, a little harder than the others, so the order I suggested for solving them is appropriate.I look forward to discussing these with you, so please let me know what you’ve found, even if you don’t think you’re close — or if you think you’ve solved them all.

Once again, a student may think his work is not worth showing, but it may take just a little hint to turn apparent failure into resounding success. So I encouraged showing any work at all, to get the conversation moving forward.

Now Arsh answered:

Ok, I get it that the last one was very easy. We can get 9 from (1, 8) (2, 7) (3, 6) (4, 5) (1, 2, 6) (1, 3, 5) (2, 3, 4) (9, 0).

So, I think the coefficient would be 8.

In the second one I get the highest power as x^50 so x^49 would the sum of roots which are 1, 3, 5, 7, …, 99.

So, sum of first 50 odd numbers is 50² = 2500. So coefficient would be -2500.

Then in the first one, 7 powers have to be excluded as max power is 210. So no. of ways in which 7 can be made as the sum of distinct natural numbers is (7, 0) (1, 6) (2, 5) (3, 4) (2, 4, 1).

This much I have done. I am still wondering why we are excluding powers in 1st one. Please explain how to solve the first one.

See if you can follow Arsh’s thinking, before looking below for my elaborations. He has done well.

Now I could go through each problem in detail, showing Arsh’s work, commenting on it, and demonstrating how I would express it:

Hi, Arsh.

(#3)

Find the coefficient of x^9 in the expansion of (1 + x)(1 + x^2)(1 + x^3) … (1 + x^100)“We can get 9 – (1, 8) (2, 7) (3, 6) (4, 5) (1, 2, 6) (1, 3, 5) (2, 3, 4) (9, 0)

So, I think the coefficient would be 8.”

Good work. Since each term of the expansion before simplifying is a product of some 1’s and some distinct powers of x, the coefficient of the x^9 term is the number of these terms, which is the number of ways to get 9 as a sum of distinct positive integers, which you have listed. I would give the list this way (I found them by starting with the largest number in each case):

9

8+1

7+2

6+3

6+2+1

5+4

5+3+1

4+3+2

Since there are 8 of these, that is the desired coefficient. This was easy because of the 1’s, and the relatively small exponent.

I find it easier to be certain of the answer when making a list like this, if I make it an *orderly* list, following some consistent order to avoid missing anything. Arsh started out increasing the first number, then apparently filled in some missed cases.

If we had tried to do this by a formula, we would find that we are counting “unordered partitions of the number 9 with distinct integers”, which is not pretty (there is no nice formula). In fact, one way to do it is to turn this problem inside-out, using our product as a *generating function* and finding the coefficient of the \(x^9\) term! For an introduction to the topic, and an example not quite like this one, see

Partitioning the Integers Number of Unordered Partitions

It is definitely easiest just to list and count!

(#2)

Find the coefficient of x^49 in the product (x – 1)(x – 3)(x – 5)(x – 7) … (x – 99)“I get the highest power as x^50, so x^49 would the sum of roots which are 1, 3, 5, 7, …, 99.

So, sum of first 50 odd numbers is 50² = 2500. So coefficient would be -2500.”

Good, again. This turned out to be easy once I saw that there are 50 factors, so the x^49 term is the next-to-last; it is the sum of terms each of which is the product of 49 -1’s and only one x, namely -99x + -97x + … + -1x = -2500x. You could have done the sum as an ordinary arithmetic series, but seeing it as the sum of odd numbers is even nicer. And connecting this to the fact that the second-highest degree term has the (negative) sum of roots as its coefficient is even better.

To find a coefficient in the middle of this long polynomial would be quite difficult, but one near the beginning or end is easy.

My approach was simply to see that the terms in the expansion containing \(x^{49}\) would be formed by multiplying all but one of the *x*‘s, and therefore using each of the constants as the coefficient of one term; the combined term would have as its coefficient the sum \(-1 + -3 + -5 + \dots + -97 + -99\), which I added using the formula $$\frac{\text{first + last}}{2}\times n = \frac{-1 + -99}{2}\times 50 = -2500$$

Arsh showed his mastery of the material by taking a more advanced perspective, knowing that (a) the linear term of a polynomial is the negative of the sum of its zeros, and (b) the sum of the first *n* odd numbers is the square of *n*, that is, $$\sum_{i=1}^{n}(2n-1) = n^2$$ so that the sum is just \(-50^2 = -2500\).

For examples of finding the sum of consecutive odd numbers either way, see:

General Approach for Sum of Arithmetic Series Adding Arithmetic Sequences Summing Odd Numbers Geometrically

Now for the hard one:

(#1)

Find the coefficient of x^203 in the expression (x – 1)(x^2 – 2)(x^3 – 3) … (x^20 – 20)“7 powers have to be excluded as max power is 210 .So no. of ways in which 7 can be made as the sum of distinct natural numbers is (7, 0) (1, 6) (2, 5) (3, 4) (2, 4, 1) .

This much I have done. I am still wondering why we are excluding powers.”

I think you got the main idea I was communicating in my hint. Each term in the expansion is the product of some powers of x and the negatives of the exponents of the excluded powers (e.g. when x^2 is not used, -2 is).

Since the degree of the polynomial is the sum of integers from 1 to 20, namely 210, and we want the x^203 term, we are adding up terms that

excludepowers that add up to 7, as you say.So for each way to get 7 as a

sum, the coefficient we use is theproductof those numbers. For example, the term formed by multiplying all factors except (x – 1) and (x^6 – 6) is (-1)(-6)x^(210 – 7).Note that the sign of the coefficient is positive when we multiply an

evennumber of factors, and negative when there are anoddnumber.

As an example, one term with \(x^{203}\) will be obtained by multiplying \(-7\) by the power of *x* in each of the other 19 factors: $$(x^1)(x^2)(x^3)(x^4)(x^5)(x^6)(-7)(x^8)(x^9)(x^{10})(x^{11})(x^{12})(x^{13})(x^{14})(x^{15})(x^{16})(x^{17})(x^{18})(x^{19})(x^{20}) = -7x^{203}$$ And another term will use the constants from factors with exponents 1 and 6: $$(-1)(x^2)(x^3)(x^4)(x^5)(-6)(x^7)(x^8)(x^9)(x^{10})(x^{11})(x^{12})(x^{13})(x^{14})(x^{15})(x^{16})(x^{17})(x^{18})(x^{19})(x^{20}) = 6x^{203}$$

Now you can make a table listing your sets of numbers and their products, and see what you get. (But be careful counting the number of factors — there’s a reason I listed as I did in #3, not including 0.)

When you finish, see here to check!

Here is my list (which Arsh had right, apart from inappropriately including 0 with 7, which would have made the product zero):

7

6 + 1

5 + 2

4 + 3

4 + 2 + 1

That’s all there are. So the five terms with degree 203 are \((-7)x^{203}\), \((-1)(-6)x^{203}\), \((-5)(-2)x^{203}\), \((-4)(-3)x^{203}\), and \((-1)(-2)(-4)x^{203}\); adding them up, the coefficient is \(-7 + 6 + 10 + 12\ – 8 = 13\).

The link I provided is to WolframAlpha’s expansion of the polynomial:

$$\prod_{k=1}^{20}(x^k – k) = x^{210} – x^{209} – 2 x^{208} – x^{207} – x^{206} + 5 x^{205} + x^{204} + \mathbf{13 x^{203}} + 4 x^{202} + 2 x^{200} – 8 x^{199} + … $$

The coefficient we want is, indeed, **13**.

This one was harder because (a) the exponent we need is large rather than small as in #3; (b) the constant terms are not all 1 as in #3; and (c) the exponents in the factors are not all 1 as in #2. But it is still relatively easy because the term is near one end of the expansion. A middle term, like x^100, would be unpleasant!

These are very nice problems. You should thank whoever made them up.

A problem that makes you think deeply is a good problem. More math should be taught this way!

]]>First, a 1998 question about the coming software apocalypse:

Year 2000 (Y2K) Problem Can you explain the Year 2000 problem in layman's terms? I keep hearing about code that has to be rewritten and how it's just not possible in the time left. I don't understand why it just can't be rewritten.

Doctor Jeremiah summarized the problem:

This is a very good question. The short answer is "It can be rewritten" but of course then you realize it will take more than two years. Here is why: When you write down a year like 12/23/34 you really mean 12/23/1934. Notice the two extra digits. For the last 40 years all the dates stored in computers have been missing those two digits. Now that the year 2000 is coming, we have two problems: 1)The data in the computers will be wrong.Say you were born on 12/23/34. After the year 2000 the computers will probably think that means 2034 when it really means 1934. So all the data have to be fixed. 2) All the software that people use for entering the data and doing calculations on the data tries to use dates with two-digit years. Once all the data are fixed we can't continue to pretend dates have two-digit years. Soall the software has to be fixed. There are a lot of data and people have been making software that uses two-digit years for 40 years. These two things put together will take a very long time to fix. The problem is that we only have two years left. If we had fifteen then we would be okay. If we had 5 times as many computer professionals we would perhaps be able to do it in two years. But there just isn't enough time or enough people.

All this because the first computers and programs were developed by people with 50 or even 90 years of assuming “’60” meant “1960”, so they (no, “we”) weren’t planning ahead to when it no longer would!

Pretend that it is 12/31/99 and the computers think that means 12/31/1999. Now, when the date changes to 01/01/00 the computers will think that this means 01/01/1900. Say your bank is giving you 3 percent interest annually and you have $1000 in the bank. The interest is 8.1 cents per day. But going from 12/31/1999 to 01/01/1900 is -100 years (-36500 days instead on just +1 day). If they added the interest for this many days they would have to subtract $2956 from your account and then mail you a letter saying that you owed them $1956. So you can see that it is a big problem. It can't be fixed fast enough and the consequences are really difficult.

But nothing big happened, in part because of all the work we put in to make sure everything was either fixed or didn’t matter. And we were all relieved. For details, see Wikipedia.

But most questions were about whether to call 2000 the start of a new century or millennium. Here is the first such question in our archive, at the start of 1999 (there had been a few others that didn’t make it in):

Millennium and the Year 0 I am doing a science project on when the new millennium really begins. I already know thatit truly begins in the year 2001becausethere was no zero year between B.C. and A.D.I was wondering if you knew why or could give me some sites about why the early mathematicians didn't let a whole year pass before naming it one. I would also appreciate any other information you could give me about my project. I have already looked it up under many different subjects in Encarta 98 and tried tons of different ways to get information on the Web, but I'm having trouble finding information.

Katie understood that because there was no year 0, the first 1000 years A.D. were 1 through 1000, so the second millennium started in 1001, not 1000; and the third millennium started in 2001. (We’ll see some other opinions on that!) Her question was, **why was there no year 0?**

Doctor Rick answered that question:

Thanks for asking this question, it's a good one. To answer it, you will need to look at thehistory of the calendar, and thehistory of math. BC dates were not used in the BC era. BC means "before Christ"; that is, before the birth of Christ. Before he was born, people (even the relatively few people who were expecting his birth) did not know just when it would be, so they couldn't date their calendars that way! As a matter of fact, AD and BC were not invented until around AD 525, by Dionysius Exiguus. In AD 525, people in Europe didn't have a clear idea about negative numbers. In fact, it wasn't until 1657 that a mathematician (John Hudde) used a single variable to represent either a positive or a negative number. For all those years until 1657, positive and negative numbers were handled separately. Nobody drew a number line with positive numbers on one side, negative numbers on the other, and 0 in between.

So positive, negative, and zero were not thought of as three parts of one number line, but as three separate cases: before, at, and after. There was no thought of using a single quantity that could mean any of those.

Let's get back to Dionysius. He identified the year 1 AD ("1 Anno Domini," the first year of the Lord) as the year that Christ was born (he was probably off by 4 to 6 years). The previous year was 1 BC, the first year "Before Christ." (I have not figured out why one abbreviation is in Latin while the other is in English.) Dionysius would not have thought of 1 BC as the year -1. He would not have thought of putting BC and AD together on a number line (timeline). BC and AD were two separate cases. To find the time between two AD dates, you would take their difference. To find the time between an AD date and a BC date, you would add them and subtract 1. This would not be seen as a problem. It's just the way they solved other kinds of problems (like quadratic equations, if you've seen them) - as a set of special cases.

So there was no year 0 because there was no 0 (yet).

For a similar answer later in the year, see

First Day of the 21st Century

Here’s another question, near the end of 1999:

The Second Millennium I have heard debates aboutwhether the second millennium actually starts on the year 2000or if in fact it starts on the year 2001. My belief is that it starts on the year 2001 because the number system starts at the number 1 and not 0. I think about counting from 1 to 10. I think of 10 as the last number of that series and 11 being the beginning of the next series. The beginning is where the counting starts which I thought was number 1. Another way for me to look at it is in the area of grades in school. In school, if a student does not do an assignment assigned to do he/she will have a 0. If students do the assignment, they may receive between 1 and 100 [not 99] based on how much they completed and how near to perfect it is. If the start of the millennium is not based on math or logic, then what is it based on? My wife says it's not based on our modern mathematical system but rather on the basis of when 1 BC ended, that the years started counting up from 0 and then on up to 1 AD and so on. She says that the zero was counted by the ancient people in their form of counting. I would like to read or hear your view on this before I go any further. Is there a right or wrong way to look at this debate, or can it be a never-ending debate?

I answered this time:

Yes, this can be an endless debate, because it's really about words as much as math, and words always leave room for disagreement, even though mathematically there's only one answer. But there are some interesting ideas attached to it, and I'll take this opportunity to write out some things that I haven't heard anywhere else. We have an answer to some of your questions in our archives at: Millennium and the Year 0 http://mathforum.org/dr.math/problems/katie1.3.99.html This deals with the fact that there was no year zero, because people didn't understand the concepts of zero and negative numbers yet when the current system of numbering years was started. The year "AD 1" meant "the first year of [not 'after'] the Lord," and the year "1 BC" meant "the first year before Christ." Neither they nor we talk about the "zeroth year," so you can see why 0 didn't seem necessary. It's only when you try to do things like calculate the number of years between 5 BC and 5 AD that you find it would be more convenient if 5 BC could be treated as -5. But one result of this is that, with no year zero, the first century had to be years 1 to 100, not 0 to 99.

This just recaps what Doctor Rick said. But I’d thought a little further:

On the other hand,having a year zero wouldn't quite solve all the confusion. Suppose there had been a Year Zero, in which Christ was born, say on Jan. 1 to keep it simple. Then Jan. 1 in the Year +1 would be one year after, and Jan. 1, Year -1, would be one year before the birth. But what would you call the first centuries AD and BC? If you include 0 in the"first positive century,"so it consists of the years 0 - 99, then it can't also be in the"first negative century,"which would still have to be 1 - 100 BC (or -1 to -100). Or you could make a case, especially if the birth were, say, on July 1, that the Year Zero was neither "before" nor "after" Christ, but should be kept separate, as 0 is neither positive nor negative. Something would still be wrong. Maybe it's really better not to have a Year Zero, so we don't have to debate over whether to think of it as AD or BC. The real issue is just thatordinal numbers like "first" don't fit well with negative numbers and zero. As you pointed out, we count starting with 1, not 0 (though 0 is lurking in the background, as the number we had before we started counting); yet that gives you only 99 counting numbers before you need a new digit, and naturally want to say you've started a new century. Notice, by the way, that there is no "Century Zero" either; and I can't imagine calling all the years from 0 to 99 the "zeroth century." Yet no one questions that the second millennium starts after, not in, the 20th century.

By focusing on centuries or millennia alone, we fail to see that “fixing” one layer does not “fix” the next. If we make the years include a Year 0, we are still probably not going to call anything “Century 0”, or the “Zeroth Millennium”. If we count starting at “1” or “first”, things called “0” are not going to fit.

To look at this another way, the integers really represent onlypointson a number line, notintervals. "Zero" doesn't last a whole year, but is just a moment in time. We could diagram the years like this: | <---BC|AD---> 5 4 3 2 1 | 1 2 3 4 5 year names <---+---+---+---+---+---+---+---+---+---+---+---> -5 -4 -3 -2 -1 0 1 2 3 4 5 time in years There was a point in time, midnight Jan 1, 1 AD, that we can callTime 0. The year from Time 0 to Time 1 is the first "positive year" and the year from Time -1 to Time 0 is the first "negative year." These years are "read" in opposite directions: it's the _end_ of 1 AD that is actually one year after 0, and it's the _beginning_ of 1 BC that is actually one year before 0. Year names are not coordinates of moments of time (we don't talk about date 1999 years, 11 months, and 30 days) but labels (the 30th day of the eleventh month, called November, of year 1999) for intervals of time. Since the first century covers the time from Time 0 to Time 100, it includes all of the years 1-100 in this scheme.

In other words, the names we give to years (or centuries or millennia) don’t behave like numbers, so it doesn’t really make sense to treat them as such. This is even more so when we look *inside* a year:

This scheme doesn't allow for negatives; we don't reverse the order of the months in BC years, calling November "negative February." Yet we do reverse the significance of the year's name; so dates don't work as neatly as numbers - there's no way they could and still make sense. The 0 doesn't divide "negative time" from "positive time" in any real sense (seasons don't reverse when you go negative).

Negative mixed numbers like \(-3\frac{1}{4}\), as we’ve seen recently, are treated like \(-\left(3+\frac{1}{4}\right) = -3-\frac{1}{4}\); both the whole part and the fraction are negated. But “negative mixed dates” like April 1, 3 B.C. don’t work that way – the month is always measured positively, going forward in time.

I had more to say, but you get the point. I closed,

But I don't think any of this really matters. I say 2000 is the start of the next millennium for all practical purposes; we just have to be careful to call it "the 2000's" rather than "the 21st century" or "the second millennium." Similarly, 1900 was the start of the 1900's, though 1901 technically started the 20th century.

It’s a matter of words, not of math.

Today, I see similar questions about whether 2020 is the start of a decade. To me, the answer to this one is simple: If you are asked when the **203rd decade** starts, that’s 2021. But if it’s about the **2020’s**, they definitely start in 2020! (What would you call a decade that starts in 2021 and includes 2030?) *Every* year is the start of *a* new decade; it’s what you *call* that decade that counts.

In the first month of Y2K, we had a question from a public radio host:

The Third Millennium Hello Dr. Math, My name is Bruce Hutchison. I am the anthropologist co-host of a new, nationally syndicated public radio program called "The Big Picture" with Bruce and Melissa. Anthropologist Melissa Farncomb and I look at why people do the things they do, across time and cultures (usually in a lighthearted way)! We're recording this week's show on The Millennium and Prophesies. We have a question for you for our show, to which we'd be delighted to give you credit: When is the "true" millennium, and why?

Doctor Ken answered:

Hi Bruce, Glad to help out, I'm a public radio fan myself. My name is Ken Williams, and though I can't speak for all the Dr. Math volunteers (there are over 200 people who can answer Dr. Math questions these days), I'm the founder of the service, so sometimes I take on these kinds of spokesperson duties. Regarding the question about when the "true" millennium begins, I actually believethat's a better question for an anthropologist than a mathematician. The word "millennium" simply means any period of 1000 years, though it's natural for us humans to want to start some millennium at a known point in history and keep dividing the eons into consecutive millennia thereafter. Therefore, if we're going to talk about a "true" millennium, we should probably fix some important event in the past and count forward 1000 and 2000 years. Supposedly, we've done this with the birth of Christ. Seems simple enough - just count forward 2000 years from the nativity, and pencil in a millennium celebration on the calendar. Well, the problems with that are numerous. First, since our years are actually enumerated as "the 1999th year of our lord," it seems we actually started counting at the year 1, i.e. "the first year of our lord."That's essentially the argument of people who say the millennium begins next year.

(That is, in 2001.)

Did we actually start counting like this, from the year 1? Of course not - the present-day Gregorian calendar, which is reasonably accurate and reliable, wasn't adopted until the year 1582 AD (for English-speaking countries). Before that, people used the Julian calendar, which had been in use since about 4 A.D. and was recalibrated in about 527 A.D. to count years from the birth of Christ. Previously it counted from the founding of the Roman Empire. To perform this recalibration Roman scholars did the best they could, but modern scholars seem to think they were off by a few years. Furthermore, 10 or 11 days were actually deleted from the calendar in 1582 when we shifted to the Gregorian calendar - should we adjust for those too, and have the big party on Jan. 10, 2002? I think not. And finally, if Christ was actually born on Dec. 25, then _that_ year can be considered "the first year of our lord," i.e. the first year of the new millennium, and the following year (year 1) is the second. Which would imply that 2000 ushered in a new millennium.

This assumes the original Christmas was just *before* the Year 1. But since the years are something of an approximation anyway, who cares?

In short, since the historical/calendric situation is so messy, I believe thatwe should measure the millennium by noticing when the big party is, and Prince doesn't party like it's 2000. I think we're in the new millennium now.

He went on to answer another question they’d asked. And we can move on, too.

I’ll be following this up with a few topics on dates, starting with another 2020 issue: leap years.

]]>As we approach a new year, I want to start cleaning up a backlog of recent questions, and start posting more typical interactions, rather than waiting for the most momentous. Many of these will therefore be relatively short! This one goes back to last July, but it connects to a post from last year about the terminology of linear equations.

Here is the question, from Linda, a teacher:

Are linear functions always continuous, or can they be discrete (as in an arithmetic sequence)?

The definition given by NCTM in The

Common Core Mathematics Companiondefines alinear functionas, but a physicist and mathematics teacher is sayinga relationship whose graph is a straight linelinear functions can be discrete. I always assumed they had to be continuous because lines are continuous. However, I am not well versed in high-level maths and want to be sure I give an accurate definition.I am so grateful a group of you volunteer to continue the legacy of Dr. Math. Thank you, thank you!

Their definition clearly says that this is a linear function:

But does it mean that this isn’t, because the graph is only a set of separate points?

Doctor Fenton replied:

Hi Linda,

I think you are asking whether the term “linear function” can be used to describe

a function whose domain is a discrete set, such as the positive integers. Such functions are very useful, because we often want to know such things as the cost of producing n objects, given a start-up cost and cost of the materials for each object, for example. That would be described by an equation of the form C = kn + F, where F is the fixed cost (of the machine producing the objects), k is the cost of the material needed for each object, and n is the number of objects produced.

This is a very common type of function in real life, where the input, *n*, is restricted to non-negative integers, while the form of the equation is such that if *n* were replaced with a variable *x* that can take real values, its graph would be a straight line. In fact, that is what my two graphs above are, with *k* = 0.25, and *F* = 3.

The NCTM description

apparently assumes that the domain of the function is a continuum, a subset of the real line, but I don’t see any reason not to use the same terminology for such a function on a discrete set like the positive integers. You could modify the NCTM description to say thatthe graph consists of points which lie on a straight line. I call this a description rather than a definition, because I consider it too vague to be a definition. It also ignores the possibility that the relationship could be of the form x = constant, which is a vertical line, but is not a function (and in particular, not a linear function). In fact,I would call it an affine function, or linear polynomial, rather than a linear function, which would be more in line with the way “linear” is used for functions in linear algebra.

This small change, from “**is** a straight line” to “lie **on** a straight line”, that is, “is **part** of a straight line”, is huge!

And the observation that the only difference between the two cases is the **domain**, is an important clarification. To a mathematician, the domain is an essential part of the function (my two graphs above are graphs of *different* functions), but the relationship can be otherwise the same, and that is what makes it linear, not the domain. It’s possible that the NCTM authors were thinking only of the relationship, and not of the domain.

I’ll have comments on the last sentence, about affine functions, below.

Linda responded,

Thank you so much for clarifying the concept of linear functions, Dr. Fenton. I’ll use what you have suggested, “a relationship whose graph consists of

points which lie on a straight non-vertical line,” which is likely a sufficient description for grade 8 students.

I joined the conversation with two supplemental thoughts. First:

Hi, Linda.

I’d like to add just a couple additional ideas.

I fully agree with Doctor Fenton’s thoughts, particularly his statement, “I don’t see any reason not to use the same terminology for such a function on a discrete set like the positive integers.”

It is very common for educators to state definitions that are a little too restrictive, or a little too loose, based on their own contexts. The concept of a linear function

startswith the idea of a straight line (hence the term “linear”); and we generally introduce it in the context of functions of a real variable, where the graph is literally a straight line. The functions you are referring to are simplyrestrictions of linear functions to a discrete domain, and the name still makes sense in that context, as in fact the graph is stillpartof a straight line.

Generalizations from a basic starting point are common in mathematical definitions; educators may stick with the starting point, focusing on where the student is, and so may not look ahead to where the student may be later.

Second:

You may be wondering about Doctor Fenton’s mention of an alternative definition by which what you know as linear functions are properly called “affine functions”. For a brief summary of that distinction, see Wikipedia on Linear function. This distinguishes the

two contextshe referred to; everything before college (and much in college for non-math majors) lies in the first context, where “linear” means what we are discussing.In a further Wikipedia page on Linear function (calculus), there is a reference to “Arithmetic progression, a

linear function of integer argument“, which exactly fits your question. Therelationshipis linear; thedomainis discrete.Last year I discussed the term “linear equation” with an emphasis on how the term has been broadened from its initial literal mean of “line”; what you are asking about is a considerably smaller modification than the issue there!

The first Wikipedia article identifies the two contexts as

- “
**In calculus, analytic geometry and related areas**, a linear function is a polynomial of degree one or less, including the zero polynomial (the latter not being considered to have degree zero).” – we could describe this as “calculus and below”, which includes high-school level algebra. This is where the equation of any line is considered linear. - “
**In linear algebra**, a linear function is a map*f*between two vector spaces that preserves vector addition and scalar multiplication: \( f(\mathbf {x} +\mathbf {y} )=f(\mathbf {x} )+f(\mathbf {y} )\); \(f(a\mathbf {x} )=af(\mathbf {x} )\)” – more broadly, this is related to*abstract*algebra, which goes far beyond high-school algebra, taking it to any sort of structure that is comparable to numbers and their operations. Here, “linear” is restricted, in effect, to lines through the origin – though in this context, we are far beyond such simple graphs.

This can be confusing! For a little on the relationship between high-school algebra and abstract algebra, see

The Algebra that High School and College Share in Common

Linda responded:

Hi, Dr. Peterson,

Thanks so much for your helpful reply and links. You make a good point about definitions that are too loose or too restrictive, based on our own contexts as teachers (I fell right into that trap myself). I also appreciated reading about the two distinct concepts for the phrase

linear function, which I had not considered. A linear function with a discrete domain is exactly what an arithmetic sequence is, and its points certainly lie on a line. I think the most helpful part of your answer was the discussion onlinear equation.It gave me a good deal to think about. The discussion and points you bring up with Christine will help me better understand confusion about the use of the word “linear” with regard to all students, but particularly ESL students.Thanks again for your time, and for such a thorough and understandable reply.

Linda

One of the tricks in teaching, when you know more advanced math, is to recognize the context of a question, and use language appropriate to it! And Linda’s laudable desire to use accurate definitions that will be suitable for her level, but will not become inconsistent with later learning, for those who go further, is complicated by the fact that language sometimes changes as you advance. But I think we have done as well as we can.

]]>The first reference to the method I have found in our archive was in 1997:

Least Common Multiple The question I have is about how to find the least common multiples from a set of numbers. I know that a multiple of a number has that number as one of its factors. What is the least common multiple for the numbers 5 and 25? Is there a stated rule or definition for least common multiples? Thanks!

This is actually a spectacularly easy example, as 25 is itself a multiple of 5, so that is the LCM. But the question is mostly a request for a general method. Doctor Sebastien answered with a method different from the others we’ve seen:

The least common multiple (L.C.M.) of a set of numbers is the smallest number that is a multiple of all numbers in the set. The way I was told to find the LCM of a set of numbers was 1. Align them in a line. 2. Then divide all numbers by an appropriate integer. 3. If any number is not divisible by that integer, don't divide that number and leave it untouched. 4. Repeat steps 2 and 3 until all 1's are obtained. 5. Then multiply all the divisors together. The answer is the LCM. To better explain what I mean, I will find the LCM of 5 and 25. STEP 1: 5, 25 1, 5 ------- STEP 2: 5 | 5, 25 1, 1 -------- STEP 3: 5 | 1, 5 In the previous step, the 1 is left untouched because it is not divisible by 5. The LCM is then 5*5 = 25.

Here we saw that we could divide both numbers by 5, so we did that, and were left with 1 and 5. Now we divide only the one number that can still be divided; the LCM is the product of all the divisors we used.

Let’s go a little beyond the example he gave …

One way to organize this is to pile one division on top of another:

1 1 --------- 5 ) 1 5 <-- divide only 5 by 5 --------- 5 ) 5 25 <-- divide both by 5 ^ | +--- LCM = 5*5 = 25

Let’s try it for a hard case; I’ll use 100 and 120:

1 1 ------------ 6 ) 1 6 <-- divide only 6 by 6 ------------ 5 ) 5 6 <-- divide only 5 by 5 ------------ 2 ) 10 12 <-- divide both by 2 ------------ 10 ) 100 120 <-- divide both by 10 ^ | +--- LCM = 10*2*5*6 = 600

Notice that we don’t have to divide by primes; I saw 10 as an obvious divisor, so I used it. Also notice that at the end, I didn’t really have to divide by the 5 and the 6, as long as I saw that there were no common divisors left. I could have just used them as the last factors:

5 6 <-- no common factors left ------------ 2 ) 10 12 <-- divide both by 2 ------------ 10 ) 100 120 <-- divide both by 10 ^ | +--- LCM = 10*2*5*6 = 600

This is a more refined version of the method, which we’ll be seeing below with even more added features.

A 2012 question specifically asked about this method:

Layers of Least Common Multiples I recently learned how to find the least common multiple (LCM) of two or more numbers using "theupside-down birthday cake method." For example, if you were looking for the LCM of the numbers 14 and 18, you would draw an "L" or upside down division "house" with a long base, and put the 14 and 18 on the base. Then you put a common factor outside the "L," and underneath each of the numbers, you write the other factor. (This is much easier to show than explain; my apologies.) When you arrive at a layer where there are no more common factors (besides one), you multiply the numbers outside the "L" on the left with the numbers in the bottom-most layer. Why does this work? I'm trying to understand the why/how aspect. I know it's breaking the numbers down into common factors...?

Here we are flipping my stack of divisions upside-down, but it’s the same idea. Doctor Ian answered, first showing his understanding of the method (which was in fact well explained):

Hi Zoe, I think you mean something like this; using a slightly more interesting pair of numbers, 12 18 _________________2'| 6 9 <- 12 = 2*6, 18 = 2*93'|2'3'<- 6 = 3*2, 9 = 3*3 ^ |________________________ Multiply the terms marked with a ' to get the LCM. Is that right?

What Zoe described as “the other factor” on the inside can be just as well called “the quotient”, the result of dividing by the factor on the left. The LCM is \(2\times3\times2\times3 = 36\), which is indeed the LCM.

So, why does this work? He compares it to what I called Method 2b last time, listing prime factors of each number and pairing them up:

If so, maybe it's easiest to see what's going on if you think about the more normal way of doing this, which is to break both numbers into prime factors: 12 = 2 * 2 * 3 18 = 2 * 3 * 3 The least common multiple will be the one that shares all the prime factors. In this case, it's 36: These are not shared; they are the ones that end up at the _____________ bottom in the "cake" method. | | v v 12 = 2 * 2 * 3 18 = 2 * 3 * 3 LCM = 2 * 2 * 3 * 3 ^ ^ |_______|_________ These are shared; they are the ones that end up to the left in the "cake" method. (Do you see why collecting factors like this gives us the smallest number that can be divided by both 12 and 18? If we remove any of those prime factors, we'd be missing at least one prime factor from one of the numbers. If we add any more prime factors, we'll have a number that is larger than we need.)

Whether you divided separately by the common prime factors 2 and 3, or all at once by the common factor 6, you will still get the same result in the end.

What you were doing was a little harder, since you have to keep identifying common factors -- but it amounts to the same thing: 12 = 2 * (2 * 3) 18 = 2 * (3 * 3) Identify the first common factor 12 = 2 * 3 * (2) 18 = 2 * 3 * (3) Identify another one 12 = (2 * 3) * (2) 18 = (2 * 3) * (3) No more common factors. The product we've pulled out contains the shared prime factors, and the remaining ones are not shared.

The benefit of the method is that you don’t have to find prime factors first; you can just take it as you see it.

The downside is that you have to *see* common factors, which is not always easy without using primes:

However, pick two numbers with less obvious prime factors -- for example, 1938 3534 ___________________ 2 | 969 1767 3 | 323 589 It might be tempting to quit at this point, thinking that this is the LCM: 2 * 3 * 323 * 589 = 1,141,482 Now compare that to using the prime factor method: 1938 = 2 * 3 * 17 * 19 3534 = 2 * 3 * 19 * 31 LCM = 2 * 3 * 17 * 19 * 31 This way, it's easy to see that the LCM is actually 2 * 3 * 17 * 19 * 31 = 60,078 This is still large, but significantly smaller.

What happened here is that there were (intentionally) some larger prime factors that you might not think to try.

So the nice thing about the prime factor method is that there's no way to quit too early. Also, it directly relates the idea of prime factors to the idea of "least common multiple," and doesn't require you to memorize a made-up method for calculating that without really understanding what you're doing. :^D

On the other hand, you are in fact focusing on common *factors*, and pulling those out is just what you need to make a common multiple as small as possible.

By the way, have you noticed that the left-hand-column of the work is the GCF? The method amounts to saying, $$\text{LCM}(A,B)=\frac{AB}{\text{GCF}(A,B)}=\text{GCF}(A,B)\cdot\frac{A}{\text{GCF}(A,B)}\cdot\frac{B}{\text{GCF}(A,B)}$$

Zoe wasn’t quite satisfied:

Thank you very much! I guess I understand slightly better... My only immediate thought is that in making prime factor trees (if that was the method to find the prime factors of each), couldn't one make the same mistake in prematurely believing one has enumerated all the prime factors? In short, the "danger" of stopping short still seems possible. It's so frustrating to not have the deeper understanding :(

Exactly a point I was going to make! When there are larger primes to discover, you can just as well miss them while looking for prime factors. (This is where the Euclidean algorithm comes to the rescue, for very large numbers.)

Doctor Ian had more to say:

Stopping short could happen, but if you're used to finding prime factorizations -- which is something that you do in lots of different contexts -- then it seems less likely. And you can use things like tables of primes to check whether you're down to primes or not. For finding common factors of two numbers, on the other hand, there's nothing comparable. So I think the two "dangers" are slightly different in nature.

If I were looking for those remaining common factors, I would probably be going through a list of primes and trying one after another, whichever method I was using. That work is not shown in either method, usually.

But how about that matter of “understanding”?

I agree it's frustrating to lack deeper understanding, and we shouldn't stop until we have it. On that note, I'm not sure what you're not understanding at this point! Do you understand why, when we have prime factorizations for two numbers, e.g., ... 12 = 2 * 2 * 3 18 = 2 * 3 * 3 ... we can collect those in different ways to find the greatest common factor (GCF) and the LCM? 12 = 2 * 2 * 3 18 = 2 * 3 * 3 GCF = 2 * 3 LCM = 2 * 2 * 3 * 3 In some sense, the "deepest" you can go here in terms of explanation is theFundamental Theorem of Arithmetic, which says that every integer greater than 1 has exactly one prime factorization, and every prime factorization corresponds to exactly one number. Are you familiar with that?

The FTA tells us that we can always *find* a prime factorization, and there is *only one* correct answer (as long as you ignore order, or always write the primes in increasing order).

Think of prime factors as a kind of x-ray: they let you see the internal structures of numbers. For example, I could have a bunch of numbers: 51 391 731 816 These might not seem to have anything in common -- but when I look at their "x-rays," I can see that they all share one multiple in common: 51 = 3 * 17 391 = 17 * 23 731 = 17 * 43 816 = 2 * 2 * 2 * 2 * 3 * 17

Primes are the “bones” of numbers, and seeing them is very helpful!

Is there anything about this that still seems mysterious to you?

Now Zoe got it:

Yes! That did it! Thank you!! I was not familiar with the Fundamental Theorem of Arithmetic, but it clicked as soon as you compared it to an x-ray and looking at what the number is made up of!

So we’ve seen both how the method works, and why it is not the best. But it’s still yet another tool in our toolbox, to be used when the numbers are fairly small; if we are unsure whether we’ve found all the common factors, it’s time to pull out the x-ray machine!

In 2006, a student had submitted what amounts to the same method:

One Approach to Finding LCM and GCF at the Same Time I just wanted to show you something I learned recently on how to find the LCM and GCF at the same time. You make a chart with the two numbers in question, let's say 12 and 8: 12 ** 8 Now you decide what number can go into both, like 2 or 4. Let's choose 4, and write it on the left: 12 ** 8 4* Now ask how many times does 4 go into 12 and put it under the 12, then same with 8: 12 ** 8 4* 3 ** 2 Now make sure you can't put any number other than 1 into 3 and 2 (if we chose 2 in the first place we would have to do the process again). Anyway we're done with this one, now the 4 in the left is the GCF and then we multiply the GCF with the bottom row (in this case the 3 and 2) ... 4 x 3 x 2 = 24 which is our LCM.This also works with 3 numbersbut they have to all have a GCF other than 1 otherwise it's more work and not really worth the hassle. Hope this can help others!

I replied, comparing it to the way we simplify fractions in small steps rather than having to find the GCF and simplify all at once:

Hi, Lindsay. Thanks for sharing your method. I like it! It corresponds to what I recommend in simplifying fractions, that you take it in steps, just dividing by whatever you see that is a common factor, and then repeat until there's nothing left. In fact, that's exactly what you're doing here, with the bonus of getting the LCM at the end.

When I say that is what she is doing, I mean this: Her work is just what you’d do in simplifying \(\frac{12}{8}\) by dividing both numbers either by 4 all at once, or by 2 and then by 2 again. The GCF is the product of all the numbers you’ve divided by. The new thing is that the LCM is the product of that and the numbers in the simplified fraction!

Let me try it in a more complicated case. Suppose we want to find the GCF and/or LCM of 54 and 90. I first see that they are both even, so I divide by 2: | 54 | 90 --+----+---- 2 | 27 | 45 Now I see that 27 and 45 are both multiples of 9, so I divide by that: | 54 | 90 --+----+----2| 27 | 459|3|5Now I can't divide any more. The GCF is the product of the numbers down the side, 2*9 = 18, and the LCM is the product of the whole L on the left and bottom, 2*9*3*5 = 18*15 = 270. At the same time, the ratio 54:90 or the fraction 54/90, simplified, is sitting there as well, 3:5 or 3/5.

This example is more typical, and shows the value of the method (when the final numbers are small enough to be sure they are relatively prime).

Also, it seems very natural that the product of the factors should be the GCF, so it's easy to remember how to get that. The LCM is more magical, but I can see how to explain why it works: in order to get a multiple of 54, we have to multiply the GCF by the 3, and in order to get a multiple of 90 we have to multiply by the 5, so using both gives us a common multiple.

We can relate this to the Venn diagram method from last time:

The intersection (GCF) is the left column, and the left and right parts are the bottom row. Their product is the LCM.

How about three numbers? I don't think the LCM part would work at all. I'll try this one: | 54 | 90 | 70 --+----+----+---- 2 | 27 | 45 | 35 No, the LCM isn't going to work, since we only need one extra 5, for example, not both 45 and 35 in the mix--do you have a way to do it? I think I can come up with something, but not just now.

In 2010, Michelle took me up on the idea of extending the method to three numbers, in addition to asking for more explanation:

LCM and GCF, Combined: Why and How On 03/02/2006, Doctor Peterson answered a question about a method for finding the least common multiple (LCM) and greatest common factor (GCF) at the same time. Basically, you keep taking common factors out until there is nothing else in common. The product of the GCF column ends up being the GCF, and the GCF multiplied by uncommon factors is the LCM. I understand how to use this method but I am still confused as to why the method works for LCM --it seems like magic instead of math-- and why it does not work when comparing three numbers.I have been trying to come up with my own method for triples, but I have been unsuccessful. Please help soon. I mainly need a good way to explain why the method works. Here's an example with two numbers: GCF / 12 / 20 4 / 3 / 5 According to the method, GCF = 4 LCM = 4 * 3 * 5 = 60 Here's an example with three numbers: GCF / 10 / 4 / 20 2 / 5 / 2 / 10 So, GCF = 2 LCM = 2 * 5 * 2 * 10 = 200 But the LCM for those three numbers is actually 40. How do I fix this? And why does it work for two numbers in the first place?

I answered, “showing the bones” as Doctor Ian did:

Hi, Michelle. I DID explain how the LCM works there; but there are other ways to say it. Let's write the numbers as products of (powers of) primes to see more clearly what is happening. I'll do it in two steps rather than one, to make it somewhat more typical: | 4*3 | 4*5 --+-----+----- 2 | 2*3 | 2*5 2 | 3 | 5 The GCF is the product of the numbers on the left (the divisors), because 12 is 2*2*3 (the GCF times what's left over), and likewise 20 is 2*2*5. Now, how do we find the LCM? We can start with the GCF and multiply by whatever else we need to get each number. In each case, we need to multiply by that left-over number at the bottom of the column. Starting with 4, we have to multiply by 3 to get a multiple of 12; and by 5 to get a multiple of 20. So the smallest possible multiple of both is made by multiplying the GCF by BOTH 3 and 5: 2*2*3*5.

Applying a method to a more visible case (doing it under x-ray, we might say) can be a good way to observe how it works!

In general, two numbers a and b can each be written as multiples of their GCF (say d), so that a = dx and b = dy. Then the product of the factors on the left will be d, and the numbers on the bottom will be x and y. The LCM is dxy, since this is a multiple of both dx and dy, and no smaller multiple will work. | dx | dy --+----+---- d | x | y GCF = d, LCM = dxy

By this time I had taught a Math for Elementary Teachers course, whose textbook included this method, so I had an answer (which, it turns out, was hidden in the 1996 method we started with, which I had probably never seen):

I've since learned a way to do this for more than two numbers. All we do iscontinue dividingafter we have run out of common divisors,using factors of some, rather than all, of the numbers. Here is the work for the example I tried on that 2006 conversation that you referenced: | 54 | 90 | 70 --+----+----+---- 2 | 27 | 45 | 35 <-- 2 divides ALL the numbers --+----+----+---- 9 | 3 | 5 | 35 <-- 9 divides TWO of the numbers 5 | 3 | 1 | 7 <-- 5 divides TWO of the numbers Once we are down to only distinct primes in the bottom of the columns -- or, at least, the numbers arepairwise relatively prime-- we have both the GCF (2), from the top part of the left column; and the LCM (2*9*5*3*1*7 = 1890), from the entire left and bottom.

It’s important to continue until *no two numbers* at the bottom have any common factors.

For comparison, the usual method gives 54 = 2^1*3^3 90 = 2^1*3^2*5^1 70 = 2^1 *5^1*7^1 -------------------- GCF = 2^1 = 2 LCM = 2^1*3^3*5^1*7^1 = 1890

I do think that method is clearer and surer; but this method still has interest.

]]>