OFFSET
1,1
COMMENTS
By making the length positive, we exclude squares. See A206587 for this sequence and the squares. All primes of the form 4m + 3 are here.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
P. J. Rippon and H. Taylor, Even and odd periods in continued fractions of square roots, Fibonacci Quarterly 42, May 2004, pp. 170-180.
MATHEMATICA
Select[Range[100], ! IntegerQ[Sqrt[#]] && EvenQ[Length[ContinuedFraction[Sqrt[#]][[2]]]] &]
PROG
(PARI)
cyc(cf) = {
if(#cf==1, return(0)); \\ 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->(t=#cyc(contfrac(sqrt(n))))>0 && t%2==0, vector(100, n, n)) \\ Colin Barker, Oct 19 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 19 2012
STATUS
approved