cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A018799 Smallest nonnegative integer m such that m! begins with n in base 10.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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

Examples

			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
		

Crossrefs

Cf. A018854.
Apart from leading term, identical to A076219.

Programs

  • 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 *)
  • 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