OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..37
MAPLE
h:= proc(n) option remember; `if`(n=0, 1, h(n-1)* n^n) end:
a:= proc(n) n^n *`if`(n=0, 0,
a(n-1)+h(n-1)*n*add(i[2]/i[1], i=ifactors(n)[2]))
end:
seq(a(n), n=0..15); # Alois P. Heinz, Sep 18 2015
MATHEMATICA
a[n_] := If[n<2, 0, With[{h = Hyperfactorial[n]}, h Sum[{p, e} = pe; e/p, {pe, FactorInteger[h]}]]];
a /@ Range[0, 15] (* Jean-François Alcover, Nov 14 2020 *)
PROG
(Python 3.8+)
from math import prod
from collections import Counter
from sympy import factorint
def A260619(n):
s = prod(i**i for i in range(2, n+1))
return sum(s*e//p for p, e in sum(((lambda x: Counter({k:x[k]*m for k in x}))(factorint(m)) for m in range(2, n+1)), start=Counter({2:0})).items()) if n > 1 else 0 # Chai Wah Wu, Jun 12 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Matthew Campbell, Sep 17 2015
EXTENSIONS
More terms from Alois P. Heinz, Sep 18 2015
STATUS
approved