OFFSET
1,3
EXAMPLE
1 is a square. 2 has continued fraction [1;2,2,2...], 3 has [1;1,2,1,2,1,2...]. - Georg Fischer, Jun 14 2019
MAPLE
a:= n-> `if`(issqr(n), 1, nops(numtheory[cfrac](
sqrt(n), 'periodic', 'quotients')[2])):
seq(a(n), n=1..120); # Alois P. Heinz, Jun 14 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Sep 01 2004
STATUS
approved