OFFSET
1,13
COMMENTS
Conjecture: a(n) >= 1 for n >= 71.
FORMULA
Conjecture: a(n) << n/log(n).
MATHEMATICA
c[x_] := Length @ ContinuedFraction[x]; a[n_] := Count[Range[n], _?(CoprimeQ[n, #] && c[(n/#)^2] == 2*c[n/#] &)]; Array[a, 100] (* Amiram Eldar, Oct 04 2020 *)
PROG
(PARI) L(n, q)=length(contfrac(n/q));
a(n)=sum(k=1, n, if(L(n, k)*2-L(n^2, k^2), 0, if(gcd(n, k)-1, 0, 1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Oct 04 2020
STATUS
approved