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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A146331 Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 6. 3

%I

%S 18,19,22,38,39,44,54,57,58,59,66,68,70,74,86,102,105,107,111,112,114,

%T 115,130,131,146,147,148,150,159,164,175,178,183,186,187,198,203,253,

%U 258,260,264,267,273,275,278,294,303,308,309,326,327,330,333,341,346

%N Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 6.

%C For primes in this sequence see A146351.

%H Harvey P. Dale, <a href="/A146331/b146331.txt">Table of n, a(n) for n = 1..1000</a>

%e a(2) = 19 because continued fraction of (1+sqrt(19))/2 = 2, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1 ... has period (1, 2, 8, 2, 1, 3) length 6.

%p A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146331 := proc(n) RETURN(A146326(n) = 6) ; end: for n from 2 to 380 do if isA146331(n) then printf("%d,",n) ; fi; od: # _R. J. Mathar_, Sep 06 2009

%t 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]] == 6, AppendTo[bb, n]], {n, 1, Length[aa]}]; bb (* _Artur Jasinski_ *)

%t cf6Q[n_]:=Module[{c=(1+Sqrt[n])/2},!IntegerQ[c]&&Length[ContinuedFraction[ c][[2]]]==6]; Select[Range[400],cf6Q] (* _Harvey P. Dale_, May 30 2012 *)

%Y Cf. A000290, A078370, A146326-A146345, A146348-A146360.

%K nonn

%O 1,1

%A _Artur Jasinski_, Oct 30 2008

%E 39, 68, 150, 203, etc. added by _R. J. Mathar_, Sep 06 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 23 13:49 EDT 2019. Contains 325254 sequences. (Running on oeis4.)