TOPICS
Search

Cestnik's Nested Recurrence


Cestnik's nested recurrence defines an integer sequence starting at a(0)=0 by

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

for nonnegative integers n, as long as both indices on the right are available. The first terms are 0, 1, 1, 2, 2, 3, 2, 4, 3, 3, 4, 3, 5, 3, 4, 5, ... (OEIS A399998).

Each successful step adds a graph vertex labeled n+1 to a rooted tree with root vertex 0, by making n-a(a(n))^2 its parent. The graph distance from graph vertex n to the root vertex is a(n), since adjoining a child increases the graph distance by 1. As in several Hofstadter sequences, earlier terms determine the indices in the recurrence relation.

Whether the recurrence relation is defined for all nonnegative integers remains open. The asymptotic formula a(n)∼2^(1/4)sqrt(n) as n->infty is conjectured (Cestnik 2026).


See also

Hofstadter Sequences, Recurrence Relation, Rooted Tree

Explore with Wolfram|Alpha

References

Cestnik, R. "a(n+1)=a(n-a(a(n))^2)+1, a(0)=0." Oct. 8, 2026. https://oeis.org/A399998.Sloane, N. J. A. Sequence A399998 in "The On-Line Encyclopedia of Integer Sequences."

Cite this as:

Weisstein, Eric W. "Cestnik's Nested Recurrence." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/CestniksNestedRecurrence.html

Subject classifications