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!)
A096494 Largest value in the periodic part of the continued fraction of sqrt(prime(n)). 5

%I #34 Jul 12 2021 03:37:04

%S 2,2,4,4,6,6,8,8,8,10,10,12,12,12,12,14,14,14,16,16,16,16,18,18,18,20,

%T 20,20,20,20,22,22,22,22,24,24,24,24,24,26,26,26,26,26,28,28,28,28,30,

%U 30,30,30,30,30,32,32,32,32,32,32,32,34,34,34,34,34,36,36,36,36,36,36

%N Largest value in the periodic part of the continued fraction of sqrt(prime(n)).

%H Reinhard Zumkeller, <a href="/A096494/b096494.txt">Table of n, a(n) for n = 1..10000</a>

%F It seems that lim_{n->infinity} a(n)/n = 0. - _Benoit Cloitre_, Apr 19 2003

%F a(n) = 2*A000006(n). - _Benoit Cloitre_, Apr 19 2003

%e n=31: prime(31) = 127, and the periodic part is {3,1,2,2,7,11,7,2,2,1,3,22}, so a(31)=22.

%p A096491 := proc(n)

%p if issqr(n) then

%p sqrt(n) ;

%p else

%p numtheory[cfrac](sqrt(n),'periodic','quotients') ;

%p %[2] ;

%p max(op(%)) ;

%p end if;

%p end proc:

%p A096494 := proc(n)

%p option remember ;

%p A096491(ithprime(n)) ;

%p end proc: # _R. J. Mathar_, Mar 18 2010

%t {te=Table[0, {m}], u=1}; Do[s=Max[Last[ContinuedFraction[Prime[n]^(1/2)]]]; te[[u]]=s;u=u+1, {n, 1, m}];te

%t a[n_]:=IntegerPart[Sqrt[Prime[n]]] 2 IntegerPart[Sqrt[#]]&/@Prime[Range[90]] (* _Vincenzo Librandi_, Aug 09 2015 *)

%o (Haskell)

%o a096494 = (* 2) . a000006 -- _Reinhard Zumkeller_, Sep 20 2014

%Y Cf. A000006, A003285, A005980, A054269.

%Y Cf. A096491, A096492, A096493, A096495, A096496.

%Y Cf. A117767.

%K nonn

%O 1,1

%A _Labos Elemer_, Jun 29 2004

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 10:41 EDT 2024. Contains 371967 sequences. (Running on oeis4.)