No matter how we permute the 3 digits 1,2 4 ,
none of the 6 three- digit numbers (124,142,214,241,412,421) is a multiple of 7.
Clearly, out of 84 possible triplets created by choosing distinct non-zero digits
there must be several like this, i.e. generating a 6-pack of three-digit numbers,
non divisible by 7.
1. List those triplets.
2. Similar question re:4 digits and divisibility by 23.
I posted my reply for part 1 earlier, and it agrees with Charlie's for that part (30 triples). I posted my general reply for part 2 recently, but after Charlie had posted, but before I examined it.
Checking my list (for part 2), I find I had the first 40 of Charlie's list for part 2, but did not get his last four (4567, 4569, 4578, 4589). I'll have to give those another look. Possibly I erred in coding so as to exclude a set with 4 as the lowest seed.
(Edit) (note to Charlie)
I haven't found my error: forcing your last four (instead of the loops logic) did show them. I was using only three decimal places when I divided each of the 24 variants by 23 to check for exact divisibility -- I don't have that handy MOD function -- but that does not seem to have been the problem.
Edited on November 8, 2010, 7:50 pm