All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Four generations (Posted on 2020-07-06)
Let S be a set of all six-digit integers.

Let S1 be a subset of S, including all members of S such that each consists
of distinct digits.
Let S2 be a subset of S1, including all members of S1 each with 5 being the difference between its largest digit and its lowest one.
Let S3 be a subset of S2, comprising all elements of S2 divisible by 143.

What is the cardinality of S3 ?

Comments: ( Back to comment list | You must be logged in to post comments.)
 apologies to steven | Comment 4 of 9 |
(In reply to re: part 1 via computer by Charlie)

I neglected to check for duplicate digits.

Corrected section of code:

If highest - lowest = 5 Then
good = 1
For i = 2 To Len(ns)
If InStr(ns, Mid(ns, i, 1)) < i Then good = 0
Next

If good Then ct = ct + 1: lastmemb = n: Text1.Text = Text1.Text & n & " "

End If
DoEvents

with this it finds no solutions so the cardinality is zero.

 Posted by Charlie on 2020-07-06 10:34:16

 Search: Search body:
Forums (0)