login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181590 Least value of n such that |P(n) - 1/e| < 10^(-i), i=1,2,3... . P(n)=floor(n!/e + 1/2)/n! is the probability of a random permutation on n objects be a derangement. 2

%I

%S 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,

%T 25,26,26,27,28,29,29,30,31,31,32,33,33,34,34,35,36,36,37,38,38,39,40,

%U 40,41,41,42,43,43,44,44,45,46,46,47,47,48,49,49,50,50,51,52,52,53,53

%N Least value of n such that |P(n) - 1/e| < 10^(-i), i=1,2,3... . P(n)=floor(n!/e + 1/2)/n! is the probability of a random permutation on n objects be a derangement.

%C Both P(n) and the probability that a rooted forest on [n] be a tree tend to 1/e when n rises to infinity. So the events random forest be a tree and random permutation be a derangement become equiprobable as n tends to infinity.

%C The probability P(n) approaches 1/e quite quickly as this sequence shows. See image clicking the first link.

%H ttmath, <a href="http://www.ttmath.org/ttmath">C++ multiprecision math software</a>

%H Wikipedia, <a href="http://commons.wikimedia.org/wiki/File:Seq1.png">Graph of probabilities</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/E_(mathematical_constant)">The number e</a>

%e a(2) = 4, a(3) = 6, so for n in the interval 4...5, if we use 1/e as the probability P, we make an error less than 10^(-1).

%e In general if n is in the interval a(i), ... , a(i+k)-1, k the least positive integer such that a(i+k) > a(i), this error is less than 10(-i-k+1).

%e For example, a(11) = a(12) = 14, k = 2 and if n is in the interval 14...14, if we use 1/e as the probability P, we make an error less than 10^(-12).

%t $MaxExtraPrecision = 100; f[n_] := Block[{k = 1}, While[ Abs[ Floor[(k!/E + 1/2)]/k! - 1/E] > 1/10^n, k++ ]; k]; Array[f, 71] (* _Robert G. Wilson v_, Nov 05 2010 *)

%Y Cf. A068985, A000166, A181589.

%K nonn

%O 1,1

%A _Washington Bomfim_, Oct 31 2010

%E More terms from _Robert G. Wilson v_, Nov 05 2010

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 15 09:03 EST 2019. Contains 329144 sequences. (Running on oeis4.)