OFFSET
1,2
MATHEMATICA
Accumulate[(-#)^(#+1)&/@Range[17]]
PROG
(PARI) a(n) = sum(i=1, n, (-i)^(i+1));
(Python)
sum = 0
for i in range(1, 20):
sum += (-i)**(i+1)
print(sum, end = ", ")
CROSSREFS
KEYWORD
sign
AUTHOR
John H. Chakkour, Feb 09 2021
STATUS
approved