OFFSET
1,7
LINKS
T. D. Noe, Table of n, a(n) for n = 1..200
Michael Penn, From the GOAT number theory book!, YouTube video, 2022.
FORMULA
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
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
MATHEMATICA
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 *)
PROG
(PARI) a(n) = if(n <= 2, return(0)); znorder(Mod(10, n!/2^val(n, 2)/5^val(n, 5)))
val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Jan 11 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
One more term from Sean A. Irvine, Sep 28 2011
STATUS
approved