Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I have a set of numbers

  1. Oct 2, 2005 #1
    I have a set of numbers, [tex]n_{1}[/tex] through [tex]n_{z}[/tex]. 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. jcsd
  3. Oct 2, 2005 #2

    AKG

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  4. Oct 2, 2005 #3

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  5. Oct 2, 2005 #4
    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: [tex]\frac{x}{a} = n_{a}[/tex], where a is equal to every positive integer such that [tex] 2 \leq a \leq x[/tex]. So:

    [tex]\frac{x}{1} = n_{1} = \frac{x}{1}[/tex]

    [tex]\frac{x}{2} = n_{2} = \frac{x}{2}[/tex]

    [tex]\frac{x}{3} = n_{3} = \frac{x}{3}[/tex]

    [tex]\frac{x}{4} = n_{4} = \frac{x}{4}[/tex]

    ...

    [tex]\frac{x}{x} = n_{x} = \frac{x}{x}[/tex]

    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!
     
  6. Oct 2, 2005 #5

    AKG

    User Avatar
    Science Advisor
    Homework Helper

    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:

    [tex]x = \prod _{i=1} ^{\infty} p_i^{a_i}[/tex]

    Then x has the following number of factors:

    [tex]\prod _{i = 1} ^{\infty} (a_i + 1)[/tex]
     
  7. Oct 4, 2005 #6
    Thanks for your help ^^.

    I solved my problem, btw...
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: I have a set of numbers
  1. I have 2d numbers X (Replies: 4)

  2. Set of real numbers (Replies: 7)

  3. Whole Numbers as a Set (Replies: 4)

  4. Set of ALL numbers? (Replies: 30)

Loading...