5

Mickey writes down on a board n consecutive whole numbers the smallest of which is 2023.He then replaces the largest two numbers on the board with their difference, reducing the number of numbers on the board by one. He does this repeatedly until there is only a single numberon the board.

For which values of n is this last remaining number 0?

Answer

The possible values of n are all multiples of 4 and all numbers at least 4047 which are three more than a multiple of 4.

SOLUTIOn

Note that subtracting two numbers and replacing by the difference does not change the parity of the sum of the numbers:If both numbers are odd or both numbers are even then both their sum and their difference are even; if one is odd and one is even then both their sum and their difference are odd.

This means if the total sum originally is odd, the last number must be odd and therefore cannot be 0. This happens whenever n is 1 more than a multiple of 4 or 2 more than a multiple of 4, so these values of n cannot leave 0 as the remaining number.

The largest two numbers on the board are consecutive, so are replaced by 1. Since 1 is never going to be larger than any number already on the board, the remaining largest two numbers will again be consecutive and be replaced by 1 until there are not two of the original list to remove.

If n is a multiple of 4, all the original numbers will have been replaced by an even number of 1’s left on the board. These will all be removed in pairs and replaced by 0’s. The difference between the 0’s will be 0’s, so the last number on the board will be 0.

If n is three more than a multiple of 4, all the original numbers except 2023 will have been replaced by an odd number of 1’s left on the board. Whenever the board contains a number of 1’s and a larger number, k, the larger number, k, and a 1 are replaced by k  1 until there are only 1’s left or there is only one number left.

If n < 4047, there will be fewer than 2023 1’s left on the board with 2023, so there will be one number greater than 1 left on the board when all the 1’s have been removed.

If n 4047, there will be at least 2023 1’s left with 2023, so the board will get down to only 1’s. As explained above, the last number must be even and cannot be greater than 1, so it must end with a 0.

The possible values of n are all multiples of 4 and all numbers at least 4047 which are three more than a multiple of 4.

Subscribe to receive updates!

Be up-to-date with our recent updates, new problems and answers!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Our courses

Get ready for olympiads with free problems, extracurricular topics and our courses

Mathematics

Programming

Where do you hold your classes?
We hold our classes online or on-site on Saturdays at our branch in Pimlico Academy, London.
You can find our timetable here.
What do you need to start learning online?
For lessons you only need a computer or phone with a microphone, camera and Internet access. Wherever you are - in London, Nottingham, New York or Bali - online lessons will be at hand.
When can I take the introductory lesson?
You can get acquainted with the school at any time convenient for you. To do this, just leave a request and sign up for a lesson.
I can't attend class, what should I do?
It is OK, it happens! Students have the opportunity to cancel a lesson up to 8 hours before the scheduled time without loss of payment. So you can reschedule it for a convenient time, and the teacher will have the opportunity to
I don't have much free time, will I have time to study?
Learning can take place at your own pace. We will select a convenient schedule and at any time we will help you change the schedule, take a break or adjust the program.
How long is one lesson?
All classes last 1 hour.
Hear from some of our amazing students who already achieved incredible results with us!
"Olympiad Maths Lessons helped me a lot to get the Gold medal in Junior Maths Challenge"
St. Paul's Student
"Thanks to the 'Data Science' and 'Coding in Python' lessons I got accepted to my dream university."
Michael
Data Science Student
Warwick University
"Great courses, which thoroughly explained topics beyond the capability of the GCSE answer sheet. Thanks so much."
Ivan
GCSE Student in Dubai
"Financial Mathematics! Best course to understand Python and Mathematics behind Finance!"
Gleb
VC Investor
"We got silver in PMC! Thanks George!"
Mum of St. Paul's Student
Prepare for the Primary Maths Challenge
"My daughter took a batch of 10 classes with George to understand Python with Turtle. I found George extremely knowledgeable and accessible."
Dad of Latymer School Student
Python with Turtle

Contact us

Phone

Mon-Sun from 8am to 9pm
+44 77 07 547 144

Office

Come say hello at our office HQ.
84 Eccleston Square, Pimlico, London SW1V 1NP, UK

...or ask us anything

Smaller 3D model of a student sitting at his desk and preparing for competitions, exams and olympiads.

Ask about our courses and offerings, and we will help you choose what works best for you.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.