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!)
A097853 Period of continued fraction for square root of n (or 1 if n is a square). 6
1, 1, 2, 1, 1, 2, 4, 2, 1, 1, 2, 2, 5, 4, 2, 1, 1, 2, 6, 2, 6, 6, 4, 2, 1, 1, 2, 4, 5, 2, 8, 4, 4, 4, 2, 1, 1, 2, 2, 2, 3, 2, 10, 8, 6, 12, 4, 2, 1, 1, 2, 6, 5, 6, 4, 2, 6, 7, 6, 4, 11, 4, 2, 1, 1, 2, 10, 2, 8, 6, 8, 2, 7, 5, 4, 12, 6, 4, 4, 2, 1, 1, 2, 2, 5, 10, 2, 6, 5, 2, 8, 8, 10, 16, 4, 4, 11, 4, 2, 1, 1, 2, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
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
See A003285, which is the main entry for this sequence.
Sequence in context: A297170 A359627 A127309 * A160266 A322134 A023504
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Sep 01 2004
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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)