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!)
A096488 Number of different terms in a period of continued fraction for square root of n-th repunit. 1

%I #18 Apr 05 2021 20:37:31

%S 2,3,2,8,2,37,2,76,2,217,2,870,2,583,2,5034,2,28494,2,10058,2,187966,

%T 2,383291,2,340992,2

%N Number of different terms in a period of continued fraction for square root of n-th repunit.

%t Do[Print[Length[Union[Last[ContinuedFraction[((-1+10^n)/9)^(1/2)]]]]], {n, 2, 18}]

%o (Python)

%o from sympy.ntheory.continued_fraction import continued_fraction

%o from sympy import sqrt

%o def A096488(n): return len(set(continued_fraction(sqrt((10**n-1)//9))[-1])) # _Chai Wah Wu_, Mar 30 2021

%Y Cf. A002275, A096485, A096487.

%K nonn,more

%O 2,1

%A _Labos Elemer_, Jun 25 2004

%E Name edited by _Michel Marcus_, Aug 22 2019

%E a(19)-a(22) from _Daniel Suteu_, Aug 22 2019

%E a(23)-a(28) from _Chai Wah Wu_, Apr 05 2021

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 23 07:42 EDT 2024. Contains 371905 sequences. (Running on oeis4.)