Skip to main content

Posts

Showing posts with the label java

Digit sums of multiples of 11

"Some multiples of 11 have an even digit sum.  For example, 7*11 = 77 and 7+7 = 14, which is even; 11*11 = 121 and 1+2+1 = 4, which is even.  Do all multiples of 11 have an even digit sum?  (Prove that they do or find the smallest that does not.)"( Source ) To practice my Java programming skills (I've began learning Java about a month ago) I wrote a small program that finds all the numbers for which the statement does not hold. The output looks like this: > run Multilpe11 Some multiples of 11 have an even digit sum.  For example, 7*11 = 77 and 7+7 = 14, which is even; 11*11 = 121 and 1+2+1 = 4, which is even.   Do all multiples of 11 have an even digit sum?  (Prove that they do or find the smallest that does not.) For how many consecutive multiples of 11 would you like to check if the statement is correct:  1000 These are 36 numbers smaller than 1000, that are multiples of 11, but whose digit sum is not even. These numbers are: 209 308 319...