1,2

There are substantial jumps between generations (i.e. a(2^19) = 2^18 and a(2^19 + 1) = 327608). See also scatterplot in links section.

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

Altug Alkan, Scatterplot of a(n)

Index entries for Hofstadter-type sequences

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

C[1]:= 1:

C[2]:= 2:

C[3]:= 2:

C[4]:= 2:

for n from 5 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);

(Scheme)

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

(definec (A287654 n) (cond ((= 1 n) n) ((<= n 4) 2) (else (+ (A287654 (A287654 (- n 1))) (A287654 (+ (A287654 (- n (A287654 (- n 1)))) (A287654 (- n (A287654 (- n 2)))))))))) ;; Antti Karttunen, May 31 2017

Cf. A004001, A005185, A287292, A287707.

Sequence in context: A007614 A289256 A287155 * A113402 A238726 A240321

Adjacent sequences: A287651 A287652 A287653 * A287655 A287656 A287657

nonn

Altug Alkan, May 30 2017

approved