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 A331761 #23 Aug 16 2021 13:48:15 %S A331761 0,1,4,15,32,71,124,211,320,499,716,999,1328,1799,2340,3023,3792,4767, %T A331761 5852,7135,8544,10319,12260,14471,16864,19775,22916,26467,30272,34587, %U A331761 39188,44347,49824,56195,62948,70311,78080,86975 %N A331761 a(n) = Sum_{i=1..n, j=1..n, gcd(i,j)=2} (n+1-i)*(n+1-j). %H A331761 Chai Wah Wu, <a href="/A331761/b331761.txt">Table of n, a(n) for n = 1..10000</a> (terms n=1..600 from N. J. A. Sloane) %H A331761 M. A. Alekseyev. <a href="https://arxiv.org/abs/math/0602511">On the number of two-dimensional threshold functions</a>. arXiv:math/0602511 [math.CO], 2006-2009; doi:<a href="http://dx.doi.org/10.1137/090750184">10.1137/090750184</a>, SIAM J. Disc. Math. 24(4), 2010, pp. 1617-1631. %H A331761 M. A. Alekseyev, M. Basova and N. Yu. Zolotykh. <a href="http://dx.doi.org/10.1137/140978090">On the minimal teaching sets of two-dimensional threshold functions</a>, SIAM J. Disc. Math. 29(1), 2015, pp. 157-165. %F A331761 Conjecture: As n -> oo, a(n) ~ C*n^4/Pi^2, where C is about 0.3775. - _N. J. A. Sloane_, Jul 03 2020 %F A331761 a(n) = (n-1)^2 + 2*Sum_{i=2..floor(n/2)} (n+1-2*i)*(n+1-i)*phi(i). - _Chai Wah Wu_, Aug 16 2021 %t A331761 Table[Sum[Boole[GCD[i, j] == 2] (n + 1 - i) (n + 1 - j), {i, n}, {j, n}], {n, 38}] (* _Michael De Vlieger_, Feb 04 2020 *) %o A331761 (Python) %o A331761 from sympy import totient %o A331761 def A331761(n): return (n-1)**2 + 2*sum(totient(i)*(n+1-2*i)*(n+1-i) for i in range(2,n//2+1)) # _Chai Wah Wu_, Aug 16 2021 %Y A331761 Cf. A115004. %Y A331761 The main diagonal of A331762. %K A331761 nonn %O A331761 1,3 %A A331761 _N. J. A. Sloane_, Feb 04 2020