Proof Problem Of The Day - Digits and Sums!

For a positive integer NN, let S(N)S(N) be the sum of digits in the decimal representation of NN. Let F(N)F(N) be the sum of all the numbers obtained by erasing one or more numbers from the right end of NN.

Prove that S(N)+9F(N)=NS(N)+9F(N)=N

Click here to see all the problems posted so far. Keep checking everyday!

Note by Mursalin Habib
6 years, 11 months ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link]( link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}


Sort by:

Top Newest

At first let N=k=0nak10kN=\displaystyle\sum_{k=0}^n a_k 10^k. We have S(N)=k=0nakS(N)=\displaystyle \sum_{k=0}^n a_k. Now we calculate and simplify F(N)F(N). A little observation is required to find the compact form of F(N)F(N)

F(N)=i=1nj=inaj10ji=i=1nj=0i1ai10j=i=1n(aij=0i110j)=i=1nai10i19.F(N) = \sum_{i=1}^n \sum_{j=i}^n a_j 10^{j-i}=\sum_{i=1}^{n} \sum_{j=0}^{i-1} a_{i} 10^j=\sum_{i=1}^n\left(a_{i}\sum_{j=0}^{i-1} 10^j\right)=\sum_{i=1}^n a_{i}\dfrac{10^i-1}{9}.

The rest is straight. Using the last form of F(N)F(N) we have

9F(N)=i=1nai(10i1)=i=1n(ai10iai)=i=1nai10ii=1nai=NS(N)9F(N)=\sum_{i=1}^n a_i\left(10^i -1\right)=\sum_{i=1}^n \left(a_i10^i-a_i\right)=\sum_{i=1}^n a_i10^i -\sum_{i=1}^n a_i =N-S(N)

and the result follows. \square

NOTE: If you're wondering how I reformed the sum of F(N)F(N) in the third step above, say N=3265N=3265. Then clearly


This is the form of the first sum. Now break further into

F(3625)=326+32+3=(300+20+6)+(30+2)+3=(300+30+3)+(20+2)+6=3(102+101+100)+2(101+100)+6100.\begin{aligned} F(3625) &=&326+32+3 \\ &=&(300+20+6)+(30+2)+3 \\ &=&(300+30+3)+(20+2)+6 \\ &=&3(10^2+10^1+10^0)+2(10^1+10^0)+6\cdot 10^0. \end{aligned}

Observe the number of occurrences of the powers of 1010 for the nnth digit and generalize to get the second sum.

Jubayer Nirjhor - 6 years, 11 months ago

Log in to reply

Great job!

Another way of doing it is inducting on the number of digits of NN.

Clearly the statement is true for any one digit-number.

Assume that the statement is true for any kk-digit number.

Now for any (k+1)(k+1)- digit number bb, let b=10a+cb=10a+c where aa is a kk-digit number and cc is a one-digit number.

Notice that, S(b)=S(a)+cS(b)=S(a)+c and F(b)=F(a)+aF(b)=F(a)+a

So, S(b)+9F(b)=S(a)+c+9F(a)+9aS(b)+9F(b)=S(a)+c+9F(a)+9a.

From the induction hypothesis, S(a)+9F(a)=aS(a)+9F(a)=a. Substituting that, we get,


So the result holds for all positive integers NN.

Mursalin Habib - 6 years, 11 months ago

Log in to reply

BTW, someone's downvoting every damn comment he's passing by. -_-

Jubayer Nirjhor - 6 years, 11 months ago

Log in to reply

@Jubayer Nirjhor I don't mind being downvoted.

Mursalin Habib - 6 years, 11 months ago

Log in to reply

@Mursalin Habib Neither do I. But I do mind being spammed.

Jubayer Nirjhor - 6 years, 11 months ago

Log in to reply

At first it seems rather tedious. However, if we prove by induction on the number of digits the calculations will magically disappear!

When number of digits is 1, F(N)=0,S(N)=nF(N)=0, S(N)=n, done.

Suppose it was true for all kk digit numbers. Consider a (k+1)(k+1) digit number XX with last digit mm. Let YY be the kk digit number without mm. Then X=10Y+mX=10Y+m. Hence S(X)+9F(X)=S(Y)+m+9F(Y)+9YS(X)+9F(X)=S(Y)+m+9F(Y)+9Y (since we missed out YY when calcualting F(Y)F(Y)).

But by inductive hypothesis, S(Y)+9F(Y)=YS(Y)+9F(Y)=Y, hence S(X)+9F(X)=Y+m+9Y=10Y+m=XS(X)+9F(X)=Y+m+9Y=10Y+m=X and we are done.

Joel Tan - 6 years, 11 months ago

Log in to reply

Sorry, I did not see Mursalin's comment below. I just realized it was a repetition.

Joel Tan - 6 years, 11 months ago

Log in to reply


Shubham Agrawal - 6 years, 10 months ago

Log in to reply


Problem Loading...

Note Loading...

Set Loading...