In 1976, there were five Sundays in February. In which of the remaining years in the 21st century will February have five Sundays?

http://curious.astro.cornell.edu/question.php?number=603

To determine in which years in the 21st century February will have five Sundays, we need to consider the leap years and the day of the week that February 1st falls on each year.

A leap year occurs every 4 years, except for years that are divisible by 100 but not divisible by 400. This means that 2000, for example, was a leap year, but 1900 was not.

To figure out the day of the week that February 1st falls on, we can use a formula called the "Zeller's Congruence." The formula goes as follows:

h = (q + [(13(m + 1)) / 5] + K + [(K / 4)] + [(J / 4)] - 2J) mod 7

Where:
- h is the day of the week (0 = Saturday, 1 = Sunday, 2 = Monday, etc.)
- q is the day of the month
- m is the month (3 = March, 4 = April, etc. Treat January and February as months 13 and 14 of the previous year)
- K is the year of the century (year % 100)
- J is the zero-based century (actual century / 100)

Using this formula, we can calculate the day of the week for February 1st of each year and check if it falls on a Sunday.

Here are the remaining years in the 21st century when February will have five Sundays:

- 2040
- 2068
- 2096

Please note that this calculation assumes the Gregorian calendar is used consistently throughout the 21st century and does not account for any potential changes in the calendar system.