login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A296816
a(n) = a(a(n-1)) + a(n-a(n-2)) with a(1) = a(2) = a(3) = 1.
1
1, 1, 1, 2, 3, 3, 3, 4, 5, 6, 6, 6, 6, 7, 8, 9, 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, 20, 21, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 33, 33, 34, 35, 36, 37, 38, 38, 38, 39, 40, 41, 41, 41, 42, 42, 42, 42, 43, 44, 45, 45, 45, 46, 46, 46, 46
OFFSET
1,4
COMMENTS
A variation of the Hofstadter-Conway $10,000 sequence (A004001). See antisymmetric humps (between its generational boundaries) of a(n) - n/2 in Links section. More precisely, the k-th generation of this sequence begins at 3*2^(k-3) + 2 for k > 2. Similar sequences can be created by generalized recurrence a_i(n) = a_i(a_i(n-1)) + a_i(n-a_i(n-i)) with i + 1 initial conditions a_i(1) = a_i(2) = ... = a_i(i+1) = 1. See also an illustration about this sequence family for i <= 10 in Links section.
MATHEMATICA
Fold[Append[#1, #1[[#1[[#2 - 1]] ]] + #1[[#2 - #1[[#2 - 2]] ]] ] &, {1, 1, 1}, Range[4, 85]] (* Michael De Vlieger, Dec 22 2017 *)
PROG
(PARI) a=vector(10^5); a[1]=a[2]=a[3]=1; for(n=4, #a, a[n] = a[a[n-1]]+a[n-a[n-2]]); a
CROSSREFS
Sequence in context: A051134 A347777 A037458 * A064474 A379067 A072688
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Dec 21 2017
STATUS
approved