Haskell, 103(削除) 103 (削除ここまで) 87 bytes
Horribly inefficient, but does not rely on floating point arithmetic. Here a(x) = sqrt(f(x)+a(x-1)) is a helper sequence, that simplifies the computation.
a 1=(1,1)0=0
a x|n<x=[k|k<-snd([1..],m<-[k^2-a(x-1)),m<-[k|k<-[1..],k^2>nm>0,notElem(k^2-n)$(fst.a)<$>[1 m$f<$>[1..x-1]]!!0=0
f x=(m^2-n,ma x)
fst.^2-a(x-1)
Haskell, 103 bytes
Horribly inefficient, but does not rely on floating point arithmetic.
a 1=(1,1)
a x|n<-snd(a(x-1)),m<-[k|k<-[1..],k^2>n,notElem(k^2-n)$(fst.a)<$>[1..x-1]]!!0=(m^2-n,m)
fst.a
Haskell, (削除) 103 (削除ここまで) 87 bytes
Horribly inefficient, but does not rely on floating point arithmetic. Here a(x) = sqrt(f(x)+a(x-1)) is a helper sequence, that simplifies the computation.
a 0=0
a x=[k|k<-[1..],m<-[k^2-a(x-1)],m>0,notElem m$f<$>[1..x-1]]!!0
f x=(a x)^2-a(x-1)