STATUS
reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
a[n_] := n! * DivisorSum[n, (n/#)! / #! &]; Array[a, 17] (* Amiram Eldar, Aug 30 2023 *)
approved
editing
proposed
approved
editing
proposed
return sum(f*(a := factorial(n//d))//(b:= factorial(d)) + (f*b//a if d**2 < n else 0) for d in divisors(n, generator=True) if d**2 <= n) # Chai Wah Wu, Jun 09 2022
(Python)
from math import factorial
from sympy import divisors
def A354862(n):
f = factorial(n)
return sum(f*(a := factorial(n//d))//(b:= factorial(d)) + (f*b//a if d**2 < n else 0) for d in divisors(n, generator=True) if d**2 <= n) # Chai Wah Wu, Jun 09 2022
approved
editing
reviewed
approved
proposed
reviewed