login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A000976
Period of 1/n! in base 10.
2
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,7
LINKS
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
a(n) = A051626(A000142(n)). - Michel Marcus, Jan 12 2023
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
Sequence in context: A315818 A315819 A301682 * A315820 A315821 A315822
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
One more term from Sean A. Irvine, Sep 28 2011
STATUS
approved

  NODES
COMMUNITY 1
INTERN 1