login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287707 a(1) = 1, a(2) = a(4) = a(5) = 2, a(3) = 3, a(n) = a(a(n-1)) + a(a(n-a(n-1)) + a(n-a(n-2))) for n > 5. 3
1, 2, 3, 2, 2, 4, 4, 4, 4, 6, 8, 8, 6, 8, 8, 8, 8, 12, 16, 12, 12, 16, 16, 12, 14, 16, 16, 16, 16, 16, 16, 16, 16, 20, 24, 20, 20, 24, 24, 20, 24, 28, 28, 24, 24, 28, 32, 28, 28, 32, 32, 28, 32, 32, 32, 28, 32, 32, 32, 32, 32, 32, 32, 32, 32, 36, 40, 36, 36, 40, 40, 36, 40, 44, 44, 40, 40, 48, 48, 44, 44, 52, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Altug Alkan, Table of n, a(n) for n = 1..10000

Altug Alkan, Plot of a(n)-n/2

Indranil Ghosh, Python program to compute the sequence

Index entries for Hofstadter-type sequences

MAPLE

N:= 2^10: # to get a(1) to a(N)

C[1]:= 1:

C[2]:= 2:

C[3]:= 3:

C[4]:= 2:

C[5]:= 2:

for n from 6 to N do

C[n]:= C[C[n-1]] + C[C[n-C[n-1]] + C[n-C[n-2]]];

od:

S:=seq(C[n], n=1..N);

PROG

(Scheme)

;; An implementation of memoization-macro definec can be found for example in: http://oeis.org/wiki/Memoization

(definec (A287707 n) (cond ((or (= 1 n) (= 3 n)) n) ((<= n 5) 2) (else (+ (A287707 (A287707 (- n 1))) (A287707 (+ (A287707 (- n (A287707 (- n 1)))) (A287707 (- n (A287707 (- n 2)))))))))) ;; Antti Karttunen, May 31 2017

CROSSREFS

Cf. A004001, A005185, A287654.

Sequence in context: A098534 A317638 A002307 * A029247 A194020 A053269

Adjacent sequences:  A287704 A287705 A287706 * A287708 A287709 A287710

KEYWORD

nonn

AUTHOR

Altug Alkan, May 30 2017

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 12 07:31 EST 2019. Contains 329948 sequences. (Running on oeis4.)