login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A062345
Length of period of continued fraction expansion of square root of 3^n-1.
1
1, 2, 1, 2, 10, 2, 19, 2, 25, 2, 156, 2, 149, 2, 580, 2, 716, 2, 6461, 2, 2485, 2, 123256, 2, 64, 2, 8638, 2, 722190, 2, 3804214, 2, 1783536, 2, 3550696, 2, 86022946, 2, 22119349, 2, 692630166, 2, 8247763078, 2, 43380360, 2, 15150768502, 2, 10229872316, 2, 36580802370, 2, 333495606762, 2, 676122216162, 2
OFFSET
1,2
FORMULA
a(n) = A003285(A024023(n)). - Michel Marcus, Sep 25 2019
EXAMPLE
The period of sqrt(242) contains 10 terms: [1,1,3,1,14,1,3,1,1,30]
MAPLE
with(numtheory): [seq(nops(cfrac(sqrt(3^k-1), 'periodic', 'quotients')[2]), k=1..16)];
MATHEMATICA
Table[Length[Last[ContinuedFraction[Sqrt[ -1+3^u]]]], {u, 1, 36}]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Labos Elemer, Jul 13 2001
EXTENSIONS
a(37)-a(42) from Vaclav Kotesovec, Aug 28 2019
a(43)-a(44) from Vaclav Kotesovec, Sep 17 2019
a(45)-a(52) from Chai Wah Wu, Sep 25 2019
a(53)-a(56) from Chai Wah Wu, Sep 29 2019
STATUS
approved