login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A028832 Number of distinct integers in period of continued fraction for sqrt(n), or 0 if n is a square. 4

%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_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 02:10 EDT 2024. Contains 371782 sequences. (Running on oeis4.)