login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A344820 a(n) = Sum_{k=1..n} floor(n/k) * (-n)^(k-1). 12
1, 0, 9, -52, 520, -6636, 102984, -1864600, 38741463, -909081740, 23775986069, -685854111804, 21633935838489, -740800448012044, 27368368159530285, -1085102592823737200, 45957792326631241516, -2070863582899905915336, 98920982783031811482920, -4993219047619535240997780 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n) = Sum_{k=1..n} Sum_{d|k} (-n)^(d-1).
a(n) = [x^n] (1/(1 - x)) * Sum_{k>=1} x^k/(1 + n*x^k).
a(n) = [x^n] (1/(1 - x)) * Sum_{k>=1} (-n)^(k-1) * x^k/(1 - x^k).
a(n) ~ -(-1)^n * n^(n-1). - Vaclav Kotesovec, Jun 05 2021
MATHEMATICA
a[n_] := Sum[(-n)^(k - 1) * Quotient[n, k], {k, 1, n}]; Array[a, 20] (* Amiram Eldar, May 29 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, n\k*(-n)^(k-1));
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, (-n)^(d-1)));
(Magma)
A344820:= func< n | (&+[Floor(n/k)*(-n)^(k-1): k in [1..n]]) >;
[A344820(n): n in [1..40]]; // G. C. Greubel, Jun 26 2024
(SageMath)
def A344820(n): return sum((n//k)*(-n)^(k-1) for k in range(1, n+1))
[A344820(n) for n in range(1, 41)] # G. C. Greubel, Jun 26 2024
CROSSREFS
Diagonal of A344824.
Sums of the form Sum_{k=1..n} q^(k-1)*floor(n/k): this sequence (q=-n), A344819 (q=-4), A344818 (q=-3), A344817 (q=-2), A059851 (q=-1), A006218 (q=1), A268235 (q=2), A344814 (q=3), A344815 (q=4), A344816 (q=5), A332533 (q=n).
Sequence in context: A278000 A159598 A279358 * A156544 A094793 A197499
KEYWORD
sign
AUTHOR
Seiichi Manyama, May 29 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 29 15:34 EDT 2024. Contains 374734 sequences. (Running on oeis4.)