Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A146327
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A146327 Numbers k such that continued fraction of (1+Sqrt[k])/2 has period 2 +0
2
2, 3, 10, 11, 12, 15, 21, 26, 27, 30, 35, 45, 50, 51, 56, 63, 77, 82, 83, 84, 87, 90, 93, 99, 117, 122, 123, 132, 143, 165, 170, 171, 182, 195, 221, 226, 227, 228, 230, 231, 235, 237, 240, 245, 255, 285, 290, 291, 306, 323, 357, 362, 363, 380, 399, 437, 442, 443 (list; graph; listen)
OFFSET

1,1

COMMENT

For primes in this sequence see A146347.

EXAMPLE

a(1) = 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: isA146327 := proc(n) RETURN(A146326(n) = 2) ; end: for n from 2 to 450 do if isA146327(n) then printf("%d, ", n) ; fi; od: [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 06 2009]

MATHEMATICA

s = 10; aa = {}; Do[k = ContinuedFraction[(1 + Sqrt[n])/2, 1000]; If[Length[k] < 190, AppendTo[aa, 0], m = 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; s = s + 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; s = s + 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; AppendTo[aa, m]], {n, 1, 500}]; bb = {}; Do[ If[aa[[n]] == 2, AppendTo[bb, n]], {n, 1, Length[aa]}]; bb (*Artur Jasinski*)

CROSSREFS

A000290, A078370, A146326-A146345, A146348-A146360.

Sequence in context: A159952 A007961 A060811 this_sequence A081706 A032804 A047473

Adjacent sequences: A146324 A146325 A146326 this_sequence A146328 A146329 A146330

KEYWORD

nonn

AUTHOR

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

EXTENSIONS

Added 226, 227, 290, 291 - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 06 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 24 23:16 EST 2009. Contains 167481 sequences.


AT&T Labs Research