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.

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.

This page as a plain text file.
%I A181590 #11 Jun 02 2014 16:06:28
%S A181590 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 A181590 25,26,26,27,28,29,29,30,31,31,32,33,33,34,34,35,36,36,37,38,38,39,40,
%U A181590 40,41,41,42,43,43,44,44,45,46,46,47,47,48,49,49,50,50,51,52,52,53,53
%N 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.
%C A181590 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 A181590 The probability P(n) approaches 1/e quite quickly as this sequence shows. See image clicking the first link.
%H A181590 ttmath, <a href="http://www.ttmath.org/ttmath">C++ multiprecision math software</a>
%H A181590 Wikipedia, <a href="http://commons.wikimedia.org/wiki/File:Seq1.png">Graph of probabilities</a>
%H A181590 Wikipedia, <a href="http://en.wikipedia.org/wiki/E_(mathematical_constant)">The number e</a>
%e A181590 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 A181590 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 A181590 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 A181590 $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 A181590 Cf. A068985, A000166, A181589.
%K A181590 nonn
%O A181590 1,1
%A A181590 _Washington Bomfim_, Oct 31 2010
%E A181590 More terms from _Robert G. Wilson v_, Nov 05 2010