A137581 Number of inner zeros in decimal representation of n!.
0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 2, 2, 0, 1, 1, 1, 2, 3, 3, 3, 4, 1, 2, 3, 2, 3, 4, 1, 2, 0, 3, 1, 4, 1, 2, 4, 8, 4, 0, 6, 4, 4, 3, 3, 6, 1, 4, 4, 7, 6, 6, 5, 6, 5, 4, 7, 4, 6, 5, 12, 6, 7, 6, 5, 8, 7, 10, 6, 4, 9, 7, 19, 7, 7, 6, 14, 7, 11, 8, 8, 9, 11, 8, 16, 8, 7, 8, 14, 7, 8, 8, 11, 16, 10, 14, 4, 13
Offset: 0
Links
- Robert G. Wilson v, Table of n, a(n) for n = 0..10000.
- Index entries for sequences related to factorial numbers.
Programs
-
Haskell
a137581 = a055641 . a004154 -- Reinhard Zumkeller, Apr 01 2015
-
Maple
A137581:= proc(n) uses StringTools; CountCharacterOccurrences(TrimRight(SubstituteAll( convert(n!,string),"0"," "))," ") end proc; # Robert Israel, May 07 2012
-
Mathematica
f[n_] := f[n] = Block[{a = n!}, While[Mod[a, 10] == 0, a = a/10]; Count[ IntegerDigits@a, 0]]; Table[f@n, {n, 0, 98}] (* Robert G. Wilson v, Jan 28 2008 *) Table[DigitCount[n!/10^IntegerExponent[n!,10],10,0],{n,0,100}] (* Harvey P. Dale, Apr 10 2023 *)
Comments