Problem
of the Week
Problem
C and Solution
A
Small Leap

Problem

Most people think of a year as \(365\) days, however it is actually slightly
more than \(365\) days. To account for
this extra time we use leap years, which are years containing one extra
day.

The flowchart shown can be used to determine whether or not a given
year is a leap year. Using the flowchart, we can conclude the
following:

\(2018\) was
not a leap year because \(2018\) is not divisible by \(4\).

\(2016\) was a leap year because
\(2016\) is divisible by \(4\), but not \(100\).

\(2100\) will
not be a leap year because \(2100\) is divisible by \(4\) and \(100\), but not \(400\).

\(2000\) was a leap year because
\(2000\) is divisible by \(4\), \(100\), and \(400\).

How many leap years are there between the years \(2000\) and \(2400\), inclusive?

Start with a year and proceed through the following steps:

Is the year divisible by \(4\)?

If NO, then the year is not a leap
year.

If YES, then go to 2.

Is the year divisible \(100\)?

If NO, then the year is a leap year.

If YES, then go to 3.

Is the year divisible \(400\)?

If NO, then the year is not a leap
year.

If YES, then the year is a leap year.

Solution

From the flowchart we can determine that leap years are either

multiples of \(4\) that are not
also multiples of \(100\), or

multiples of \(4,~100,\) and
\(400\).

Note that we can simplify the second case to just multiples of \(400\), since any multiple of \(400\) will also be a multiple of \(4\) and \(100\).

First we notice that \(2000\) and
\(2400\) are both multiples of \(400\), so they are both leap years. In
fact, they are the only multiples of \(400\) between \(2000\) and \(2400\).

Next we count the multiples of \(4\)
between \(2000\) and \(2400\). Writing out some of the first few
multiples of \(4\) gives: \(2000,~2004,~2008,~2012,\ldots\).

We will look at the \(400\) numbers
from \(2000\) to \(2399\) and ignore \(2400\) for the moment since we already know
itâ€™s a leap year. Since \(2000\) is a
multiple of \(4\) and every fourth
number after that is also a multiple of \(4\), it follows that \(\frac{1}{4}\) of the \(400\) numbers from \(2000\) to \(2399\) will be multiples of \(4\). Thus, there are \(\frac{1}{4} \times 400 = 100\) multiples of
\(4\) between \(2000\) and \(2399\), inclusive.

However, we have included the multiples of \(100\), so we need to subtract these. These
are \(2000,~2100,~2200,\) and \(2300\). Thus there are \(100-4=96\) multiples of \(4\) between \(2000\) and \(2399\), inclusive, that are not also
multiples of \(100\).

Thus, in total, there are \(2+96=98\) leap years between \(2000\) and \(2400\), inclusive.