OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..14
FORMULA
MAPLE
b:= proc(n) option remember;
`if`(n=0, 1, n*b(n-1)+(-1)^n)
end:
a:= n-> b((<<0|1>, <1|1>>^n)[1, 2]):
seq(a(n), n=0..10); # Alois P. Heinz, May 08 2020
MATHEMATICA
lst = {};
Do[AppendTo[lst, Subfactorial[Fibonacci[n]]], {n, 0, 2*3!}];
lst
(* Second program: *)
b[n_] := b[n] = If[n == 0, 1, n*b[n-1] + (-1)^n];
a[n_] := b[MatrixPower[{{0, 1}, {1, 1}}, n][[1, 2]]];
Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Apr 22 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jun 17 2009
EXTENSIONS
Definition rephrased by R. J. Mathar, Jun 27 2009
a(0)=1 prepended by Alois P. Heinz, May 08 2020
STATUS
approved