login
a(n) = n*a(n-1) + n^(n mod 2), a(0) = 0.
3

%I #18 May 21 2021 18:17:48

%S 0,1,3,12,49,250,1501,10514,84113,757026,7570261,83272882,999274585,

%T 12990569618,181867974653,2728019619810,43648313916961,

%U 742021336588354,13356384058590373,253771297113217106,5075425942264342121,106583944787551184562,2344846785326126060365

%N a(n) = n*a(n-1) + n^(n mod 2), a(0) = 0.

%H Alois P. Heinz, <a href="/A344419/b344419.txt">Table of n, a(n) for n = 0..450</a>

%F E.g.f.: ((x+1)*cosh(x)-1)/(1-x).

%F a(n) = A344262(n) - n! = A344262(n) - A000142(n).

%F a(n) = A344418(n) - A155521(n-1) for n > 0.

%F Lim_{n->infinity} a(n)/n! = 2*cosh(1)-1 = 2*A073743-1 = e+1/e-1 = A137204-1. - _Amrit Awasthi_, May 20 2021

%p a:= proc(n) a(n):= n*a(n-1) + n^(n mod 2) end: a(0):= 0:

%p seq(a(n), n=0..23);

%Y Cf. A000142, A001113, A073743, A155521, A137204, A344262, A344418.

%K nonn

%O 0,3

%A _Alois P. Heinz_, May 17 2021