%I #30 Jan 12 2023 01:28:32
%S 0,0,1,1,1,1,6,6,18,18,18,54,54,378,1134,1134,9072,81648,81648,81648,
%T 1714608,18860688,18860688,56582064,56582064,735566832,19860304464,
%U 139022131248,139022131248,417066393744,2085331968720,2085331968720,68815954967760
%N Period of 1/n! in base 10.
%H T. D. Noe, <a href="/A000976/b000976.txt">Table of n, a(n) for n = 1..200</a>
%H Michael Penn, <a href="https://www.youtube.com/watch?v=7SoYo8sBcAw">From the GOAT number theory book!</a>, YouTube video, 2022.
%F a(n) = k where k is the smallest integer >= 1 such that 10^k == 1 (mod n!/(2^A011371(n)*5^A027868(n))) where A011371(n) is the highest power of 2 dividing n! and A027868(n) is the largest k such that 5^k | n!. - C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 16 2004, corrected by _David A. Corneth_, Jan 11 2023
%F a(n) = order(10, n!/(2^s*5^t)) where 2^s is largest power of 2 dividing n! and 5^t is largest power of 5 dividing n!. - _Sean A. Irvine_, Sep 29 2011
%F a(n) = A051626(A000142(n)). - _Michel Marcus_, Jan 12 2023
%t Join[{0, 0}, Table[num = n!/(2^IntegerExponent[n!, 2] * 5^IntegerExponent[n!, 5]); MultiplicativeOrder[10, num], {n, 3, 30}]] (* _T. D. Noe_, Jun 21 2012 *)
%o (PARI) a(n) = if(n <= 2, return(0)); znorder(Mod(10,n!/2^val(n,2)/5^val(n,5)))
%o val(n, p) = my(r=0); while(n, r+=n\=p); r \\ _David A. Corneth_, Jan 11 2023
%Y Cf. A000142, A051626.
%K nonn,base
%O 1,7
%A _Simon Plouffe_
%E One more term from _Sean A. Irvine_, Sep 28 2011