OFFSET
1,1
COMMENTS
From the current term count back the same number of terms and double it to obtain the next term. Because a(n) can exceed n, negative indexes are also occasionally referenced.
EXAMPLE
a(1) = 2*a(0-a(0)) = 2*a(-1) = 2.
a(2) = 2*a(1-a(1)) = 2*a(-1) = 2.
a(3) = 2*a(2-a(2)) = 2*a(0) = 2.
a(4) = 2*a(3-a(3)) = 2*a(1) = 4.
PROG
(Python)
a = [2]
for n in range(1000):
if(a[n] > n):
a.append(2)
else:
a.append(2*a[n-a[n]])
CROSSREFS
KEYWORD
nonn
AUTHOR
Rok Cestnik, Dec 30 2019
STATUS
approved