login
Decimal expansion of Sum_{n>=2} 1/A000166(n).
1

%I #44 Oct 04 2024 00:25:18

%S 1,6,3,8,2,2,7,0,7,4,5,0,5,3,7,0,6,4,7,5,4,2,8,9,3,1,1,4,1,5,1,1,2,2,

%T 6,6,1,0,6,3,5,9,3,2,4,9,6,4,4,4,3,6,1,6,4,7,2,3,2,6,2,8,2,8,7,2,6,3,

%U 0,5,8,2,9,4,4,0,6,8,2,2,3,9,8,1,8,3,0,3,9,5,6,7,2,0,7,3,2,9,9,6,0,9,1,0,8,1,3,9,0,9,1,5,3

%N Decimal expansion of Sum_{n>=2} 1/A000166(n).

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Derangement">Subfactorial/Derangement definition</a>

%F Equals Sum_{n>=2} 1/round(n!/e).

%e 1.63822707450537064754289311415112266106359324964443616472326282872630582...

%t a[n_]:=If[n>0, Round[n!/E], 1]; RealDigits[Sum[1/a[n], {n, 2, 500}], 10, 113][[1]](* _Indranil Ghosh_, Mar 12 2017 *)

%o (Derive)

%o PrecisionDigits ≔ 1000

%o NotationDigits ≔ 1000

%o sum(1/ROUND(n!/e), n, 2, 500)

%Y Cf. A000166.

%K nonn,cons

%O 1,2

%A _Miguel Alejandro Moreno Barrientos_, Jan 26 2017