OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..800
MAPLE
with(numtheory):
d:= n-> n*add(i[2]*pi(i[1])/i[1], i=ifactors(n)[2]):
a:= proc(n) option remember;
`if`(n<2, 0, a(n-2)*n+doublefactorial(n-2)*d(n))
end:
seq(a(n), n=0..40);
MATHEMATICA
d[n_] := n*Sum[i[[2]]*PrimePi[i[[1]]]/i[[1]], {i, FactorInteger[n]}];
a[n_] := a[n] = If[n < 2, 0, a[n-2]*n + (n-2)!!*d[n]];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, May 02 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 26 2015
STATUS
approved