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!)
A287654 a(1) = 1, a(2) = a(3) = a(4) = 2; a(n) = a(a(n-1)) + a(a(n-a(n-1)) + a(n-a(n-2))) for n > 4. 3
1, 2, 2, 2, 4, 4, 4, 4, 6, 8, 8, 6, 8, 8, 8, 8, 10, 14, 16, 12, 14, 14, 14, 16, 16, 16, 16, 14, 16, 16, 16, 16, 20, 26, 24, 24, 24, 24, 24, 24, 28, 28, 22, 28, 30, 30, 28, 30, 32, 32, 32, 32, 30, 32, 32, 32, 32, 32, 32, 30, 32, 32, 32, 32, 40, 52, 48, 42, 44, 44, 44, 42, 44, 44, 44, 44, 52, 60, 46, 54, 56, 48, 54, 56, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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.
LINKS
Altug Alkan, Scatterplot of a(n)
MAPLE
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);
PROG
(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
CROSSREFS
Sequence in context: A007614 A289256 A287155 * A355911 A369207 A113402
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 04:55 EDT 2024. Contains 371235 sequences. (Running on oeis4.)