Associated Topics || Dr. Math Home || Search Dr. Math

### Non-negative Integers

```
Date: 11/15/2001 at 22:51:01
From: Jannet Stockton
Subject: Math

1) How many nonnegative integers consisting of one to three digits are
divisible by 5? Leading zeros are not allowed.

I don't know that it includes 0 or not; if it includes 0, the

2) How many nonnegative integers consisting of one to three different
digits are divisible by 5? Leading zeros are not allowed.

The answer is 155, but how can I get it?
```

```
Date: 11/16/2001 at 16:30:16
From: Doctor Ian
Subject: Re: Math

Hi Jannet,

Zero is non-negative, so I would say it's included.

For number 2, since you already know how many integers are divisible
by 5, all you have to do is subtract the ones that have duplicate
digits, e.g., 110, 225, 505, and so on.

Apparently there are 45 such numbers, so you need to show that there
is a systematic way to find them... i.e., one that is guaranteed to
get all of them.

You could start by thinking about the patterns that the numbers would
have to fall into to (1) be divisible by 5 and (2) have a duplicate
digit.  Here are some:

aa0     There would be 9 like this.
aa5     And 9 more like this.
5a5     And 9 more like this.
a00     And 9 more like this.

That gives you 36. If you can find one more pattern, you'll have found
them all.

Does this help?

- Doctor Ian, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
High School Number Theory
High School Puzzles

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search