login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = a(n-a(n-1)) + a(a(n-a(n-2))).
1

%I #24 Dec 10 2024 20:34:55

%S 1,1,2,2,3,3,3,5,4,5,5,5,8,5,7,7,8,8,8,8,13,7,10,10,10,10,13,12,11,13,

%T 13,13,13,21,8,15,12,15,18,12,16,18,18,15,21,18,16,21,20,18,21,26,21,

%U 18,25,20,20,22,20,19,25,20,25,25,17,27,20,28,24,26,28,23,31,31,22,31,28

%N a(n) = a(n-a(n-1)) + a(a(n-a(n-2))).

%H Robert Israel, <a href="/A087826/b087826.txt">Table of n, a(n) for n = 1..10000</a>

%p f:= proc(n) option remember; procname(n-procname(n-1)) + procname(procname(n-procname(n-2))); end proc:

%p f(1):= 1: f(2):=1:

%p map(f, [$1..100]); # _Robert Israel_, Dec 10 2024

%o (True BASIC)

%o 70 DIM q0(0 to 4000)

%o 80 LET q0(1)=1

%o 90 LET q0(2)=1

%o 91 FOR n = 3 to 4000

%o 92 LET q0(n)=q0(n-q0(n-1))+q0(q0(n-q0(n-2)))

%o 93 NEXT n

%o 100 SET MODE "color"

%o 110 SET WINDOW 0,1024,0,750

%o 302 PRINT" by Roger L. Bagula Oct 06 2003 "

%o 381 open #1: name "CM1:Ht3_data",create newold, org text

%o 390 FOR x=1 to 200

%o 391 PRINT #1: q0(x);",";

%o 392 NEXT x

%o 393 close #1

%o 460 END

%Y Cf. A081831.

%K nonn

%O 1,3

%A _Roger L. Bagula_, Oct 06 2003