Question 1150794
<br>
With the given restrictions, I doubt there is a single formal mathematical process for solving this problem.<br>
An Excel spreadsheet and some logical detective work can get you to the answer.<br>
Each consecutive 3 digits in the 5-digit number must be divisible by either 17 or 23, and the first digit can't be 0.  So do the following:<br>
(1) Use the fill/series and sort features of excel to make a sorted list of all 3-digit numbers divisible by either 17 or 23. Print out the list for easy reference.<br>
(2) Since the 5-digit numbers are to be less than 40000, the first digit must be 1, 2, or 3.  So look at each 3-digit number in the list with first digit less than 4 and see if a 5-digit number can be built with the given requirements.<br>
Here is the start of the task....<br>
102:  The first number in the list is 102.  We won't be able to make a 5-digit number that meets the requirements using this as the first 3 digits, because the second 3-digit number would have 0 as the first digit.<br>
115:  The second 3-digit number in the list is 115.  If those are digits 1-3, then digits 2-3 must be "15".  There is one 3-digit number in the list with first two digits 15; that number is 153.  But there is no number in the list with first two digits 53.  So there is no 5-digit number with 115 as the first 3 digits.<br>
119:  There is no 3-digit number in the list with first two digits 19.<br>
136:  There is one 3-digit number in the list with first two digits 36 -- 368.  And there is one 3-digit number in the list with first two digits 68 -- 680.<br>
So we have found our first 5-digit number that meets the requirements of the problem: 13680.<br>
Continue in that fashion starting with the other 3-digit numbers in the list that are less than 400....<br>
My final list (possibly not completely correct) contains 12 numbers that satisfy the conditions.<br>