The integral test says that for some decreasing, positive function on #[k, oo]#, if the integral gives a finite result, the series converges and vice versa. This uses the definition of the integral as an accumulation of infinitely thin intervals #dn#. You just end up substituting #n# as #x#.
#arctann/(n^2+1)# ends up decreasing past #x = pi/4# due to #1/(n^2+1)# transforming the shape of #arctann# to fit within the #1/(n^2+1)# curve, and since #pi/4# is less than #1#, we can justifiably do the integral.
#int_1^(oo) arctanx*1/(x^2+1)dx#
Let:
#u = arctanx#
#du = 1/(1+x^2)dx#
#=> int_1^(oo) udu = u^2/2 = [(arctan^2x)/2]|_(1)^(oo)#
#= arctan^2(oo)/2 - arctan^2(1)/2#
#= lim_(x->oo) arctan^2x/2 - lim_(x->1)arctan^2x/2#
#= (pi/2)^2/2 - (pi/4)^2/2#
#= (pi^2/4)/2 - (pi^2/16)/2#
#= (pi^2/8) - (pi^2/32)#
#= (3pi^2)/32 => "finite"#
Thus, the series converges on #[1,oo]# where #k = 1#.