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 A351532 #33 Jan 17 2025 11:54:34 %S A351532 0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,3,0,2,1,0,0,1,0,0,1,0,0,1,0,0,1,0, %T A351532 2,5,0,0,1,2,0,1,0,0,3,0,0,1,0,0,1,0,0,3,0,2,1,0,0,3,0,0,1,0,0,1,0,0, %U A351532 1,2,0,5,0,0,1,0,2,1,0,2,1,0,0,3,0,0,1,0,0,7,0,0,1,0,0,1,0,0,1,2,0,1,0,2,3 %N A351532 Number of integer pairs (i, j), 0 < i, j < n, such that i/(n - i) + j/(n - j) = 1. %C A351532 By symmetry, if (i, j) is a solution then so is (j, i). When j=i we get n = 3i, corresponding to the solution 1/2 + 1/2 = 1. Therefore, when 3|n, a(n) > 0 and odd, otherwise a(n) >= 0 and even. %C A351532 For n < 10^6, the largest term is a(720720) = 285, and 483188 terms are 0. %C A351532 Other record terms: a(1081080) = 369, a(2162160) = 457, a(3243240) = 481, a(4324320) = 533, a(5405400) = 559, a(6126120) = 597. Record terms with index >= 360360 appear to occur at indices that are multiples of 180180. - _Chai Wah Wu_, Feb 15 2022 %H A351532 Antti Karttunen, <a href="/A351532/b351532.txt">Table of n, a(n) for n = 1..100000</a> %F A351532 The original equation can be solved for j giving j = (n(n - 2i)) / (2n - 3i). Varying i from 1 to n-1, a(n) is given by the number of integer values of j, 0 < j < n. %e A351532 For n = 3: (i, j) = (1, 1), so a(3) = 1. (1/2 + 1/2 = 1) %e A351532 For n = 18: (i, j) = (3, 8), (6, 6), (8, 3), so a(18) = 3. (3/15 + 8/10 = 1/5 + 4/5 = 1) %e A351532 For n = 20: (i, j) = (5, 8), (8, 5), so a(20) = 2. %e A351532 For n = 36: (i, j) = (6, 16), (8, 15), (12, 12), (15, 8), (16, 6), so a(36) = 5. %o A351532 (PARI) %o A351532 a(n)={my(x=n^2, y=2*n); sum(i=1,(n-1)/2, x-=2*n; y-=3; if(x%y==0,1,0))} %o A351532 (Python) %o A351532 from sympy.abc import i, j %o A351532 from sympy.solvers.diophantine.diophantine import diop_quadratic %o A351532 def A351532(n): %o A351532 return sum(1 for d in diop_quadratic(n**2+3*i*j-2*n*(i+j)) if 0 < d[0] < n and 0 < d[1] < n) # _Chai Wah Wu_, Feb 15 2022 %Y A351532 Cf. A018892, A016017, A051908, A073546, A227610, A238795, A241883, A297895, A303400. %Y A351532 Cf. A351694, A351695 for records. %K A351532 nonn %O A351532 1,18 %A A351532 _Lars Blomberg_, Feb 14 2022 %E A351532 Data section extended up to a(105) by _Antti Karttunen_, Jan 17 2025