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.)
May 1, 2015 at 5:10 pm
Doesn’t 100 technically qualify?
May 1, 2015 at 5:38 pm
No, only integers with non-zero extreme digits can be used.
May 1, 2015 at 5:39 pm
Which was not mentioned in the original post, sorry!
May 1, 2015 at 11:01 am
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
May 2, 2015 at 5:58 pm
Judging from the only possible solutions, the answer is yes!