Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5346

Re: count zeros in a number

From Gabriel Landi <gtlandi@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: count zeros in a number
Date 2011-10-03 08:31 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j6brsn$8o3$1@smc.vnet.net> (permalink)
References <201110020636.CAA28027@smc.vnet.net>

Show all headers | View raw


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
> 

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: count zeros in a number Gabriel Landi <gtlandi@gmail.com> - 2011-10-03 08:31 +0000

csiph-web