OFFSET
0,4
EXAMPLE
3 -> 5 -> 11 -> 36 -> 6 -> 2 -> 1, so in this trajectory 3, 5, 11 and 2 are primes, hence a(3) = 4.
MATHEMATICA
Table[Count[NestWhileList[If[EvenQ[#], Floor[Sqrt[#]], Floor[(Sqrt[#])^3]]&, n, #>1&], _?PrimeQ], {n, 0, 120}] (* Harvey P. Dale, Sep 26 2021 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jason Earls, Jun 11 2004
STATUS
approved