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

1.3k Views Asked by At

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

3

There are 3 best solutions below

0
On BEST ANSWER

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$

1
On

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)$.

6
On

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.