login
A348145
a(n) = Sum_{d|n} (n-d) * d!.
0
0, 1, 2, 7, 4, 31, 6, 115, 44, 625, 10, 4597, 12, 35317, 1286, 322891, 16, 3274699, 18, 36290239, 70688, 439084861, 22, 5748677953, 2424, 80951270473, 6532010, 1220496183295, 28, 19615188116527, 30, 334764639176443, 878169812, 6046686277632097, 144754, 115242738208962829, 36
OFFSET
1,3
COMMENTS
a(p) = p-1 for primes p.
MATHEMATICA
Table[Sum[(i!) (n - i) (1 - Ceiling[n/i] + Floor[n/i]), {i, n}], {n, 50}]
PROG
(PARI) a(n) = sumdiv(n, d, (n-d) * d!); \\ Michel Marcus, Oct 03 2021
CROSSREFS
Sequence in context: A303384 A013623 A345273 * A210421 A326098 A198672
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Oct 02 2021
STATUS
approved