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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
MATHEMATICA
a[n_] := If[IntegerQ @ Sqrt[n], 0, Length @ DeleteDuplicates @ ContinuedFraction[Sqrt[n]][[2]]]; Array[a, 100] (* Amiram Eldar, Nov 10 2021 *)
CROSSREFS
Cf. A054269.
Sequence in context: A084665 A035392 A007149 * A260411 A199331 A243917
KEYWORD
nonn
AUTHOR
STATUS
approved

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 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)