OFFSET
0,3
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..10011
MAPLE
s1:=[0];
for n from 1 to 15 do
for i from 1 to n do
s1:=[op(s1), (-1)^(n+1)*n]; od: od:
s1;
MATHEMATICA
Join[{0}, Flatten[Table[(-1)^(n+1)*n, {n, 15}, {n}]]] (* Paolo Xausa, Sep 30 2024 *)
PROG
(Python)
A274094_list = [0]+ [i for n in range(1, 142) for i in [n if n % 2 else -n]*n] # Chai Wah Wu, Jun 11 2016
(Python)
from math import isqrt
def A274094(n): return m if (m:=isqrt(n<<3)+1>>1)&1 else -m # Chai Wah Wu, Nov 05 2024
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Jun 10 2016
STATUS
approved