login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A146326 Length of the period of the continued fraction of (1+sqrt(n))/2. 39
0, 2, 2, 0, 1, 4, 4, 4, 0, 2, 2, 2, 1, 4, 2, 0, 3, 6, 6, 4, 2, 6, 4, 4, 0, 2, 2, 4, 1, 2, 8, 4, 4, 4, 2, 0, 3, 6, 6, 8, 5, 4, 10, 6, 2, 8, 4, 4, 0, 2, 2, 4, 1, 6, 4, 2, 6, 6, 6, 4, 3, 4, 2, 0, 3, 6, 10, 6, 4, 6, 8, 4, 9, 6, 4, 8, 2, 4, 4, 4, 0, 2, 2, 2, 1, 6, 2, 8, 7, 2, 8, 8, 2, 12, 4, 8, 9, 4, 2, 0 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

First occurence of n in this sequence see A146343.

Records see A146344.

Indices where records occured see A146345.

a(n)=0 for n = k^2 <a(A000290(m+1))=0>.

a(n)=1 for n = 4 k^2 + 4 k + 5 <a(A078370(m))=1>.

a(n)=2 for n in A146327.

a(n)=3 for n in A146328.

a(n)=4 for n in A146329.

a(n)=5 for n in A146330.

a(n)=6 for n in A146331.

a(n)=7 for n in A146332.

a(n)=8 for n in A146333.

a(n)=9 for n in A146334.

a(n)=10 for n in A146335.

a(n)=11 for n in A146336.

a(n)=12 for n in A146337.

a(n)=13 for n in A146338.

a(n)=14 for n in A146339.

a(n)=15 for n in A146340.

a(n)=16 for n in A146341.

a(n)=17 for n in A146342.

LINKS

R. J. Mathar, Table of n, a(n) for n=1,...,20000.

EXAMPLE

a(2) = 2 because continued fraction of (1+sqrt(2))/2 = 1, 4, 1, 4, 1, 4, 1, ...

has period (1,4) length 2

MAPLE

A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic', 'quotients') ; nops(%[2]) ; else 0 ; fi; end: seq(A146326(n), n=1..100) ; [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 06 2009]

MATHEMATICA

Table[cf = ContinuedFraction[(1 + Sqrt[n])/2]; If[Head[cf[[-1]]] === List, Length[cf[[-1]]], 0], {n, 100}]

CROSSREFS

Cf. A000290, A078370, A146326-A146345.

Sequence in context: A144074 A124540 A124550 * A158852 A188285 A102404

Adjacent sequences:  A146323 A146324 A146325 * A146327 A146328 A146329

KEYWORD

nonn

AUTHOR

Artur Jasinski (grafix(AT)csl.pl), Oct 30 2008

EXTENSIONS

a(39) and a(68) corrected by R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 06 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 05:15 EST 2012. Contains 205694 sequences.