Skip over navigation
Cambridge University Faculty of Mathematics NRich logo
menu search
  • Teachers expand_more
    • Early years
    • Primary
    • Secondary
    • Post-16
    • Events
    • Professional development
  • Students expand_more
    • Primary
    • Secondary
    • Post-16
  • Parents expand_more
    • Early Years
    • Primary
    • Secondary
    • Post-16
  • Problem-Solving Schools
  • About NRICH expand_more
    • About us
    • Impact stories
    • Support us
    • Our funders
    • Contact us
  • search

Or search by topic

Number and algebra

  • The Number System and Place Value
  • Calculations and Numerical Methods
  • Fractions, Decimals, Percentages, Ratio and Proportion
  • Properties of Numbers
  • Patterns, Sequences and Structure
  • Algebraic expressions, equations and formulae
  • Coordinates, Functions and Graphs

Geometry and measure

  • Angles, Polygons, and Geometrical Proof
  • 3D Geometry, Shape and Space
  • Measuring and calculating with units
  • Transformations and constructions
  • Pythagoras and Trigonometry
  • Vectors and Matrices

Probability and statistics

  • Handling, Processing and Representing Data
  • Probability

Working mathematically

  • Thinking mathematically
  • Developing positive attitudes
  • Cross-curricular contexts

Advanced mathematics

  • Decision Mathematics and Combinatorics
  • Advanced Probability and Statistics
  • Mechanics
  • Calculus

For younger learners

  • Early Years Foundation Stage

Happy birthDay

Age 16 to 18
Challenge Level Yellow starYellow star
  • Problem
  • Student Solutions

This solution is not 'complete', but does indicate why the formula works. It will make more sense if you test it out using a spreadsheet.

This tasks seems daunting at first but then you might realise that essentially the function is a 'counter' and the year starts at 1st March and ends on 28/9th of February.
 
Years are always of the same structure with the exception of the last day of Feb:
 
From  1st March to 1st April is +31 days. 
 
From 1st April to 1st May is +30 days.
 
From 1st May to 1st June is +31 days.
 
etc.
 
For weekday calculations we are only interested in mod 7 changes. Since 31 is 3 mod 7 and 30 is 2 mod 7 we have the following differences between the first of the months, with the +0/1 corresponding to February.
 
(1Mar) +3, +2, +3, +2, +3, +3, +2, +3, +2, +3, +3,+0/1 (1Mar)

 Accumulating the changes from the 1st March (mod 7) gives
 
(1Mar) 0
(1Apr) 3
(1May) 5
(1Jun) 1
(1Jul) 3
(1Aug) 6
(1Sep) 2
(1Oct) 4
(1Nov) 0
(1Dec) 2
(1Jan) 5
(1Feb) 1
(1Mar) 1 or 2 in a leap year
 
Interestingly, the $\mbox{int}\left[\frac{(m+1)\times 26}{10}\right]$ part matches these offsets with the labellings of months given  (try it out to see).
 
 
So, in the absence of leap years the expression would work.
 
The part $y+\mbox{int}\left[\frac{y}{4}\right]+\mbox{int}\left[\frac{C}{4}\right]-2C$ has the correct mod 7 behaviour to count the leap years (try it).
 
 
 

You may also like

A Close Match

Can you massage the parameters of these curves to make them match as closely as possible?

Prime Counter

A short challenge concerning prime numbers.

The Right Volume

Can you rotate a curve to make a volume of 1?

  • Tech help
  • Accessibility Statement
  • Sign up to our newsletter
  • Twitter X logo

The NRICH Project aims to enrich the mathematical experiences of all learners. To support this aim, members of the NRICH team work in a wide range of capacities, including providing professional development for teachers wishing to embed rich mathematical tasks into everyday classroom practice.

NRICH is part of the family of activities in the Millennium Mathematics Project.

University of Cambridge logo NRICH logo