OFFSET
1,3
LINKS
Joerg Arndt, Table of n, a(n) for n = 1..10000
MAPLE
a:= proc(n) option remember; `if`(n<3, 1,
a(a(a(a(n-1)))) +a(n-a(n-1)))
end:
seq(a(n), n=1..100); # Alois P. Heinz, Aug 06 2017
MATHEMATICA
a[n_Integer?Positive] := a[n] =a[a[a[a[n-1]]]] + a[n - a[n-1]]; a[1] = a[2] = 1; Table[a[n], {n, 1, 256}]
PROG
(PARI) lista(nn) = {va = vector(nn); va[1] = 1; va[2] = 1; for (n=3, nn, va[n] = va[va[va[va[n-1]]]]+va[n-va[n-1]]; ); va; } \\ Michel Marcus, Aug 06 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Oct 07 2003
EXTENSIONS
Corrected by Michel Marcus, Aug 06 2017
STATUS
approved