# Discrete math problem

## Homework Statement

Given a positive integer n written in decimal form, the alternating sum of the digits of n is obtained by starting with the right-most digit, subtracting the digit immediately to its left, adding the next digit to the left, subtracting the next digit and so forth. For example, the alternating sum of the digits of 180,928 is 8-2+9-0+8-1= 2. Justify the fact that for any nonnegative integers n, if the alternating sum of the digits of n is divisible by 11, then n is divisible by 11.

## Homework Equations

There is no relevant equations. The topic is direct proof and counterexample

## The Attempt at a Solution

By exhaustion, it works, but I did not find any algebraic way to prove it.

## Answers and Replies

I think it will work out if you use the digital representation of the number, meaning write out the n-digit number as anan-1...a1a0 = an10n + an-110n-1+ ... + a1101 + a0100 and then recall that 10≡-1(mod 11).

edit: I don't think I made that very clear. Start by writing out the alternating sum the way it says, but then recalling that -1≡10(mod 11) I don't think it's hard to get from there to the digital form of the number with all those powers of 10 & the result you're looking for. Anyway I hope that helps.

Last edited: