Re: counting problem
EDIT: This post is not entirely correct. I hope I got it right on my subsequent attempt!
rennster said:
I know there are 449 positive odd three-digit integers
Hi rennster:
449 is not correct, but you're only off by one.
Let's forget about negative numbers for now to make the discussion easier; we can always double our final result later to include the negative counterparts.
There are different ways to count the number of 3-digit odd integers; here's the method that popped into my mind first.
We know that this set of integers is {101, 103, 105, ... 999}.
A formula for ALL of the odd integers is
2n−1 as n goes from 1 to infinity.
We're interested in {101, 103, 105, ...}. We get these numbers by adding the odd integers to 100.
100+2n−1 simplifies to
2n+99
Therefore, a formula for the numbers {101, 103, 105, ...} is
2n+99 for
n=1,2,3,...
We want our sequence of numbers to stop at 999. What value of n generates the number 999?
2n+99=999
2n=900
n=450
Therefore,
there are 450 three-digit odd integers because there is a one-to-one correspondence between the sets {1, 2, 3, ... 450} and {101, 103, 105, ... 999}.
Perhaps you arrived at 449 instead because you did the following.
2999−101=449
The error in logic with this approach is that subtraction does not account for the numbers at each end of an interval when counting. Subtraction only gives you the
difference between the numbers at each end of an interval.
For example, how many integers are there from 1 through 10?
You might be tempted to calculate 10 minus 1 and report that there are nine integers from 1 through 10. That's wrong.
rennster said:
... each digit has 4 odd positive integers.
Huh? :shock:
Okay -- maybe you are trying to say something about the fact that after removing all of the numbers that end in the digit 5, the last digit of the remaining numbers cycle through the other four odd numbers less than 10 (i.e., the last digit follows the pattern 1, 3, 7, 9, 1, 3, 7, 9, 1, 3, 7, 9, ...).
If this is what you were thinking, then you're on the right track.
In the formula
2n+99, the last digit of the resulting numbers cycles through 1, 3, 5, 7, 9 for every
five increments of n.
n = 1 to 5 ? 101, 103, 105, 107, 109
n = 6 to 10 ? 111, 113, 115, 117, 119
n = 11 to 15 ? 121, 123, 125, 127, 129
n = 16 to 20 ? 131, 133, 135, 137 ,139
and so on ...
See the pattern?
In other words, there is exactly one number that ends in the digit 5 generated each time n increases through five values.
Therefore, the total number of times that n increases through five values while going from 1 to 450
is the same as the total number of integers that end in the digit 5 within the set {101, 103, 105, ... 999}.
It's very simple to calculate this (i.e., the number of 5-value increases that n goes through on its way from 1 to 450).
Subtracting it from the number of 3-digit odd integers results in the number of 3-digit odd integers that do not end in the digit 5.
Doubling this last calculation accounts for both the negatives and the positives, and that gives the answer to your original question.
So, what do you get :?:
Cheers,
~ Mark