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 A331757 #20 Aug 21 2021 13:18:50 %S A331757 8,28,80,178,372,654,1124,1782,2724,3914,5580,7626,10352,13590,17540, %T A331757 22210,28040,34670,42760,51962,62612,74494,88508,104042,121912,141534, %U A331757 163664,187942,215636,245490,279260,316022,356456,399898,447612,498698,555352 %N A331757 Number of edges in a figure made up of a row of n adjacent congruent rectangles upon drawing diagonals of all possible rectangles. %H A331757 Chai Wah Wu, <a href="/A331757/b331757.txt">Table of n, a(n) for n = 1..10000</a> %H A331757 Lars Blomberg, Scott R. Shannon and N. J. A. Sloane, <a href="http://neilsloane.com/doc/rose_5.pdf">Graphical Enumeration and Stained Glass Windows, 1: Rectangular Grids</a>, (2020). Also arXiv:2009.07918. %F A331757 a(n) = (2*n + 2 + 3*A324042(n) + 4*A324043(n))/2 [Corrected by _Chai Wah Wu_, Aug 16 2021] %F A331757 For n > 1, a(n) = 2*(n*(n+3) + Sum_{i=2..floor(n/2)} (n+1-i)*(n+1+i)*phi(i) + Sum_{i=floor(n/2)+1..n} (n+1-i)*(2*n+2-i)*phi(i)). - _Chai Wah Wu_, Aug 16 2021 %t A331757 Table[n^2 + 4n + 1 + Sum[Sum[(2 * Boole[GCD[i, j] == 1] - Boole[GCD[i, j] == 2]) * (n + 1 - i) * (n + 1 - j), {j, 1, n}], {i, 1, n}], {n, 1, 37}] (* _Joshua Oliver_, Feb 05 2020 *) %o A331757 (Python) %o A331757 from sympy import totient %o A331757 def A331757(n): return 8 if n == 1 else 2*(n*(n+3) + sum(totient(i)*(n+1-i)*(n+1+i) for i in range(2,n//2+1)) + sum(totient(i)*(n+1-i)*(2*n+2-i) for i in range(n//2+1,n+1))) # _Chai Wah Wu_, Aug 16 2021 %Y A331757 A306302 gives number of regions in the figure. %Y A331757 This is column 1 of A331454. %Y A331757 Cf. A324042, A324043. %K A331757 nonn %O A331757 1,1 %A A331757 _N. J. A. Sloane_, Feb 04 2020