OFFSET
0,3
FORMULA
a(n) ~ n^3/3 (conjectured).
MATHEMATICA
s[0] = 0; s[n_] := s[n] = s[Abs[n - 1 - s[n - 1]^2]] + 1; TakeWhile[Flatten[FirstPosition[Array[s, 32000, 0] , #] & /@ Range[0, 50]] - 1 , NumberQ] (* Amiram Eldar, Jul 13 2023 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Rok Cestnik, Jul 13 2023
STATUS
approved