3

There are 2 periodic cicada species in my area. One emerges every 13 years. The other every 17 years. Both are prime numbers, which is interesting but not necessarily related to my question.

I was curious as to how frequently we'd have a year where both, the 13 and 17 year species, emerged during the same year. I created a C# program in LinqPad to find the answer (code and result below, if you are interested), which happens to be once every 221 years.

I mentioned to a co-worker that I would like to know what mathematical formula might describe how to derive that answer. The coworker pointed out "just multiply the two numbers together."

So, my question is why does multiplying the two frequencies together give me the year intervals (221) they coincide? I see that it does, but am not able to visualize why.

   List<int> iteration13 = new List<int>();
   List<int> iteration17 = new List<int>();

   // Pretend they coincide at start of year 2000.  
   int iStartYear = 2000;
   int iEndYear = 3000;

   for(int i = iStartYear; i<= iEndYear; i += 13)
   {
          iteration13.Add(i);
   }

   for(int i = iStartYear; i<= iEndYear; i += 17)
   {
          iteration17.Add(i);
   }

   var intersections = iteration13.Intersect(iteration17);
   intersections.Dump("Intersection of 13 and 17 year cicada emergence");

Result:

  • 2000
  • 2221
  • 2442
  • 2663
  • 2884

3 Answers3

1

Hint Suppose both species emerge in the years $y, y'$. Since the $13$-year species emerges in both years, we must have $13 | (y' - y)$; similarly, $17 | (y' - y)$. So, $y' - y$ must be divisible by $13$ and $17$, but the smallest number divisible by both is $\text{lcm}(13, 17)$. Since $13$ and $17$ are distinct and prime, they are coprime, and so the least common multiple is $221$, and so $221 | (y' - y)$.

If we had two species with noncoprime emergence periods of $p, p'$ years, then if there emergences ever coincide, the coincidences occur every $\text{lcm}(p, p')$ years, but it is also possible that they never coincide: Consider the simple case that $p = p' = 2$, but one species emerges in even-numbered years and the other in odd-numbered years.

Travis Willse
  • 108,056
0

If cycles, having lengths $m$ years and $n$ years, start out coinciding at year 0, they will then coincide at every year that is an integer multiple of both cycle lengths (their "common multiples"). That is, those years that equal both $a \times m$ and $b \times n$ for some integers $a$ and $b$. If the cycle lengths $m$ and $n$ are distinct prime numbers, as in your case, the least common multiple will be their product. Wikipedia has a thorough discussion of least common multiples.

0

Let us say Cicada type A emerges every $17$ years, and type B emerges every $13$ years.

So, $17$ years from now A will return.

Will B return in $17$ years? No, because $17$ is not a multiple of $13$.

Okay: We wait another $17$ years. Now we've waited $34 = 2 \times 17$ years.

Will B return then? Equivalently: Is $2 \times 17$ a multiple of $13$?

No: Every number can be factored uniquely into a product of prime numbers (this is called the fundamental theorem of arithmetic) and, since there is no $13$ to be found in the product $2 \times 17$, we know that it is not a multiple of $13$.

And so we wait another $17$ years, which puts us at $51 = 3 \times 17$ years.

Is $3 \times 17$ a multiple of $13$? No: The same problem has arisen, i.e., there is no $13$ in this product.

Continuing in this way, we get various other numbers. For example, $12$ A cycles in we have waited for a total of $204 = 12 \times 17 = 2^2 \times 3 \times 17$ years. Still, you can see from the prime factorization that this is not a number divisible by $13$.

Only after $13$ of the A cycles do we have what we want!

We've then waited a total of $221 = 13 \times 17$ years. Type A returns, because a full $13$ A cycles have passed; type B returns, because a full $17$ B cycles have passed.

Now: True clarity arises only if you check what happens when you have different numbers.

For example, instead of $17$ and $13$:

  • How about $8$ and $6$?

  • How about $8$ and $4$?

  • How about other numbers of your own choosing?