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

Zeros between [a, b]

  1. Mar 27, 2008 #1
    Dear all,

    Can anybody tell me if there is any mathematical way to know how many zeros between a and b, where we should consider all the numbers between them (inclusive).

    E.g.

    a = 10,
    b = 12,

    numbers in between: 10, 11, 12

    Thus, the answer is --> 1

    I made a simple program to do this for me by looping and incrementing, but as the numbers become bigger, it take "long" time to get the result.

    Thus, math theories might be the solution for such problem.

    Thanks
     
  2. jcsd
  3. Mar 27, 2008 #2
    Yes, and it is simple. Use a combinatorial aproach.
     
  4. Mar 27, 2008 #3

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    I don't understand what you mean. When you say "zeros" I assume you mean the zeroes of some function, but your example appears to be how many integers there are between two given integers.
     
  5. Mar 27, 2008 #4
    If you mean look at each number as a string and count how many characters are zero I think you should try for solving in general generate a(n) = the number of zeros in [1, n] then [b,c] = a(c) - a(b-1). See http://www.research.att.com/~njas/sequences/A061217
     
    Last edited: Mar 27, 2008
  6. Mar 27, 2008 #5

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Oh, zero digits.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?