A number theory problem by Akshat Sharda

Find the sum of all 3-digit natural numbers which contain at least one odd digit and at least one even digit.


Source: RMO.


The answer is 370775.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Sarthak Behera
Jul 15, 2015

We can approach by complementary counting. The sum of numbers containing only odd numbers is obtained to be 69375 & the sum of the numbers containing only even numbers is obtained as 54400(55500-1100) Then we subtract the above results from the total sum of all 3-digit numbers(494550) to obtain 370775 as the answer...

Moderator note:

Great approach of finding the complement.

What is an easy way to find the sum of numbers containing only odd (even) digits?

Only odd digits sum easy way is by multiplying (111)(25)(1+3+5+7+9) to get 69375...

Sarthak Behera - 5 years, 11 months ago
Chew-Seong Cheong
Jul 23, 2017

All 3-digit natural numbers with at least one odd digit and one even digit means all 3-digit natural numbers except those with 3 odd digits or 3 even digits.

The required sum S o e S_{oe*} = = the sum of all 3-digit numbers S S_{***} - the sum of all 3-odd digit numbers S o o o S_{ooo} - the sum of all 3-even digit numbers S e e e S_{eee} or S o e = S S o o o S e e e S_{oe*} = S_{***} - S_{ooo} - S_{eee} .

Three-digit numbers range from a = 100 a=100 to l = 999 l=999 , altogether n = 900 n=900 numbers. Therefore,

S = n ( a + l ) 2 = 900 ( 100 + 999 ) 2 = 494550 \begin{aligned} S_{***} = \frac {n(a+l)}2 = \dfrac {900(100+999)}2 = 494550 \end{aligned}

Since there are 5 odd digits (1, 3, 5, 7, 9), the number of 3-odd digit numbers n o o o = 5 × 5 × 5 = 125 n_{ooo} = 5\times 5 \times 5 = 125 . We note the each odd digit appear the same number of times as the unit, tenth and hundredth digit, that is 125 / 5 = 25 125/5= 25 times. Therefore,

S o o o = ( 1 + 3 + 5 + 7 + 9 ) × 25 × 100 + ( 1 + 3 + 5 + 7 + 9 ) × 25 × 10 + ( 1 + 3 + 5 + 7 + 9 ) × 25 × 1 = 25 × 25 × 111 = 69375 \begin{aligned} S_{ooo} & = (1+3+5+7+9)\times 25 \times 100 + (1+3+5+7+9)\times 25 \times 10 + (1+3+5+7+9)\times 25 \times 1 \\ & = 25 \times 25 \times 111 = 69375 \end{aligned}

For 3-even digit numbers, however, starts with 200 to 888, and n e e e = 4 × 5 × 5 = 100 n_{eee} = 4 \times 5 \times 5 = 100 . Out of these 100 numbers, (2, 4, 6, 8) share as the 100 hundredth digit, that is 100 / 4 = 25 100/4 = 25 , but (0, 2, 4, 6, 8) share as the tenth and unit digits, that is 100 / 5 = 20 100/5=20 . Then, we have

S e e e = ( 2 + 4 + 6 + 8 ) × 25 × 100 + ( 0 + 2 + 4 + 6 + 8 ) × 20 × 10 + ( 0 + 2 + 4 + 6 + 8 ) × 20 × 1 = 20 ( 2500 + 200 + 20 ) = 54400 \begin{aligned} S_{eee} & = (2+4+6+8)\times 25 \times 100 + (0+2+4+6+8)\times 20 \times 10 + (0+2+4+6+8)\times 20 \times 1 \\ & = 20 (2500+200+20) = 54400 \end{aligned}

Therefore, S o e = S S o o o S e e e = 494550 69375 54400 = 370775 S_{oe*} = S_{***} - S_{ooo} - S_{eee} = 494550 - 69375 - 54400 = \boxed{370775} .

Akshay Yadav
Jul 23, 2015

This question is indeed very very long,

First of all we sum all 3-digit numbers, S=450(1099) S=494550

Now we identify those numbers whose sum is not required and add them,

111,113,...,119 => 675

131,133,...,139 => 775

And so on,

As a whole the sum comes out to be 123775,

Now we subtract this from total,

494550-123775=370775

Md Mehedi Hasan
Nov 21, 2017

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...