CJam (21822780 sequences)
{:Z2/20500ZA3#:Cb(40-A3#_!!:B-\+CbB)/C),{mq_i>},{;2}j:Q[=:NmQ:M1MM;K{)[N0{N1$_*-@/M@+1$md@M@-}J*]K,:)\f<K*]<W%B{W%X0@X0@{2$*+\}/%}%2/zZ=Q2>f**ZB&=}%}
This gives correct answers for the inclusive ranges
[A040002, A040003]
[A040005, A040008]
[A040011, A040013]
A040015
[A040019, A040022]
A040024
[A040029, A040033]
A040035
A040037
[A040041, A040043]
A040048
A040052
[A040055, A040057]
A040059
A040063
[A040071, A040074]
A040077
A040080
[A040090, A040091]
[A040093, A040094]
A040099
[A040109, A040111]
A040118
A040120
[A040131, A040135]
A040137
A040139
[A040142, A040143]
A040151
[A040155, A040157]
A040166
A040168
[A040181, A040183]
[A040185, A040968]
[A041006, A041011]
[A041014, A042937]
The [A041006, A041011]A040???, sequences correspond to the continued fractions of non-rational square roots from [A041014, A042937]sqrt(5), and to sqrt(1000) (with the 252gaps corresponding to ones which startappear earlier in OEIS, but conveniently filled with 20 zeroes. The two ranges of interestrandom sequences); the A041??? sequences correspond to the numerators and denominators of the continued fraction convergents ofconvergents for non-rational square roots from sqrt(6) to sqrt(1000) except(with the gap corresponding to sqrt(10), which is elsewhereat (A005667, A005668) but for which they conveniently left a gap to be filled with random sequences (A041012,and A041013A005668).
The trickiest partIt was mappingtricky to map the sequence number to the value to sqrt. In the end I couldn't find anything better than generating the list of non-squares and selecting by index. However, this does allow a littleThe trick: instead of using = for the get-array-item operator, I'm using {;2}j, abusing the memoisation operator I used in an earlier version to provide ahave an all-zero fallback value of 2 for any index out of the range-of-range indices no longer fits: it took me a couple of interest. At the end I detect this fallback valuehours just to replace theget both continued fractions and convergents with all-zeroesinto the 100 byte limit.