A000976 Period of 1/n! in base 10.
0, 0, 1, 1, 1, 1, 6, 6, 18, 18, 18, 54, 54, 378, 1134, 1134, 9072, 81648, 81648, 81648, 1714608, 18860688, 18860688, 56582064, 56582064, 735566832, 19860304464, 139022131248, 139022131248, 417066393744, 2085331968720, 2085331968720, 68815954967760
Offset: 1
Links
- T. D. Noe, Table of n, a(n) for n = 1..200
- Michael Penn, From the GOAT number theory book!, YouTube video, 2022.
Programs
-
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 *)
-
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
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
Extensions
One more term from Sean A. Irvine, Sep 28 2011