# Definition

1. a(1) = 1
2. a(2) = 1
3. a(n) = a(n-a(n-1)) + a(n-a(n-2)) for n > 2 where n is an integer

Given positive integer n, generate a(n).

n  a(n)
1  1
2  1
3  2
4  3
5  3
6  4
7  5
8  5
9  6
10 6
11 6
12 8
13 8
14 8
15 10
16 9
17 10
18 11
19 11
20 12

# Reference

• – Leaky Nun Jul 29 '16 at 15:25
• Can we return True in languages where it can be used as 1? – Dennis Jul 29 '16 at 15:53
• @Dennis If in that language true is equivalent to 1 then yes. – Leaky Nun Jul 29 '16 at 15:54
• Apart from the OEIS link it might be good to reference GEB where the sequence first appeared. – Martin Ender Jul 29 '16 at 16:16
• Completing the list of GEB-related sequence challenges. – Martin Ender Jul 29 '16 at 17:39

.+]{0$v1}\ v2} @2->1[ v3}>- /:::1-1[ >4}:2)?^~~1]{0$.