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)). 6
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

Table of n, a(n) for n=1..74.

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

Cf. A281130, A070867, A004001.

Sequence in context: A222959 A309441 A220498 * A105681 A240039 A130127

Adjacent sequences: A330769 A330770 A330771 * A330773 A330774 A330775

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 February 5 08:15 EST 2023. Contains 360082 sequences. (Running on oeis4.)