OFFSET
1,1
COMMENTS
Numbers n such that A002350(n) - A002349(n) is a nonzero square. - Charles R Greathouse IV, Jun 06 2013
LINKS
Ray Chandler, Table of n, a(n) for n = 1..192
EXAMPLE
3^2 - 2*2^2 = 1 and 3 - 2 = 1 (square), so a(1) = 2;
2^2 - 3*1^2 = 1 and 2 - 1 = 1 (square), so a(2) = 3;
33^2 - 17*8^2 = 25 and 33 - 8 = 25 (square), so a(3) = 17.
MATHEMATICA
qQ[n_] := IntegerQ@Sqrt@n; Select[Range[500], ! qQ[#] && qQ[(x - y) /. ToRules[Expand[ Reduce[x^2 - #*y^2 == 1 && x>0 && y>0, {x, y}, Integers] /. C[1] -> 1]]] &] (* Giovanni Resta, May 25 2013 *)
PROG
(PARI) is(n)=if(issquare(n), return(0)); my(cf=contfrac(sqrt(n)), t, N, D); for(i=1, #cf-1, t=cf[i+1]; forstep(j=i, 1, -1, t=cf[j]+1/t); N=numerator(t); D=denominator(t); if(N^2-n*D^2==1, return(issquare(N-D)))); warning("Insufficient precision for "n) \\ Charles R Greathouse IV, Jun 06 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Irina Gerasimova, May 21 2013
EXTENSIONS
a(15)-a(47) from Giovanni Resta, May 25 2013
STATUS
approved