This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A018799 Smallest nonnegative integer m such that m! begins with n in base 10. 13
 0, 2, 9, 8, 7, 3, 6, 14, 96, 27, 22, 5, 15, 42, 25, 89, 69, 76, 63, 16, 87, 113, 54, 4, 23, 30, 205, 85, 34, 28, 62, 164, 41, 245, 17, 9, 36, 128, 11, 8, 185, 53, 351, 73, 369, 118, 12, 265, 129, 7, 21, 38, 235, 66, 46, 258, 81, 597, 279, 43, 72, 13, 559, 18, 203, 120, 311 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Record high values are m = 0, 2, 9, 14, 96, 113, 205, 245, 351, 369, 597, ... (see A279089); these occur, respectively, at n = 1, 2, 3, 8, 9, 22, 27, 34, 43, 45, 58, ... (see A279090). - Jon E. Schoenfield, Jan 30 2017 The existence of such m for each n was proven by Maxfield in 1970. The first 999 terms of this sequence were calculated by Southard in 1983. - Amiram Eldar, Dec 18 2018 LINKS Jon E. Schoenfield, Table of n, a(n) for n = 1..10000 (terms 1..1000 from David W. Wilson). John E. Maxfield, A Note on N!, Mathematics Magazine, Vol. 43. No. 2 (1970), pp. 64-67. Laura Southard, Investigations on Maxfield's Theorem, Pi Mu Epsilon Journal, Vol. 7, No. 8 (1983), pp. 493-495, alternative link. EXAMPLE Since no factorial below 96! ~ 9.91*10^149 starts with 9, we have a(9) = 96. Similarly, 16 first appears as the leading digits of 89! ~ 1.65*10^136 and hence a(16) = 89. - Lekraj Beedassy, Oct 31 2010 and Robert G. Wilson v, Nov 05 2010 MATHEMATICA f[n_] := Block[{k = 0, m}, While[ m = Max[0, Floor@ Log[10, k! ] - Floor@ Log[10, n]]; (k! - Mod[k!, 10^m])/10^m != n, k++ ]; k]; Array[f, 67] (* Robert G. Wilson v, Nov 05 2010 *) PROG (PARI) A018799(n)={ local( F=1, k=0 ); while( F\1!=n, F*=k++; while( F>=n+1, F/=10)); k} \\ M. F. Hasler, Feb 01 2009 CROSSREFS Cf. A018854. Apart from leading term, identical to A076219. Cf. A000142, A008905, A279089, A279090. Sequence in context: A021975 A192599 A021081 * A076219 A077601 A090930 Adjacent sequences:  A018796 A018797 A018798 * A018800 A018801 A018802 KEYWORD nonn,base AUTHOR STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 21 23:04 EDT 2019. Contains 326169 sequences. (Running on oeis4.)