Skip to main content

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 407 418 429 506 517 528 539 605 616 627 638 649 704 715 726  737 748 759 803 814 825 836 847 858 869 902 913 924 935 946 957 968 979
So, the statement is not true for all multiples of 11. It is only true for multiples of 11 smaller than 209.
And finally the java files, so you can test if for yourself:


Popular posts from this blog

Basic cell counting and segmentation in Matlab

Counting cells manually is a tedious error prone process for humans. Given a large data set of microscopy images this task can be achieved much faster by means of basic computer vision techniques. In this tutorial we will segment cells from an image following a method similar to the one presented by Yongming Chen in 1999. The method uses basic morphological operations  and the watershed algorithm to segment the cells. Nowadays better methods for cell segmentation exist. This method was chosen for its simplicity and ease of implementation. We start with an image of cell-like structures by Anna-Katerina Hadjantonakis and Virginia E Papaioannou . A = imread('cells.jpg'); We convert the image to grayscale: I = rgb2gray(A); To be able to extract the dimmer cells, it is necessary to perform some local contrast adjustments I = adapthisteq(I); Objects on the borders can be caused by noise and other artifacts. We can eliminate objects on the borders

Project planning in a text file

Whenever you work on a project it is important to be able to plan it ahead of time. This holds true for small and big project, from planning a trip to the spa to building a spaceship. The small project plans can be maintained in you thoughts while bigger ones require tools to help you see the big-picture of the project and manage task at a lower level. There are projects which start with a fully prepared plan and projects which pivot overnight, thus invalidating any original plan. For the latter flexibility is very important, and tools like Trello offer a great solution because they can be adjusted to fit your project. However, it may happen sometimes that the project starts adjusting to the tool or that you still want to maintain a bigger picture of the main points of the project. You may also need to produce a rough development schedule to serve as a long term road-map. I have prototyped a tool (and defined a workflow) which allows you to plan such projects. To better understa

Four qualities of good graphical visualisations

1. Show the data without distorting it. 2. Present a large amount of data and remain coherent. 3. The technique used to create the graphic should not interfere with the user reasoning about the data.  4. Reveal both a broad overview of the data, but keep enough detail for the curious viewer.