|
|
A168386
|
|
Arithmetic derivative of the double factorial of n.
|
|
2
|
|
|
0, 0, 1, 1, 12, 8, 112, 71, 1472, 1269, 17408, 14904, 270336, 204147, 4199424, 4143285, 87834624, 72462870, 1797783552, 1411253955, 40414740480, 36183623805, 937430876160, 845972658090, 26095323709440, 24311657884500, 707908274749440, 869872809558375
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
A003415 := proc(n) local pfs ; if n <= 1 then 0 ; else pfs := ifactors(n)[2] ; n*add(op(2, p)/op(1, p), p=pfs) ; fi; end proc:
# second Maple program:
d:= n-> n*add(i[2]/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:
|
|
MATHEMATICA
|
d[n_] := n*Total[#2/#1& @@@ FactorInteger[n]];
a[0] = a[1] = 0; a[n_] := d[n!!];
|
|
PROG
|
(Python 3.8+)
from collections import Counter
from sympy import factorial2, factorint
def A168386(n): return sum((factorial2(n)*e//p for p, e in sum((Counter(factorint(m)) for m in range(n, 1, -2)), start=Counter({2:0})).items())) if n > 1 else 0 # Chai Wah Wu, Jun 12 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Program replaced by a structured program - R. J. Mathar, Nov 26 2009
|
|
STATUS
|
approved
|
|
|
|