MHB Finding 3-Digit Numbers with Sum of Digits Squared = 2

anemone
Gold Member
MHB
POTW Director
Messages
3,851
Reaction score
115
For any natural number $n$, let $S(n)$ denote the sum of the digits of $n$. Find the number of all 3-digit numbers $n$ such that $S(S(n))=2$.
 
Mathematics news on Phys.org
First, 110 and 101 are three digit numbers with digits sum 2 and then its digit sum is again 2. (I assume you would not consider "011" a three digit number.)

Now the only two digit numbers with digit sum 2 are 20 and 11. What three digit numbers have digit sum 20 or 11?
 
Not 200?

-Dan
 
Sum of all the digits of a 3 digit number that is $S(n)$ shall be between 1 and 27.because $(S(n)) = 2 $ and $S(n)$ is between 1 and 27 so we have $(n) \in \{ 2,11,20\}$ Now the number of 2 digit numbers(with leading zero) sum = n is n+1 for n <=9

This is so because 1st digit can be 0 to n and 2nd digit can be The number of 1/2 digit numbers sum = n is 19-n for 9 < n < 19 is 19-n. This is so because the 1st digit can go from n -9 to 9 or 9-(n-9) +1 =19-n numbersOne digit number is allowed ( that is 2 digit number with leading zero) because we are considering the tens digit of the 3 digit number that can be zero.Now we shall use the above 2 do the countingThe 3 digit numbers that have sum 3 are 101,110,200 that is 3 numberslet us count the number of 3 digit that have a sum 111st digit is 1 so sum of other 2 digit 10 so number of numbers = 19-10 = 91st digit is 2 to 9 so sum of other 2 digit 9 down to 2 number of numbers = $10 + 9 + \cdots 3 = \frac{(10 + 3)*8}{2} = 52$So the number of numbers that have sum 11 is 9 + 52 = 61let us count the number of 3 digit that have a sum 201st digit can be from 2 to 9 and that shall give the sum of other 2 digits of the number can be from 18 down to 11. the number of numbers can be 19-k with k from 18 to 11so the sum = $1+2 + \cdots 8 = \frac{8 * 9}{2} = 36$So total number of numbers with sum 20 = 36So total number of numbers = 3 + 61+ 36 = 100
 
Sorry all, the correct answer is 85. (Nod)
 
****************
checking for 2
****************
1 : The number is 101
2 : The number is 110
3 : The number is 200
****************
checking for 11
****************
1 : The number is 119
2 : The number is 128
3 : The number is 137
4 : The number is 146
5 : The number is 155
6 : The number is 164
7 : The number is 173
8 : The number is 182
9 : The number is 191
10 : The number is 209
11 : The number is 218
12 : The number is 227
13 : The number is 236
14 : The number is 245
15 : The number is 254
16 : The number is 263
17 : The number is 272
18 : The number is 281
19 : The number is 290
20 : The number is 308
21 : The number is 317
22 : The number is 326
23 : The number is 335
24 : The number is 344
25 : The number is 353
26 : The number is 362
27 : The number is 371
28 : The number is 380
29 : The number is 407
30 : The number is 416
31 : The number is 425
32 : The number is 434
33 : The number is 443
34 : The number is 452
35 : The number is 461
36 : The number is 470
37 : The number is 506
38 : The number is 515
39 : The number is 524
40 : The number is 533
41 : The number is 542
42 : The number is 551
43 : The number is 560
44 : The number is 605
45 : The number is 614
46 : The number is 623
47 : The number is 632
48 : The number is 641
49 : The number is 650
50 : The number is 704
51 : The number is 713
52 : The number is 722
53 : The number is 731
54 : The number is 740
55 : The number is 803
56 : The number is 812
57 : The number is 821
58 : The number is 830
59 : The number is 902
60 : The number is 911
61 : The number is 920
****************
checking for 20
****************
1 : The number is 299
2 : The number is 389
3 : The number is 398
4 : The number is 479
5 : The number is 488
6 : The number is 497
7 : The number is 569
8 : The number is 578
9 : The number is 587
10 : The number is 596
11 : The number is 659
12 : The number is 668
13 : The number is 677
14 : The number is 686
15 : The number is 695
16 : The number is 749
17 : The number is 758
18 : The number is 767
19 : The number is 776
20 : The number is 785
21 : The number is 794
22 : The number is 839
23 : The number is 848
24 : The number is 857
25 : The number is 866
26 : The number is 875
27 : The number is 884
28 : The number is 893
29 : The number is 929
30 : The number is 938
31 : The number is 947
32 : The number is 956
33 : The number is 965
34 : The number is 974
35 : The number is 983
36 : The number is 992

In the above I find 100 solutions specified under the categories. $S(n)$
 
Last edited:
Ah...you're right, kaliprasad! (Nod) And thanks for your participation!
 
[
For 3 digit number the lowest value of S(n) is when n is 100 that is S(100) = 1 and largest when n = 999 that is S(999) = 27
Now to calculate S(n) when n is 1/2 digit number <= 27 is 1 to 10 10 is when n = 19 otherwise it is a single digir number

so $S(S(n))$ for 3 digit number is between 1 to 10

Further n- S(S(n)) is divsible by 9.

so n has a remainder $S(S(n))$ when divided by 9 and $S(S(n))$ is not 9 or 10

n has a remainder $S(S(n))-9$ when divided by 9 and $S(S(n))) is 9 or 10

as S(S(n) is 2 so n has a remainder 2 and the numbers from 11 * 9 + 2 to 110 * 9 +2 that is 100 3 digit numbers satisfy the criteria
 

Similar threads

Replies
3
Views
2K
Replies
2
Views
2K
Replies
11
Views
2K
Replies
1
Views
893
Replies
4
Views
2K
Replies
2
Views
903
Replies
1
Views
1K
Back
Top