[go: up one dir, main page]

login
A355887
a(n) = Sum_{k=1..n} k^k * floor(n/k).
3
1, 6, 34, 295, 3421, 50109, 873653, 17651130, 405071647, 10405074777, 295716745389, 9211817240589, 312086923832843, 11424093750214407, 449317984131076935, 18896062057857406028, 846136323944194170206, 40192544399241119212807
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{k=1..n} Sum_{d|k} d^d.
G.f.: (1/(1-x)) * Sum_{k>0} (k * x)^k/(1 - x^k).
PROG
(PARI) a(n) = sum(k=1, n, n\k*k^k);
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, d^d));
(PARI) my(N=20, x='x+O('x^N)); Vec(sum(k=1, N, (k*x)^k/(1-x^k))/(1-x))
(Python)
def A355887(n): return n*(1+n**(n-1))+sum(k**k*(n//k) for k in range(2, n)) if n>1 else 1 # Chai Wah Wu, Jul 21 2022
CROSSREFS
Partial sums of A062796.
Sequence in context: A302148 A218685 A108432 * A337350 A245466 A362627
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 20 2022
STATUS
approved