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-2 of 2 results.

A101507 Numbers n such that exp(n) has a smaller relative error abs(exp(n)/m!-1) in approximating the closest factorial m!>1 than exp(k) for any k with 1

Original entry on oeis.org

2, 3, 15, 20, 58, 2893, 3172, 13778, 36596, 63894, 208744, 296557, 404667, 11500740, 17800369, 37858613, 38393813, 902477623, 4126573365, 79491128275, 338814192247, 1599109448865
Offset: 1

Views

Author

Hugo Pfoertner, Dec 20 2004

Keywords

Comments

Numbers n such that abs(exp(n)/m!-1)

Examples

			a(1)=2 because exp(2)=7.389 is a better approximation to the nearest factorial 3!=6 with +23% relative error than is exp(1)=2.718 for its closest factorial 2!=2 with +36% relative error.
a(2)=3: exp(3)/4!-1=-0.1631. The next improvement occurs for a(3)=15 because exp(15)/10!-1=-0.099.
a(22)=1599109448865: The relative error of exp(1599109448865) in approximating A101506(22)!=66836971558! is 1.276*10^(-12).
		

Crossrefs

Cf. A101506.

A241730 Number of digits in the decimal expansion of n! minus the number of digits in the decimal expansion of n.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, 27, 28, 29, 31, 32, 34, 35, 37, 39, 40, 42, 43, 45, 46, 48, 50, 51, 53, 55, 56, 58, 60, 61, 63, 65, 66, 68, 70, 72, 73, 75, 77, 79, 80, 82, 84, 86, 88, 89, 91, 93, 95, 97, 99, 100, 102, 104, 106
Offset: 0

Author

Alonso del Arte, Apr 27 2014

Keywords

Examples

			a(5) = 2 because 5! = 120 has three digits, 5 has only one digit, and 3 - 1 = 2.
a(6) = 2 because 6! = 720 has three digits, 6 has only one digit, and 3 - 1 = 2.
a(7) = 3 because 7! = 5040 has four digits, 7 has only one digit, and 4 - 1 = 3.
		

Crossrefs

Programs

  • Maple
    seq(nops(convert(n!,base,10)) - nops(convert(n,base,10)), n=0..50); # Peter Luschny, Apr 28 2014
  • Mathematica
    Table[Length[IntegerDigits[n!]] - Length[IntegerDigits[n]], {n, 0, 79}]
  • PARI
    a(n)=lngamma(n+1)\log(10)-#Str(n)+1 \\ Charles R Greathouse IV, Apr 28 2014

Formula

a(n) = floor(log(n!)/log(10)) - floor(log(n)/log(10)) for n > 0.
a(n) = A034886(n) - A055642(n).
Showing 1-2 of 2 results.