OFFSET
1,8
COMMENTS
Period of oscillations above and below the axis more than doubles at each cycle.
FORMULA
G.f.: A(x) satisfies: A(x) = (x - (1 + x)*A(x^2))/(1 - x). - Ilya Gutkovskiy, May 04 2019
EXAMPLE
a(14) = a(13) - a(7) = 5 - 1 = 4.
a(15) = a(14) - a(7) = 4 - 1 = 3.
PROG
(Python)
from itertools import islice
from collections import deque
def A062186_gen(): # generator of terms
aqueue, f, b, a = deque([0]), True, 1, 0
yield from (1, 0)
while True:
a -= b
yield a
aqueue.append(a)
if f: b = aqueue.popleft()
f = not f
CROSSREFS
KEYWORD
sign
AUTHOR
Henry Bottomley, Jun 13 2001
STATUS
approved