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.

A181589 Least value of n such that P(n) - 1/e < 10^(-i), i=1,2,3... . P(n) = (n/(n+1))^(n-1) the probability of a random forest on n be a tree.

Original entry on oeis.org

6, 56, 553, 5519, 55183, 551820, 5518192, 55181917, 551819162, 5518191618, 55181916176, 551819161758, 5518191617572, 55181916175717, 551819161757164, 5518191617571636, 55181916175716349, 551819161757163483
Offset: 1

Views

Author

Washington Bomfim, Oct 31 2010

Keywords

Comments

The probability P(n) = A000169(n)/A000272(n+1). It is known that lim_{n->inf}p(n) = 1/e. (See Flajolet and Sedgewick link, pp 632, where we can find a function of the number of components k).
Both P(n) and the probability that a permutation on n objects be a derangement tend to 1/e when n rises to infinity. So the events a random forest be a tree and a random permutation be a derangement become equiprobable as n tends to infinity.
The probability P(n) approaches 1/e quite slowly as this sequence shows. See image clicking the first link.

Examples

			a(1) = 6, a(2) = 56, so for n in the interval 6...55 if we use 1/e as the probability P, we make an error less than 10^(-1). In general if n is in the interval a(i), ... , a(i+1)-1, this error is less than 10^(-i).
		

Crossrefs

A243293 Number of factorials < 10^n.

Original entry on oeis.org

3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15, 16, 17, 18, 18, 19, 20, 21, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 29, 29, 30, 31, 31, 32, 33, 33, 34, 34, 35, 36, 36, 37, 38, 38, 39, 40, 40, 41, 41, 42, 43, 43, 44, 44, 45, 46, 46, 47, 47, 48, 49, 49, 50, 50, 51, 52, 52, 53, 53
Offset: 1

Views

Author

Derek Orr, Jun 02 2014

Keywords

Comments

A181590(150) = 95 does not agree with a(150) = 96.
0! and 1! are the same number so a(n) counts it as 1 number.
a(n) is also the number of terms needed in the series Sum_{k=0..m} 1/k! to calculate exp(1) with a precision of at least n - 1 digits, i.e., exp(1) - Sum_{k=0..a(n)}1/k! < 10^(-n). - Martin Renner, Feb 18 2020

Examples

			There are 4 factorials < 10^2: 0! = 1! = 1, 2! = 2, 3! = 6, and 4! = 24. Thus a(2) = 4.
		

Crossrefs

Programs

  • Mathematica
    f=1; t=0; n=10; L={}; While[Length[L] < 100, t++; f*=t; While[f > n, AppendTo[ L, t-1]; n *= 10]]; L (* Giovanni Resta, Feb 19 2020 *)
  • PARI
    a(n) = {my(tot=0); for(k=1,10^n,if(k!<10^n,tot++); if(k!>=10^n, break)); return(tot)}
    n=1; while(n<100,print1(a(n),", "); n++)
Showing 1-2 of 2 results.