 All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars  perplexus dot info  The smallest non-conformist (Posted on 2017-05-02) a. What is the smallest number not dividing any 10 digit-pandigital?
b. Same question, but for the non-zero pandigital numbers.

Source: Rodolfo Kurchan

 No Solution Yet Submitted by Ady TZIDON No Rating Comments: ( Back to comment list | You must be logged in to post comments.) with computer assistance | Comment 1 of 3
The digits of either kind of pandigital number add up to 45.

45 is divisible by 9, and therefore all pandigital numbers are divisible by both 3 and 9. Some pandigital numbers are divisible by 2, and some of those by 4 and some of those are divisible by 8 (such as those ending in ...128). Those that are divisible by 2 are also divisible by 6 as all are divisible by 3. Any ending in 5 or 0 is divisible by 5.

7 is the first number attempted by the program.

It turns out 100, 200 and 300 are the first three, as each requires the number end with two zeros.

Likewise, when using only digits 1 through 9, all the multiples of 10 fail, including 10 as the first.

Text1.Text = ""
crlf\$ = Chr(13) + Chr(10)
Form1.Visible = True

s\$ = "123456789"
h\$ = s
Do
v = Val(s)
For i = 7 To 300
q = Int(v / i): r = v - q * i
If r = 0 Then
If dvsr(i) = 0 Then ct = ct + 1
dvsr(i) = 1
End If
Next i
permute s
DoEvents
Loop Until s = h Or ct = 294

If ct = 294 Then
Else
For i = 7 To 300
If dvsr(i) = 0 Then Text1.Text = Text1.Text & Str(i)
Next
Text1.Text = Text1.Text & crlf
End If

 Posted by Charlie on 2017-05-02 12:47:47 Please log in:

 Search: Search body:
Forums (2)