login
A284644
a(1) = a(2) = 2, a(3) = 1; a(n) = a(n-a(n-1)) + a(n-a(n-2)) for n > 3.
6
2, 2, 1, 3, 5, 3, 5, 6, 4, 6, 10, 5, 7, 9, 9, 10, 11, 11, 12, 10, 14, 11, 9, 16, 14, 11, 17, 21, 11, 16, 19, 17, 19, 20, 19, 21, 21, 22, 22, 22, 24, 21, 23, 23, 22, 25, 25, 18, 35, 26, 24, 32, 25, 22, 35, 34, 20, 38, 36, 27, 34, 40, 20, 39, 33, 36, 39, 28, 40, 37, 39
OFFSET
1,1
COMMENTS
A "brother" to Hofstadter's Q-sequence (A005185) and A244477 using with different starting values.
LINKS
Altug Alkan, Nathan Fox, and Orhan Ozgur Aybar, On Hofstadter Heart Sequences, Complexity, 2017, 2614163.
EXAMPLE
a(4) = 3 because a(4) = a(4 - a(3)) + a(4 - a(2)) = a(3) + a(2) = 3.
MAPLE
A284644:= proc(n) option remember; procname(n-procname(n-1)) +procname(n-procname(n-2)) end proc:
A284644(1):= 2: A284644(2):= 2: A284644(3):= 1:
map(A284644, [$1..1000]);
MATHEMATICA
a[1] = a[2] = 2; a[3] = 1; a[n_] := a[n] = a[n - a[n - 1]] + a[n - a[n - 2]]; Table[a@ n, {n, 72}] (* Michael De Vlieger, Apr 02 2017 *)
PROG
(PARI) a=vector(1000); a[1]=a[2]=2; a[3]=1; for(n=4, #a, a[n] = a[n-a[n-1]]+a[n-a[n-2]]); a
CROSSREFS
Sequence in context: A202847 A054336 A342908 * A079956 A140717 A257005
KEYWORD
nonn,look
AUTHOR
Altug Alkan, Mar 31 2017
STATUS
approved