Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Nov 10 2021 07:06:36
%S 0,1,2,0,1,2,2,2,0,1,2,2,2,3,2,0,1,2,4,2,3,4,3,2,0,1,2,3,3,2,4,2,3,3,
%T 2,0,1,2,2,2,2,2,4,3,3,5,3,2,0,1,2,4,3,4,2,2,3,2,4,3,5,3,2,0,1,2,5,2,
%U 4,3,4,2,3,2,2,5,4,3,3,2,0,1,2,2,3,4,2,3,3,2,3,4,4,6,3,3,3,3,2,0,1,2
%N Number of distinct integers in period of continued fraction for sqrt(n), or 0 if n is a square.
%H Amiram Eldar, <a href="/A028832/b028832.txt">Table of n, a(n) for n = 1..10000</a>
%t a[n_] := If[IntegerQ @ Sqrt[n], 0, Length @ DeleteDuplicates @ ContinuedFraction[Sqrt[n]][[2]]]; Array[a, 100] (* _Amiram Eldar_, Nov 10 2021 *)
%Y Cf. A054269.
%K nonn
%O 1,3
%A _Olivier GĂ©rard_