OFFSET
1,3
COMMENTS
This is the third sequence in a family of nested-recurrent sequences with apparently similar structure defined as follows. Given a sequence s = {s(n): n >= 1} we define the k-th iterated sequence s^[k] by putting s^[1](n) = s(n) and setting s^[k](n) = s^[k-1](s(n)) for k >= 2. For k >= 1, we define a nested-recurrent sequence {u(n): n >= 1}, dependent on k, by putting u(1) = 1 and setting u(n) = n - u^[k](n - u^[k+1](n-1)) for n >= 2. The present sequence is the case k = 3. For other cases see A006165 (k = 1), A356988 (k = 2) and A356990 (k = 4).
The sequence is slow, that is, for n >= 1, a(n+1) - a(n) is either 0 or 1. The line graph of the sequence {a(n)} thus consists of a series of plateaus (where the value of the ordinate a(n) remains constant as n increases) joined by lines of slope 1.
The sequence of plateau heights begins 4, 6, 9, 13, 19, 28, 41, 60, ..., conjecturally A000930.
MAPLE
a := proc (n) option remember; if n = 1 then 1 else n - a(a(a(n - a(a(a(a(n-1))))))) end if; end proc:
seq(a(n), n = 1..100);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Bala, Sep 08 2022
STATUS
approved