The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A336264 a(0) = 0, and then the sequence alternates runs of distinct numbers with the same sign, the n-th run having abs(a(n)) terms; all positive numbers appear, in increasing order; all negative numbers appear, in decreasing order; a(1) = 1. 1
 0, 1, -1, 2, 3, -2, -3, -4, 4, 5, -5, -6, -7, 6, 7, 8, 9, -8, -9, -10, -11, 10, 11, 12, 13, 14, -12, -13, -14, -15, -16, 15, 16, 17, 18, 19, 20, -17, -18, -19, -20, -21, -22, -23, 21, 22, 23, 24, 25, 26, -24, -25, -26, -27, -28, -29, -30, 27, 28, 29, 30, 31 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS This sequence has similarities with Golomb's sequence (A001462) and A113138. Every integer appears once in this sequence. 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 Cf. A001462, A113138. Sequence in context: A035026 A224962 A173540 * A070770 A292599 A071487 Adjacent sequences:  A336261 A336262 A336263 * A336265 A336266 A336267 KEYWORD sign AUTHOR Rémy Sigrist, Jul 15 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 20 16:04 EST 2022. Contains 350472 sequences. (Running on oeis4.)