OFFSET
0,2
EXAMPLE
a(4) = 12 because 12! = 479001600. When you delete the trailing zeros, you have 4790016 which ends in 16 = 2^4.
MATHEMATICA
f[n_] := Block[{a = 2^n, k = 1, len = 10^Floor[ Log[10, 2^n] + 1], p = 1}, While[ Mod[p, len] != a, p = k*p; While[ Mod[p, 10] == 0, p /= 10]; p = Mod[p, 100*len]; k++ ]; k - 1]; lst = {}; Do[ AppendTo[ lst, f@n], {n, 0, 37}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jan 07 2001
EXTENSIONS
a(15) corrected, a(18) through a(37) and better definition from Jon E. Schoenfield Sep 02 2009.
STATUS
approved