Le Monde puzzle [#909]

Another of those “drop-a-digit” Le Monde mathematical puzzle:

Find all integers n with 3 or 4 digits, no exterior zero digit, and a single interior zero digit, such that removing that zero digit produces a divider of x.

As in puzzle #904, I made use of the digin R function:

[sourcecode language=”r” gutter=”false”]
digin=function(n){
as.numeric(strsplit(as.character(n),"")[[1]])}
[/sourcecode]

and simply checked all integers up to 10⁶:

[sourcecode language=”r” gutter=”false”]
plura=divid=NULL
for (i in 101:10^6){
dive=rev(digin(i))
if ((min(dive[1],rev(dive)[1])>0)&
(sum((dive[-c(1,length(dive))]==0))==1)){
dive=dive[dive>0]
dive=sum(dive*10^(0:(length(dive)-1)))
if (i==((i%/%dive)*dive)){
plura=c(plura,i)
divid=c(divid,dive)}}}
[/sourcecode]

which leads to the output

[sourcecode language=”r” gutter=”false”]
> plura
1] 105 108 405 2025 6075 10125 30375 50625 70875
> plura/divid
[1] 7 6 9 9 9 9 9 9 9
[/sourcecode]

leading to the conclusion there is no solution beyond 70875. (Allowing for more than a single zero within the inner digits sees many more solutions.)

5 Responses to “Le Monde puzzle [#909]”

  1. Doesn’t 100 technically qualify?

  2. Philip Whittall's avatar
    Philip Whittall Says:

    So, are the following propositions true if we allow any number of digits …
    1> All solutions are divisible by 3.
    2> 108 is the only solution not divisible by 5.
    3> All solutions > 105 are divisible by 9

    Philip

Leave a Reply

Discover more from Xi'an's Og

Subscribe now to keep reading and get access to the full archive.

Continue reading