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.

Showing 1-7 of 7 results.

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

A155891 Least positive integer such that a(n)! starts with n, both written in binary.

Original entry on oeis.org

1, 2, 3, 7, 6, 3, 5, 20, 7, 14, 6, 4, 10, 12, 5, 20, 27, 50, 7, 14, 23, 6, 13, 4, 25, 30, 10, 12, 51, 5, 63, 24, 20, 36, 27, 50, 59, 11, 7, 14, 26, 75, 23, 9, 6, 13, 49, 71, 144, 31, 25, 30, 199, 19, 10, 46, 12, 51, 83, 5, 28, 73, 63, 62, 24, 54, 20, 36, 67, 27, 40, 74, 50, 59, 124
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2009

Keywords

Examples

			a(7) = 5 since 7 = 111_2 (i.e., written in base 2) and 5! = 1111000_2 is the least factorial to have 111 as its most significant binary digits.
		

Crossrefs

Programs

  • C
    See Links section.
  • PARI
    A155891(n)={ local( F=1,k=1 ); while( F\1!=n, F*=k++; while( F>=n+1, F/=2 )); k}
    

A155892 Least positive integer such that a(n)! starts with n, both written in base 3.

Original entry on oeis.org

1, 2, 12, 5, 13, 3, 19, 4, 31, 18, 12, 21, 5, 33, 17, 13, 34, 8, 38, 7, 19, 92, 24, 4, 11, 6, 46, 39, 31, 22, 18, 77, 12, 55, 32, 75, 21, 52, 74, 5, 15, 33, 61, 122, 166, 17, 47, 13, 65, 54, 49, 148, 34, 71, 8, 117, 107, 60, 38, 51, 10, 7, 111, 25, 19, 92, 123, 128, 29, 24, 56, 99
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2009

Keywords

Examples

			a(4) = 5 since 4 = 11[3] (i.e. written in base 2) and 5! = 11110[3] is the least factorial to have 11 as most significant digits in base 3.
		

Crossrefs

Programs

  • PARI
    A155892(n)={ local( F=1,k=1 ); while( F\1!=n, F*=k++; while( F>=n+1, F/=3 )); k}

A155894 Least positive integer such that a(n)! starts with n, both written in base 16.

Original entry on oeis.org

1, 2, 10, 36, 9, 3, 5, 24, 8, 43, 82, 25, 30, 46, 64, 62, 60, 68, 7, 14, 70, 18, 13, 4, 31, 272, 19, 12, 97, 35, 161, 140, 20, 86, 27, 74, 131, 11, 502, 234, 47, 181, 386, 21, 6, 996, 52, 232, 144, 32, 393, 189, 199, 281, 10, 490, 39, 154, 83, 22, 28, 577, 63, 65, 88, 61, 115
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2009

Keywords

Crossrefs

Programs

  • C
    See Links section.
  • PARI
    A155894(n)={ local( F=1,k=1 ); while( F\1!=n, F*=k++; while( F>=n+1, F/=16 )); k}
    

A155893 Least positive integer such that a(n)! starts with n, both written in base 8.

Original entry on oeis.org

1, 2, 4, 16, 13, 3, 46, 27, 7, 14, 6, 32, 10, 39, 5, 20, 86, 50, 11, 26, 121, 18, 38, 4, 31, 199, 34, 12, 139, 28, 63, 62, 61, 67, 60, 125, 59, 16, 37, 58, 47, 108, 23, 21, 41, 13, 112, 71, 194, 56, 25, 30, 302, 19, 166, 46, 55, 150, 83, 116, 219, 73, 90, 140, 164, 54, 207
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2009

Keywords

Crossrefs

Programs

  • PARI
    A155893(n)={ local( F=1,k=1 ); while( F\1!=n, F*=k++; while( F>=n+1, F/=8 )); k}

A155895 Least positive integer such that a(n)! starts with n, both written in base 5.

Original entry on oeis.org

1, 2, 17, 4, 6, 3, 29, 7, 10, 19, 31, 8, 18, 14, 37, 61, 81, 17, 33, 11, 63, 94, 9, 4, 13, 24, 16, 6, 27, 22, 52, 152, 28, 21, 143, 45, 35, 29, 67, 7, 62, 15, 247, 181, 193, 10, 105, 48, 12, 97, 19, 167, 36, 72, 146, 75, 31, 391, 69, 40, 186, 486, 133, 8, 57, 46, 18, 103, 115
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2009

Keywords

Examples

			a(3) = 17 since 17! is the least factorial to start with digit "3" when written in base 5. a(5) = 6 since 5 = 10[5] (i.e. written in base 5) and 6! = 720 = 625 + 75 + 20 = 10340[5] is the smallest factorial to start with digits "10" when written in base 5.
		

Crossrefs

Programs

  • PARI
    A155895(n)={ local( F=1,k=1 ); while( F\1!=n, F*=k++; while( F>=n+1, F/=5)); k}

A155896 Least positive integer such that a(n)! starts with n, both written in base 6.

Original entry on oeis.org

1, 2, 5, 4, 8, 3, 9, 26, 52, 18, 25, 10, 33, 53, 32, 15, 13, 20, 30, 5, 17, 42, 7, 4, 23, 43, 78, 50, 28, 113, 8, 44, 19, 334, 59, 100, 195, 27, 22, 14, 91, 172, 371, 16, 93, 9, 12, 102, 66, 26, 46, 95, 279, 303, 69, 331, 272, 52, 286, 79, 264, 298, 18, 21, 190, 104, 47, 138, 255
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2009

Keywords

Examples

			a(3) = 5 since 5!=120 is the least factorial to start with digit "3" when written in base 6. a(8) = 26 since 8 = 12[6] (i.e. written in base 6) and 26! is the smallest factorial to start with digits "12" when written in base 6.
		

Crossrefs

Programs

  • PARI
    A155896(n)={ local( F=1,k=1 ); while( F\1!=n, F*=k++; while( F>=n+1, F/=6)); k}
Showing 1-7 of 7 results.