%I #35 Apr 16 2022 16:34:43
%S 0,1,2,2,2,4,2,3,4,4,2,6,2,4,6,4,2,7,2,6,6,4,2,8,4,4,6,6,2,10,2,5,6,4,
%T 6,10,2,4,6,8,2,10,2,6,10,4,2,10,4,7,6,6,2,10,6,8,6,4,2,14,2,4,10,6,6,
%U 10,2,6,6,10,2,13,2,4,10,6,6,10,2,10,8,4,2,14,6,4,6,8,2,16,6,6,6,4,6
%N Number of integers of the form (n+k)/(n-k) with 1 <= k <= n-1.
%C Number of r X s integer-sided rectangles such that r < s, r + s = 2n and r | s. - _Wesley Ivan Hurt_, Apr 24 2020
%H Antti Karttunen, <a href="/A069930/b069930.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A032741(n) + A069283(n) = A000005(n) - 1 + A001227(n) - 1 = tau(n) + A001227(n) - 2. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jul 13 2002
%F Asymptotic formula: since sum(k=1, n, a(k)) = sum(k=1, n, tau(k)) + sum(k=1, n, A001227(k)) - 2*n = A006218(n) + A060831(n) - 2*n = 2*A006218(n) - A006218(floor(n/2)) - 2*n with A006218(0) = 0, A006218(n) = sum(k=1, n, tau(k)) and now, by Dirichlet's asymptotic expression A006218(n) = n*log(n) + n*(2*gamma-1) + O(n^theta) (gamma = 0.57721..; 1/4 <= theta < 1/2), we have sum(k=1, n, a(k)) = 2*n*log(n) - (n/2)*log(n) + o(n*log(n)) = 1.5*n*log(n) + o(n*log(n)) - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jul 13 2002
%F a(n) = tau(2*n) - 2. - _Michael Somos_, Aug 30 2012
%F Sum_{k=1..n} a(k) ~ n/2 * (3*log(n) + log(2) + 6*gamma - 7), where gamma is the Euler-Mascheroni constant A001620. - _Vaclav Kotesovec_, Feb 13 2019
%t Table[Count[Table[(n+k)/(n-k),{k,n-1}],_?IntegerQ],{n,100}] (* _Harvey P. Dale_, Jun 04 2019 *)
%o (PARI) for(n=1,150,print1(sum(i=1,n-1,if((n+i)%(n-i),0,1)),","))
%o (PARI) {a(n) = if( n<1, 0, numdiv(2*n) - 2)} /* _Michael Somos_, Aug 30 2012 */
%Y Cf. A032741, A069283, A000005 (tau), A001227, A006218, A060831, A066743.
%Y A066660(n) - 1.
%K easy,nonn
%O 1,3
%A _Benoit Cloitre_, May 05 2002