OFFSET
1,1
COMMENTS
Conjecture: All terms are congruent to 3 mod 4 and all primes of this form (A002145) are terms of the sequence.
LINKS
Robert Israel, Table of n, a(n) for n = 1..8300
EXAMPLE
71 is a term because the central element of CF(sqrt(71)) = [8; 2, 2, 1, 7, 1, 2, 2, 16] is 7 and floor(sqrt(71)) - 1 = 7.
MAPLE
filter:= proc(n) local L, v;
if issqr(n) then return false fi;
L:= map(op, numtheory:-cfrac(sqrt(n), periodic, quotients));
if nops(L)::even then return false fi;
v:=L[(1+nops(L))/2]-floor(sqrt(n));
v = 0 or v = -1
end proc:
select(filter, [seq(i, i=1..500, 2)]); # Robert Israel, Mar 03 2025
MATHEMATICA
Select[2Range@200+1, (l=Last@ContinuedFraction@Sqrt[#]; m=l[[Floor[Length@l/2]]]; m==Floor@Sqrt@#||m==Floor@Sqrt@#-1)&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Giorgos Kalogeropoulos, Feb 03 2025
STATUS
approved