# How many 3 digit numbers have the property that the middle digit is the product of the first and last digits?

I have a problem that goes like this: How many 3 digit numbers have the property that the middle digit is the product of the first and last digits? I figured that the answer might be 648, but I feel like this is too large of a number. I am probably a couple hundred off. Can someone confirm or help me with this problem? My work is as follows: 1st digit numbers = 1,2,3,4,5,6,7,8,9 3rd digit numbers = 1,0 since the middle number is less than 10 9*2 = 18 numbers for middle, some repeating 18 * 18 = 324 324 * 2 = 648

• You set it up so that the middle digit is determined by the first and last digits, so only the first and last digits are choices. It would help to say explicitly whether the first (leading?) digit can be zero (or not). Jul 21, 2019 at 22:56
• This seems like a problem which can be done by exhaustion without too much difficulty. For example, suppose that the first digit is $1$; what are the possible values of the last digit? Can the first digit be $5$ or more? That being said, I don't follow your argument at all, and do not see where you got the number $648$. Jul 21, 2019 at 22:59

Suppose the number begins with $$3$$. Then it must end with a digit small enough so that the product (which would be the middle digit) is $$<10$$. That admits $$1+[9/3]=4$$ choices where $$[x]$$ is the greatest integer less than or equal to $$x$$ and the possibility of a zero units digit is included. Do this for all nine possible initial digits and you get

$$9+[9/1]+[9/2]+[9/3]+...+[9/9]=32$$

Possible 'end digit' pairs: $$(1,0), (1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (1,7), (1,8), (1,9),\\ (2,0), (2,1), (2,2), (2,3), (2,4),\\ (3,0), (3,1), (3,2), (3,3),\\ (4,0), (4,1), (4,2),\\ (5,0), (5,1),\\ (6,0), (6,1),\\ (7,0), (7,1),\\ (8,0), (8,1),\\ (9,0), (9,1)$$ so I get $$32$$.

I'm assuming that a '$$3$$-digit number' cannot have a $$0$$ as its first digit, otherwise you get another ten options $$(0,i)$$.

• A 3 digit number MUST have 3 digits. Jul 22, 2019 at 1:38

42 as the question is stated. I used a simple computer program. Run a loop from 0 to 991 (or 999 if you are lazy and don't want to think at all), and just pluck off the 3 digits (including leading 0s) and check for the condition you are looking for. I assigned the first digit to a, 2nd to b, and 3rd to c, and just checked for a*c = b. It quickly told me 42.

• I am supposed to show my work on my assignment, so this does not help as much. Also, it is 3 digit numbers, so starting from 0 gives the incorrect answer. Jul 25, 2019 at 4:10
• Show them the code you used to generate the answer and last time I looked, 000, 001, 002... are 3 digit numbers. You didn't say 3 significant digits. You said you had a problem to solve, you didn't specifically say you were looking for a mathematical only solution. Jul 25, 2019 at 4:33
• $001$ is generally not considered to be a three digit number by convention. Also, this would not be the expected answer since that the question and the class seem to be about probability, not coding. This can be an alternative solution, but this does not fit the aim of the question. Aug 6, 2019 at 9:19
• I agree with Toby. I am looking for a mathematical solution, and as Toby said, 001 is not considered to be three digits. A computer program does not count as a mathematical solution. Aug 7, 2019 at 3:26
• So I guess using a calculator to add 2 numbers doesn't count as a mathematical solution either? Aug 7, 2019 at 22:40