login
A161745
The subfactorial with index Fibonacci(n).
1
1, 0, 0, 1, 2, 44, 14833, 2290792932, 18795307255050944540, 108610077126170304674801654684367969729, 4670745770631032719532167343578469593767847509478551181633606988413996494
OFFSET
0,5
LINKS
FORMULA
a(n) = A000166(A000045(n)). - R. J. Mathar, Jun 27 2009
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
Sequence in context: A275307 A356484 A291808 * A048566 A374293 A321058
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition rephrased by R. J. Mathar, Jun 27 2009
a(0)=1 prepended by Alois P. Heinz, May 08 2020
STATUS
approved