How many numbers lie between 300 and 500 in which 4 comes only one time?
They are all of the form
"4AB", "34B", and "3B4", where A nor B is 4
Case 1: The number of 3-digit numbers of type "4AB"
We can choose A as any of the 9 digits {0,1,2,3,5,6,7,8,9}
We can choose B as any of the 9 digits {0,1,2,3,5,6,7,8,9}
So there are 9×9 = 81 ways for Case 1.
----------------------------------------------------
Case 2: The number of 3-digit numbers of type "34B"
We can choose B as any of the 9 digits {0,1,2,3,5,6,7,8,9}
So there are 9 ways for Case 2.
-----------------------------------
Case 3: The number of 3-digit numbers of type "3B4"
Same as Case 2: We can choose B as any of the 9 digits {0,1,2,3,5,6,7,8,9}
So there are 9 ways for Case 2.
-----------------------------------------
Total 81+9+9 = 99
Here are all 99 in a 9 by 11 array:
304, 314, 324, 334, 340, 341, 342, 343, 345, 346, 347
348, 349, 354, 364, 374, 384, 394, 400, 401, 402, 403
405, 406, 407, 408, 409, 410, 411, 412, 413, 415, 416
417, 418, 419, 420, 421, 422, 423, 425, 426, 427, 428
429, 430, 431, 432, 433, 435, 436, 437, 438, 439, 450
451, 452, 453, 455, 456, 457, 458, 459, 460, 461, 462
463, 465, 466, 467, 468, 469, 470, 471, 472, 473, 475
476, 477, 478, 479, 480, 481, 482, 483, 485, 486, 487
488, 489, 490, 491, 492, 493, 495, 496, 497, 498, 499
Edwin