(Python 2.7)
from math import factorial as fct
....
def trailing_zero(n):
....k=0
....while n!=0:
........n/=5
........k+=n
....return k
.... def A255400():
....index = 1
....f = 1
....while True:
........if trailing_zero(f) == index:
............print "A255400("+str(index)+") = " +str(f)
............index += 1
........elif trailing_zero(f) > index:
............while True:
................clnzer = str(fct(f))[:trailing_zero(f)]
................if index*'0' in clnzer and (index+1)*'0' not in clnzer:
....................print "A255400("+str(index)+") = " +str(f)
....................index += 1
....................f = 0
....................break
.............f +=1
........f +=1
....return
(Python)
import re
def A255400(n):
....f, i, s = 1, 0, re.compile('[09]*[19]0{'+str(n)+'}[19][09]*')
....while s.match(str(f)+'1') == None:
........i += 1
........f *= i
....return i # Chai Wah Wu, Apr 02 2015
