This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A252496 #37 Jun 12 2025 16:49:32 %S A252496 3,7,8,13,17,18,21,30,31,32,41,43,46,47,50,55,57,68,72,73,75,76,83,91, %T A252496 93,98,99,100,105,111,112,117,119,122,123,128,129,132,133,142,144,155, %U A252496 157,162,172,173,174,177,182,183,185,187,189,192,193,200,203,211 %N A252496 Numbers k such that arctan(1/k) = arctan(1/x) - arctan(1/y) for some integers 0<x<y<k. %C A252496 arctan(1/a(n)) = arctan(1/x) - arctan(1/y) for some integers x and y where 0 < x < y < a(n). We use the formula tan(a+b) = (tan a + tan b)/(1 - tan a.tan b) which implies that 1/a(n) = (1/x - 1/y)/(1+1/(xy)) or a(n) = (xy+1)/(y-x) = x + (x^2+1)/(y-x). So we look for divisors of x^2+1. %H A252496 Robert Israel, <a href="/A252496/b252496.txt">Table of n, a(n) for n = 1..10000</a> %e A252496 8 is in the sequence since arctan(1/8) = arctan(1/3) - arctan(1/5) %p A252496 N:= 1000: # to get all terms <= N %p A252496 A:= {}: %p A252496 for x from 1 to N/2 do %p A252496 ds:= select(d -> (d <= x and d >= (x^2+1)/(N-x)), numtheory:-divisors(x^2+1)); %p A252496 A:= A union map(d -> x + (x^2+1)/d, ds); %p A252496 od: %p A252496 A; %p A252496 # if using Maple 11 or earlier, uncomment the next line %p A252496 # sort(convert(A,list)); %p A252496 # _Robert Israel_, Dec 19 2014 %o A252496 (SageMath) %o A252496 S = [] %o A252496 bound = 50 %o A252496 for b in range(1, bound-1): %o A252496 bb = b*b+1 %o A252496 for d in divisors(bb): %o A252496 if (2*b < d) & (d-b < 2*bound): %o A252496 c = d-b %o A252496 a = (b*c-1)/(b+c) %o A252496 S.append((c, b, a)) %o A252496 S.sort() %o A252496 print(S) %K A252496 nonn %O A252496 1,1 %A A252496 _Matthijs Coster_, Dec 17 2014