login
a(0)=1, a(1)=2, thereafter a(n) = n*a(n-1)+(n-1)*(n-2)*a(n-2).
1

%I #7 Aug 27 2017 13:42:49

%S 1,2,4,16,88,632,5552,57824,695776,9500128,145097152,2451080192,

%T 45373649024,913400022656,19865889564928,464227147597312,

%U 11599471170191872,308605525316616704,8709955613991289856,259922447412719218688,8177253768239405504512

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

%p f:=proc(n) option remember;

%p if n <= 1 then n+1 else

%p n*f(n-1)+(n-1)*(n-2)*f(n-2); fi; end;

%p [seq(f(n),n=0..40)];

%Y A244430 and A291287 have the same recurrence.

%K nonn

%O 0,2

%A _N. J. A. Sloane_, Aug 27 2017