login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122840 a(n) is the number of 0s at the end of n when n is written in base 10. 36
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,100

COMMENTS

Greatest k such that 10^k divides n.

a(n) = the number of digits in n - A160093(n).

a(A005117(n)) <= 1. [Reinhard Zumkeller, Mar 30 2010]

See A054899 for the partial sums. - Hieronymus Fischer, Jun 8 2012

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A160094(n) - 1.

Contribution from Hieronymus Fischer, Jun 8 2012: (Start)

With m = floor(log_10(n)), frac(x) = x-floor(x):

a(n) = sum_{j=1..m} (1 - ceiling(frac(n/10^j))).

a(n) = m + sum_{j=1..m} (floor(-frac(n/10^j))).

a(n)= A054899(n) - A054899(n-1).

G.f.: g(x)= sum_{j>0} x^10^j/(1-x^10^j). (End)

EXAMPLE

a(160) = 1 because there is 1 zero at the end of 160 when 160 is written in base 10.

PROG

(Haskell)

a122840 n = if n < 10 then 0 ^ n else 0 ^ d * (a122840 n' + 1)

            where (n', d) = divMod n 10

-- Reinhard Zumkeller, Mar 09 2013

CROSSREFS

A007814 is the base 2 equivalent of this sequence.

Cf. A160094, A160093, A001511, A070940, A122841.

Cf. A027868, A054899, A122840, A196563, A196564.

Cf. A004151.

Sequence in context: A118553 A102448 A102683 * A083919 A063665 A072507

Adjacent sequences:  A122837 A122838 A122839 * A122841 A122842 A122843

KEYWORD

nonn,base,easy,changed

AUTHOR

Reinhard Zumkeller, Sep 13 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 22 23:20 EDT 2013. Contains 225585 sequences.