Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A008904
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A008904 Final nonzero digit of n!. +0
18
1, 1, 2, 6, 4, 2, 2, 4, 2, 8, 8, 8, 6, 8, 2, 8, 8, 6, 8, 2, 4, 4, 8, 4, 6, 4, 4, 8, 4, 6, 8, 8, 6, 8, 2, 2, 2, 4, 2, 8, 2, 2, 4, 2, 8, 6, 6, 2, 6, 4, 2, 2, 4, 2, 8, 4, 4, 8, 4, 6, 6, 6, 2, 6, 4, 6, 6, 2, 6, 4, 8, 8, 6, 8, 2, 4, 4, 8, 4, 6, 8, 8, 6, 8, 2, 2, 2, 4, 2, 8, 2, 2, 4, 2, 8, 6, 6, 2, 6 (list; graph; listen)
OFFSET

0,3

COMMENT

Jean-Paul Allouche (Jean-Paul.Allouche(AT)lri.fr), Jul 25, 2001: this sequence is not ultimately periodic. This can be deduced from the fact that the sequence can be obtained as a fixed point of a morphism.

The decimal number .1126422428... formed from these digits is a transcendental number; see the article by G. Dresden. The Mathematica code uses Dresden's formula for the last nonzero digit of n!; this is more efficient than simply calculating n! and then taking its least-significant digit. - Greg Dresden (dresdeng(AT)wlu.edu), Feb 21 2006

REFERENCES

J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 202.

F. M. Dekking, Regularity and irregularity of sequences generated by automata, S\'em. Th\'eor. Nombres, Bordeaux, Expos\'e 9, 1979-1980, pages 9-01 to 9-10.

Gregory P. Dresden, Three transcendental numbers from the last non-zero digits of n^n, F_n and n!, Mathematics Magazine, pp. 96-105, vol. 81, 2008.

S. Kakutani, Ergodic theory of shift transformations, in Proc. 5th Berkeley Symp. Math. Stat. Prob., Univ. Calif. Press, vol. II, 1967, 405-414.

J. C. Martin, The structure of generalized Morse minimal sets on m symbols, Trans. Amer. Math. Soc. 232 (1977), 343-355.

LINKS

T. D. Noe, Table of n, a(n) for n=0..1000

K. S. Brown, The least significant nonzero digit of n!

G. Dresden, Home page.

MathPages, Least Significant Non-Zero Digit of n!

Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics.

Index entries for sequences related to final digits of numbers

Index entries for sequences related to factorial numbers

FORMULA

The generating function for n>1 is as follows: for n = a_0 + 5 a_1 + 5^2 a_2 + ... +5^N a_N (the expansion of n in base-5), then the last nonzero digit of n!, for n>1, is 6*\prod_{i=0}^N (a_i)! (2^(i a_i)) mod 10 - Greg Dresden (dresdeng(AT)wlu.edu), Feb 21 2006

a(n) = f(n,1,0) with f(n,x,e) = if n<2 then A010879(x*A000079(e)) else f(n-1,A010879(x*A132740(n),e+A007814(n)-A112765(n)). [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Aug 16 2008]

EXAMPLE

6! = 720, so a(6) = 2.

MATHEMATICA

Do[m = n!; While[Mod[m, 10] == 0, m = m/10]; Print[Mod[m, 10]], {n, 0, 100}]

f[n_] := Mod[6Times @@ (Rest[FoldList[{ 1 + #1[[1]], #2!2^(#1[[1]]#2)} &, {0, 0}, Reverse[IntegerDigits[n, 5]]]]), 10][[2]] (* program contributed by Jacob A. Siehler *) - Greg Dresden (dresdeng(AT)wlu.edu), Feb 21 2006

CROSSREFS

Cf. A008905, A000142.

Sequence in context: A059574 A004600 A021795 this_sequence A074382 A061350 A046276

Adjacent sequences: A008901 A008902 A008903 this_sequence A008905 A008906 A008907

KEYWORD

nonn,base,nice

AUTHOR

Russ Cox (rsc(AT)swtch.com)

EXTENSIONS

More terms from Greg Dresden (dresdeng(AT)wlu.edu), Feb 21 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 11 12:57 EST 2009. Contains 170656 sequences.


AT&T Labs Research