OFFSET
0,4
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
Rémy Sigrist, PARI program for A336264
EXAMPLE
a(0) = 0 and a(1) = 1 by definition.
So the first run of positive terms has abs(a(1)) = 1 term.
a(2) starts the first run of negative terms: a(2) = -1; this run has abs(a(2)) = 1 term.
a(3) starts the second run of positive terms: a(3) = 2; this run has abs(a(3)) = 2 terms, so a(4) = 3.
a(5) starts the second run of negative terms and has abs(a(4)) = 3 terms: a(5) = -2, a(6) = -3, a(7) = -4.
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
sign
AUTHOR
Rémy Sigrist, Jul 15 2020
STATUS
approved