cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A329970 a(n) = (-1)^(n + 1) * n * ceiling(n/2) + Sum_{k=1..n} (-1)^k * k^2 * floor(n/k).

This page as a plain text file.
%I A329970 #11 Sep 20 2021 22:14:34
%S A329970 0,0,-2,3,0,-3,-7,16,2,-15,-21,31,24,-15,-57,34,25,-17,-27,77,8,-99,
%T A329970 -111,155,117,-36,-140,40,25,-80,-96,259,112,-157,-249,202,183,-156,
%U A329970 -354,224,203,-40,-62,342,-21,-524,-548,562,488,-34,-358,194,167,-262
%N A329970 a(n) = (-1)^(n + 1) * n * ceiling(n/2) + Sum_{k=1..n} (-1)^k * k^2 * floor(n/k).
%H A329970 Amiram Eldar, <a href="/A329970/b329970.txt">Table of n, a(n) for n = 1..10000</a>
%F A329970 G.f.: x * (1 - x + 2*x^2) / ((1 - x)^2 * (1 + x)^3) + (1/(1 - x)) * Sum_{k>=1} (-1)^k * k^2 * x^k / (1 - x^k).
%F A329970 a(n) = Sum_{k=1..n} (-1)^(k + 1) * (n mod k) * k.
%t A329970 Table[(-1)^(n + 1) n Ceiling[n/2] + Sum[(-1)^k k^2 Floor[n/k], {k, 1, n}], {n, 1, 54}]
%t A329970 nmax = 54; CoefficientList[Series[x (1 - x + 2 x^2)/((1 - x)^2 (1 + x)^3) + 1/(1 - x) Sum[(-1)^k k^2 x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
%t A329970 Table[Sum[(-1)^(k + 1) Mod[n, k] k, {k, 1, n}], {n, 1, 54}]
%o A329970 (PARI) a(n) = (-1)^(n + 1)*n*ceil(n/2) + sum(k=1, n, (-1)^k * k^2 * (n\k)); \\ _Michel Marcus_, Sep 20 2021
%Y A329970 Cf. A004125, A051126, A093005, A154585, A309176.
%K A329970 sign
%O A329970 1,3
%A A329970 _Ilya Gutkovskiy_, Nov 26 2019