MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: count zeros in a number

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121814] Re: count zeros in a number
  • From: Gabriel Landi <gtlandi at gmail.com>
  • Date: Mon, 3 Oct 2011 04:23:43 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201110020636.CAA28027@smc.vnet.net>

num = Mod[24^24*55^55, 10^56];
Count[IntegerDigits@num, 0]

This is the simplest way I found. 

On Oct 2, 2011, at 3:36 AM, dimitris wrote:

> Hello.
> 
> Consider e.g. the number 24^24*55^55.
> This number ends with exactly 55 zeros as the following demonstrate
> 
> In[201]:= Mod[24^24*55^55, 10^55]
> Mod[24^24*55^55, 10^56]
> 
> Out[201]= 0
> Out[202]= 20000000000000000000000000000000000000000000000000000000
> 
> 
> What I want now is a way to count the zeros that a number ends without
> knowing in advance this number of zeros like in the above example.
> 
> Thanks in advance.
> Dimitris
> 




  • Prev by Date: Re: count zeros in a number
  • Next by Date: Re: count zeros in a number
  • Previous by thread: count zeros in a number
  • Next by thread: Re: count zeros in a number