The number M = 124563987 is the smallest number which uses all the non-zero digits once each and which has the property that none of the pairs of its consecutive digits makes a prime number. For example, the 5th and 6th digits of M make the number 63 which is not prime. N is the largest number which uses all the non-zero digits once each and which has the property that none of the pairs of its consecutive digits makes a prime number.
What are the 5th and 6th digits of N?
A. 6 and 3 B. 5 and 4 C. 5 and 2 D. 4 and 8 E. 3 and 5
E. 3 and 5
For convenience, in this solution by a subnumber of a positive number n we mean a number formed from consecutive digits of n. For example, the two-digit subnumbers of 1234 are 12, 23 and 34, and the three-digit subnumbers of 1234 are 123 and 234. Note that this is not standard mathematical terminology, but has been introduced just for the purposes of this question.
We note first that 63 and 93 are the only numbers formed of two different non-zero digits with 3 as the unit digits that are not primes.
It follows that, if the digit 3 is not the first digit of the number N, the digit 3 could only occur in N immediately after either the digit 9 or the digit 6.We construct N by beginning with the largest digit 9, and then use all the other non-zero digits once each by always choosing the largest digit not yet used subject to the condition that 3 comes immediately after 9 or immediately after 6. In this way we obtain the number 987635421.We now see that in the number 987635421 none of the two-digit subnumbers is a prime. Any larger number using all the digits must either begin 98765... or 98764..., but in each case the 3would follow either 1,2,4 or 5, and so produce a two-digit subnumber that is a prime.Therefore the largest number with the required property is N = 987635421. It follows that the5th and 6th digits of N are 3 and 5.
Be up-to-date with our recent updates, new problems and answers!
Our goal at this course is to enhance our students’ mathematical intuition by focusing on a deep understanding of mathematical concepts and to enable them to link different concepts and apply their knowledge to solve mathematical problems to help them to improve their performance at Maths exams.
This course guides you through the fundamentals of Python programming using an interactive Python library known as Turtle.
This course encompasses a range of Geometry topics such as coordinate and spatial geometry, introductory trigonometry, angles, parallel lines, congruent and similar triangles, polygons, circles, the Pythagorean Theorem, and more. Emphasis will be placed on reinforcing Algebra skills and enhancing critical thinking through problem-solving in both mathematical and real-world contexts.
Ask about our courses and offerings, and we will help you choose what works best for you.