Why sum of digits in even base have such property? Function

ilybabeilyl85

ilybabeilyl85

Answered question

2022-03-08

Why sum of digits in even base have such property?
Function D(a, b) define as sum of digit of a in base b. Example D(5,2)=2.
Let
f(m,n)=k=1m(1)D(k,n)

Answer & Explanation

Pentyrch9ci

Pentyrch9ci

Beginner2022-03-09Added 1 answers

Step 1
The point is that if ell,n are even then
(1)D(ell,n)+(1)D(ell+1,n)=0
This is because ell and ell+1 differ only in the last digit in base n.
That means k=0ell+1(1)D(k,n)=0 for ell even, because it can be split into ell+1 pairs which each sum to 0.
Now if m=ell+1 is odd then
f(m,n)=k=0ell+1(1)D(k,n)(1)D(0,n)=01=1,
whereas if m=ell is even then
f(m,n)=k=0ell+1(1)D(k,n)(1)D(0,n)(1)D(ell+1,n)=1(1)D(ell+1,n),
and since (1)D(ell+1,n){1,1}, we get f(m,n){2,0}

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?