To find the sum of all 3-digit natural numbers that contain at least one odd digit and at least one even digit, we can follow these steps:
### Step 1: Define the Sets
Let:
- \( X \) be the set of all 3-digit natural numbers.
- \( O \) be the set of 3-digit numbers with only odd digits.
- \( E \) be the set of 3-digit numbers with only even digits.
We want to find the sum of numbers in the set \( X - (O \cup E) \), which contains numbers with at least one odd digit and at least one even digit.
### Step 2: Calculate the Total Sum of All 3-Digit Numbers
The total sum of all 3-digit numbers can be calculated as follows:
- The smallest 3-digit number is 100 and the largest is 999.
- The sum of an arithmetic series is given by the formula:
\[
S = \frac{n}{2} \times (a + l)
\]
where \( n \) is the number of terms, \( a \) is the first term, and \( l \) is the last term.
The number of 3-digit numbers is:
\[
n = 999 - 100 + 1 = 900
\]
Thus, the total sum \( S \) is:
\[
S = \frac{900}{2} \times (100 + 999) = 450 \times 1099 = 494550
\]
### Step 3: Calculate the Sum of Numbers in Set \( O \) (Only Odd Digits)
The odd digits are {1, 3, 5, 7, 9}.
- For the hundreds place, we can choose any of the 5 odd digits (1, 3, 5, 7, 9).
- For the tens place, we can again choose any of the 5 odd digits.
- For the units place, we can again choose any of the 5 odd digits.
Thus, the total count of numbers in \( O \) is:
\[
5 \times 5 \times 5 = 125
\]
To find the sum of these numbers:
- The contribution from the hundreds place is:
\[
100 \times (1 + 3 + 5 + 7 + 9) \times 25 = 100 \times 25 \times 25 = 62500
\]
- The contribution from the tens place is:
\[
10 \times (1 + 3 + 5 + 7 + 9) \times 25 = 10 \times 25 \times 25 = 6250
\]
- The contribution from the units place is:
\[
1 \times (1 + 3 + 5 + 7 + 9) \times 25 = 1 \times 25 \times 25 = 625
\]
Thus, the total sum for \( O \) is:
\[
62500 + 6250 + 625 = 69375
\]
### Step 4: Calculate the Sum of Numbers in Set \( E \) (Only Even Digits)
The even digits are {0, 2, 4, 6, 8}.
- For the hundreds place, we can choose from {2, 4, 6, 8} (4 options).
- For the tens place, we can choose any of the 5 even digits.
- For the units place, we can choose any of the 5 even digits.
Thus, the total count of numbers in \( E \) is:
\[
4 \times 5 \times 5 = 100
\]
To find the sum of these numbers:
- The contribution from the hundreds place is:
\[
100 \times (2 + 4 + 6 + 8) \times 25 = 100 \times 20 \times 25 = 50000
\]
- The contribution from the tens place is:
\[
10 \times (0 + 2 + 4 + 6 + 8) \times 20 = 10 \times 20 \times 20 = 4000
\]
- The contribution from the units place is:
\[
1 \times (0 + 2 + 4 + 6 + 8) \times 20 = 1 \times 20 \times 20 = 400
\]
Thus, the total sum for \( E \) is:
\[
50000 + 4000 + 400 = 54400
\]
### Step 5: Calculate the Desired Sum
Now, we can find the sum of numbers that contain at least one odd digit and at least one even digit:
\[
\text{Desired Sum} = S - (S_O + S_E) = 494550 - 69375 - 54400
\]
Calculating this gives:
\[
\text{Desired Sum} = 494550 - 69375 - 54400 = 370775
\]
### Final Answer
The sum of all 3-digit natural numbers which contain at least one odd digit and at least one even digit is **370775**.