login
A344495
a(0)=1; for n>0 a(n)=(a(n-1) + n) * n if n is odd, a(n-1)*n + n otherwise.
1
1, 2, 6, 27, 112, 585, 3516, 24661, 197296, 1775745, 17757460, 195332181, 2343986184, 30471820561, 426605487868, 6399082318245, 102385317091936, 1740550390563201, 31329907030137636, 595268233572615445, 11905364671452308920, 250012658100498487761, 5500278478210966730764
OFFSET
0,2
FORMULA
a(n) ~ n! * (1 + 3*exp(1)/2 - exp(-1)/2). - Vaclav Kotesovec, Jun 05 2021
EXAMPLE
a(0) = 1;
a(1) = (a(0)+1)*1 = (1+1)*1 = 2 ;
a(2) = a(1)*2+2 = (2*2)+2 = 6 ;
a(3) = (a(2)+3)*3 = (6+3)*3 = 9 ;
MAPLE
a:= proc(n) a(n):= n*a(n-1) + n^(1+(n mod 2)) end: a(0):= 1:
seq(a(n), n=0..22); # Alois P. Heinz, May 21 2021
MATHEMATICA
a[0] = 1; a[n_] := a[n] = n*(a[n - 1] + If[OddQ[n], n, 1]); Array[a, 30, 0] (* Amiram Eldar, May 21 2021 *)
CROSSREFS
Cf. A344262.
Sequence in context: A027213 A027237 A027245 * A193385 A030961 A030826
KEYWORD
nonn,easy
AUTHOR
Amrit Awasthi, May 21 2021
STATUS
approved