The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A206587 Numbers k such that the periodic part of the continued fraction of sqrt(k) has even length. 2
1, 3, 4, 6, 7, 8, 9, 11, 12, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 54, 55, 56, 57, 59, 60, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 75, 76, 77, 78, 79, 80, 81, 83, 84 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This is A206586 and the squares, A000290.
LINKS
MATHEMATICA
Select[Range[100], IntegerQ[Sqrt[#]] || EvenQ[Length[ContinuedFraction[Sqrt[#]][[2]]]] &]
PROG
(PARI)
cyc(cf) = {
if(#cf==1, return([])); \\ There is no cycle
my(s=[]);
for(k=2, #cf,
s=concat(s, cf[k]);
if(cf[k]==2*cf[1], return(s)) \\ Cycle found
);
0 \\ Cycle not found
}
select(n->#cyc(contfrac(sqrt(n)))%2==0, vector(400, n, n)) \\ Colin Barker, Oct 19 2014
CROSSREFS
Cf. A003814 (period has odd length).
Sequence in context: A058654 A188435 A047517 * A192450 A039064 A187953
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 20 2012
STATUS
approved

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 June 5 01:34 EDT 2024. Contains 373102 sequences. (Running on oeis4.)