OFFSET
1,2
COMMENTS
We conjecture sequence is never zero.
FORMULA
a(k^2)=1, a(k*(k+1))=2, a(k*(k+2))=3, and less trivially it appears a(floor(n^2/4)+1) = 1 + ceiling((n-1)^2/2) and then the square reached is (floor(n^2/4)+1)^2.
MATHEMATICA
Table[Length[NestWhileList[# Ceiling[Sqrt[#]]/Floor[Sqrt[#]]&, n, !IntegerQ[ Sqrt[#]]&]], {n, 70}] (* Harvey P. Dale, Oct 23 2016 *)
PROG
(PARI) a(n)=if(n<0, 0, s=n; c=1; while(frac(sqrt(s))>0, s=s*ceil(sqrt(s))/floor(sqrt(s)); c++); c)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 08 2009
STATUS
approved