[go: up one dir, main page]

login
Revision History for A329970 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) = (-1)^(n + 1) * n * ceiling(n/2) + Sum_{k=1..n} (-1)^k * k^2 * floor(n/k).
(history; published version)
#11 by N. J. A. Sloane at Mon Sep 20 22:14:34 EDT 2021
STATUS

proposed

approved

#10 by Michel Marcus at Mon Sep 20 12:40:04 EDT 2021
STATUS

editing

proposed

#9 by Michel Marcus at Mon Sep 20 12:40:00 EDT 2021
PROG

(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

STATUS

approved

editing

#8 by Michel Marcus at Sat Sep 18 07:00:38 EDT 2021
STATUS

reviewed

approved

#7 by Joerg Arndt at Sat Sep 18 06:42:28 EDT 2021
STATUS

proposed

reviewed

#6 by Amiram Eldar at Sat Sep 18 04:39:34 EDT 2021
STATUS

editing

proposed

#5 by Amiram Eldar at Sat Sep 18 04:33:14 EDT 2021
LINKS

Amiram Eldar, <a href="/A329970/b329970.txt">Table of n, a(n) for n = 1..10000</a>

STATUS

approved

editing

#4 by Susanna Cuyler at Tue Nov 26 20:06:23 EST 2019
STATUS

proposed

approved

#3 by Ilya Gutkovskiy at Tue Nov 26 11:31:55 EST 2019
STATUS

editing

proposed

#2 by Ilya Gutkovskiy at Tue Nov 26 05:53:18 EST 2019
NAME

allocated for Ilya Gutkovskiy

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

DATA

0, 0, -2, 3, 0, -3, -7, 16, 2, -15, -21, 31, 24, -15, -57, 34, 25, -17, -27, 77, 8, -99, -111, 155, 117, -36, -140, 40, 25, -80, -96, 259, 112, -157, -249, 202, 183, -156, -354, 224, 203, -40, -62, 342, -21, -524, -548, 562, 488, -34, -358, 194, 167, -262

OFFSET

1,3

FORMULA

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).

a(n) = Sum_{k=1..n} (-1)^(k + 1) * (n mod k) * k.

MATHEMATICA

Table[(-1)^(n + 1) n Ceiling[n/2] + Sum[(-1)^k k^2 Floor[n/k], {k, 1, n}], {n, 1, 54}]

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

Table[Sum[(-1)^(k + 1) Mod[n, k] k, {k, 1, n}], {n, 1, 54}]

CROSSREFS
KEYWORD

allocated

sign

AUTHOR

Ilya Gutkovskiy, Nov 26 2019

STATUS

approved

editing