# I have a set of numbers

1. Oct 2, 2005

### Trepidation

I have a set of numbers, $$n_{1}$$ through $$n_{z}$$. Some of these n values are positive integers and some are positive rational non-integers.

How can I determine how many are positive integers?

In other words, I have a set of numbers. There are z numbers in this set. I don't need to know which are zeros, which are positive integers, and which are neither... But I need to know HOW MANY positive integers there are.

Perhaps some function that would make the value of any positive integer 1, and the value of any other real number 0? Has that been done?

Thank you ^^.

Note: I don't know anything about formal set theory, so don't take my use of the word "set" to imply that my problem involves that at all. Thanks.

Last edited: Oct 2, 2005
2. Oct 2, 2005

### AKG

This seems essentially impossible. What are you allowed to do with these numbers? I can't imagine being allowed to do anything with these numbers that would allow you to determine what kind of number it is that is any different from knowing what the number is in the first place. For example, you could take the sum of all the number, then take the sum of all the numbers except n1. Is the difference of those two sums zero, and integer, or a non-integer? Answering this question will tell you what n1 is, but this is no different than cheating and knowing what n1 is in the first place. But if you are totally in the dark as to what these numbers are, then you shouldn't be able to determine what the sum of all the number is. In fact, you shouldn't be able to do anything with these numbers that will give you information about what kind of number they are.

3. Oct 2, 2005

### CRGreathouse

You can define any function you want; this would be a fine way to solve your problem.

As far as terminology goes, it's only a set if duplicates don't count. As sets, {0, 0} = {0}; if not, then you're working with sequences, ordered tuples, or something else.

4. Oct 2, 2005

### Trepidation

I do know what n1 is in the first place; I know the identities of all of these numbers in any given instance.

What I mean is that the numbers are given by an equation: $$\frac{x}{a} = n_{a}$$, where a is equal to every positive integer such that $$2 \leq a \leq x$$. So:

$$\frac{x}{1} = n_{1} = \frac{x}{1}$$

$$\frac{x}{2} = n_{2} = \frac{x}{2}$$

$$\frac{x}{3} = n_{3} = \frac{x}{3}$$

$$\frac{x}{4} = n_{4} = \frac{x}{4}$$

...

$$\frac{x}{x} = n_{x} = \frac{x}{x}$$

As you can see, this is related to factoring... For any a for which f is evenly divisible by a, na is equal to an integer. For any a for which f is not evenly divisible by a, na is equal to a non-integer. (I apologize, but I was wrong when I said some of the numbers were equal to zero. I had mixed up this problem and the larger problem of which it was a part when explaining... I'm very sorry for making such an idiotic mistake.)

So, to find how many factors (not PRIME factors, just factors in general) any given integer x has, I just need to run it through this algorithm and I'll get a set of integers and non-integers... If I can somehow take that set of numbers and count how many integers there are, I will then have the number of factors of x.

I'd like to find an explicit function for this, not simply define it to do what I want it to. Thank you though ^^.

And thanks for the clarification on the terminology!

5. Oct 2, 2005

### AKG

So why didn't you say so?! How did you expect anyone to help you with this problem without telling us what the numbers are?
Let pi be the ith prime number, so p1 = 2, p2 = 3, p3 = 5, etc. Any natural number has a unique prime factorization, and we can write any natural number x in the following form:

$$x = \prod _{i=1} ^{\infty} p_i^{a_i}$$

Then x has the following number of factors:

$$\prod _{i = 1} ^{\infty} (a_i + 1)$$

6. Oct 4, 2005