Can You Count the Zeros Between Two Numbers?

  • Thread starter Thread starter whatever84
  • Start date Start date
whatever84
Messages
3
Reaction score
0
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
 
Physics news on Phys.org
Yes, and it is simple. Use a combinatorial aproach.
 
whatever84 said:
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
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.
 
whatever84 said:
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
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 by a moderator:
Oh, zero digits.
 
Thread 'Derivation of equations of stress tensor transformation'
Hello ! I derived equations of stress tensor 2D transformation. Some details: I have plane ABCD in two cases (see top on the pic) and I know tensor components for case 1 only. Only plane ABCD rotate in two cases (top of the picture) but not coordinate system. Coordinate system rotates only on the bottom of picture. I want to obtain expression that connects tensor for case 1 and tensor for case 2. My attempt: Are these equations correct? Is there more easier expression for stress tensor...

Similar threads

Back
Top