Le Monde puzzle [#964]

A not so enticing Le Monde mathematical puzzle:

Find the minimal value of a five digit number divided by the sum of its digits.

This can formalised as finding the minimum of N/(a+b+c+d+e) when N writes abcde. And solved by brute force. Using a rough approach to finding the digits of a five-digit number, the question can be easily solved as

for (i in 1e4:1e5){
 pres=i/sum((i %% 10^{5:1})) %/% 10^{4:0})
 if (pres<pris){

which returns N=10999 as its solution. (The solution for six digits is 10999.) The mathematical solution as provided in the newspaper certainly sounded more exciting.

2 Responses to “Le Monde puzzle [#964]”

  1. I was thinking it would have been more fun to write a set of parametric equations and let a back-solver have at it. Sadly, it appears there’s only a couple equations so the iteration might take longer than brute force. Might be fun to set this up while allowing a,b,c,d,e to be rationals in [0,9] and see what the solution is. Here I’d explicity define N as sum(c(a,b,c,d,e)*10^(0:4)) .

  2. […] article was first published on R – Xi'an's Og, and kindly contributed to […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.