[go: up one dir, main page]

login
A355888
a(n) = Sum_{k=1..n} k! * floor(n/k).
1
1, 4, 11, 38, 159, 888, 5929, 46276, 409163, 4038086, 43954887, 522957240, 6749978041, 93928274284, 1401602642411, 22324392570758, 378011820666759, 6780385526758368, 128425485935590369, 2561327494115859316, 53652269665825304363, 1177652997443472901166
OFFSET
1,2
FORMULA
a(n) = Sum_{k=1..n} Sum_{d|k} 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!);
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, d!));
(PARI) my(N=30, x='x+O('x^N)); Vec(sum(k=1, N, k!*x^k/(1-x^k))/(1-x))
(Python)
from math import factorial
def A355888(n): return factorial(n)+n+sum(factorial(k)*(n//k) for k in range(2, n)) if n>1 else 1 # Chai Wah Wu, Jul 21 2022
CROSSREFS
Partial sums of A062363.
Sequence in context: A149256 A149257 A255706 * A203161 A050987 A137191
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 20 2022
STATUS
approved