|
|
A306562
|
|
a(n) = 1 + 2 - 3 - 4 + 5 + 6 + 7 - 8 - 9 - 10 - 11 + 12 + 13 + 14 + 15 + ... + (+-1)*n, where, after the 1st summand there is one plus, two minuses, three plusses, etc.
|
|
1
|
|
|
1, 3, 0, -4, 1, 7, 14, 6, -3, -13, -24, -12, 1, 15, 30, 46, 29, 11, -8, -28, -49, -71, -48, -24, 1, 27, 54, 82, 111, 81, 50, 18, -15, -49, -84, -120, -157, -119, -80, -40, 1, 43, 86, 130, 175, 221, 174, 126, 77, 27, -24, -76, -129, -183, -238, -294, -237, -179
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
F(n) = ((-1)^(n+1)(2n+1)(2n^2+2n+5)+21)/16 gives local extrema 3, -4, 14, -24, 46, -71, 111, -157, ... (conjectured). - Jean-François Alcover, Jun 01 2019
|
|
EXAMPLE
|
a(0) = 1 = 1
a(1) = 1 + 2 = 3
a(2) = 1 + 2 - 3 = 0
a(3) = 1 + 2 - 3 - 4 = -4
a(4) = 1 + 2 - 3 - 4 + 5 = 1
a(5) = 1 + 2 - 3 - 4 + 5 + 6 = 7
a(6) = 1 + 2 - 3 - 4 + 5 + 6 + 7 = 14
|
|
MAPLE
|
a:= proc(n) option remember: `if`(n=0, 1,
a(n-1)+(n+1)*(-1)^floor(sqrt(2*n)-1/2))
end:
|
|
MATHEMATICA
|
With[{nn=20}, Accumulate[Flatten[Join[{1, 2}, Times@@@Partition[Riffle[TakeList[Range[3, 3+(nn(nn+1))/2], Range[2, nn]], {-1, 1}], 2]]]]] (* Harvey P. Dale, Mar 24 2024 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|