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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A330772 a(n) = 1 for n<1; for n >= 0, a(n+1) = 2*a(n-a(n)). 7
2, 2, 2, 4, 2, 4, 4, 4, 8, 4, 8, 4, 8, 4, 8, 8, 8, 16, 4, 16, 8, 16, 8, 16, 8, 16, 8, 8, 32, 2, 16, 16, 16, 16, 32, 4, 32, 4, 32, 8, 32, 16, 32, 16, 16, 64, 2, 32, 16, 32, 32, 8, 32, 16, 8, 4, 16, 64, 2, 32, 16, 32, 4, 4, 64, 4, 64, 4, 8, 32, 8, 8, 8, 128 (list; graph; refs; listen; history; text; internal format)
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.
LINKS
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
Sequence in context: A222959 A309441 A220498 * A105681 A368548 A240039
KEYWORD
nonn
AUTHOR
Rok Cestnik, Dec 30 2019
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)