login
A355950
a(n) = Sum_{k=1..n} k^(k-1) * floor(n/k).
2
1, 4, 14, 81, 707, 8495, 126145, 2223364, 45270095, 1045270723, 26982695325, 769991073865, 24068076196347, 817782849568143, 30010708874959403, 1182932213483903598, 49844124089150772080, 2235755683827890358557, 106363105981739131891399
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{k=1..n} Sum_{d|k} d^(d-1).
G.f.: (1/(1-x)) * Sum_{k>0} k^(k-1) * x^k/(1 - x^k).
PROG
(PARI) a(n) = sum(k=1, n, n\k*k^(k-1));
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, d^(d-1)));
(PARI) my(N=20, x='x+O('x^N)); Vec(sum(k=1, N, k^(k-1)*x^k/(1-x^k))/(1-x))
(Python)
def A355950(n): return n*(1+n**(n-2))+sum(k**(k-1)*(n//k) for k in range(2, n)) if n>1 else 1 # Chai Wah Wu, Jul 21 2022
CROSSREFS
Partial sums of A262843.
Sequence in context: A187847 A277039 A003707 * A063862 A222497 A327355
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 21 2022
STATUS
approved