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!)
A062328 Length of period of continued fraction expansion of square root of 3^n+1. 1

%I #44 Oct 03 2019 18:01:03

%S 1,0,1,4,1,26,1,56,1,44,1,264,1,814,1,136,1,3730,1,20968,1,2448,1,

%T 287980,1,397238,1,2678,1,670896,1,8110044,1,20696,1,1066520,1,

%U 366601254,1,277444,1,5903828476,1,7701738148,1,8208058,1,30287795640,1,253244432640,1,11656644672,1,2376211301858,1,590009437260,1

%N Length of period of continued fraction expansion of square root of 3^n+1.

%C a(n) = 1 iff n is even. In this case, 3^n + 1 = A002522(3^(n/2)) and the continued fraction expansion of sqrt(3^n+1) is {3^(n/2); 2*3^(n/2), 2*3^(n/2), 2*3^(n/2), 2*3^(n/2), ...}. - _Bernard Schott_, Sep 25 2019

%F a(n) = A003285(A034472(n)). - _Bernard Schott_, Sep 25 2019

%e The period of sqrt(244) contains 26 terms: [1, 1, 1, 1, 1, 2, 1, 5, 1, 1, 9, 1, 6, 1, 9, 1, 1, 5, 1, 2, 1, 1, 1, 1, 1, 30], so a(5) = 26.

%p with(numtheory): [seq(nops(cfrac(sqrt(3^k+1),'periodic','quotients')[2]),k=2..18)];

%t Table[Length[Last[ContinuedFraction[Sqrt[3^w+1]]]],{w,1,40}] (* corrected by _Harvey P. Dale_, Dec 05 2014 *)

%Y Cf. A003285, A034472, A059866, A059926, A059927, A062345, A062682.

%K nonn,more

%O 0,4

%A _Labos Elemer_, Jul 13 2001

%E More terms from _Harvey P. Dale_, Dec 05 2014

%E a(41)-a(42) from _Vaclav Kotesovec_, Sep 17 2019

%E a(0), a(43)-a(48) from _Chai Wah Wu_, Sep 25 2019

%E a(49)-a(56) from _Chai Wah Wu_, Oct 03 2019

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 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)