The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A096485 Period length of continued fraction for square root of n-th decimal repunit. 3
2, 6, 2, 24, 2, 622, 2, 2396, 2, 21912, 2, 527718, 2, 168484, 2, 13171730, 2, 359947864, 2, 52090778, 2, 16658818532, 2, 134257065348, 2, 61403998114, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
EXAMPLE
n=10: the period is [3,66666];
n=3: the period is [2, 2, 4, 5, 2, 7, 1, 41, 3, 1, 1, 4, 1, 1, 3, 41, 1, 7, 2, 5, 4, 2, 2, 210], 24 terms.
MAPLE
A096485 := proc(n) ((10^n-1)/9)^(1/2) ; nops(numtheory[cfrac](%, 'periodic', 'quotients')[2]) ; end: for n from 2 to 10 do print(A096485(n)) ; od ; # R. J. Mathar, Apr 30 2007
with(numtheory): [seq(nops(cfrac(((10^k-1/9)^(1/2), 'periodic', 'quotients')[2]), k=2..10)];
MATHEMATICA
Do[Print[Length[Last[ContinuedFraction[((-1+10^n)/9)^(1/2)]]]], {n, 2, 18}]
PROG
(Python)
from sympy.ntheory.continued_fraction import continued_fraction
from sympy import sqrt
def A096485(n): return len(continued_fraction(sqrt((10**n-1)//9))[-1]) # Chai Wah Wu, Mar 30 2021
CROSSREFS
Sequence in context: A254638 A320118 A320016 * A125032 A076743 A131980
KEYWORD
nonn,base,more
AUTHOR
Labos Elemer, Jun 24 2004
EXTENSIONS
a(19)-a(26) from Hiroaki Yamanouchi, Oct 17 2015
a(27)-a(28) from Chai Wah Wu, Sep 14 2021
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 May 14 01:40 EDT 2024. Contains 372528 sequences. (Running on oeis4.)