login
A331757
Number of edges in a figure made up of a row of n adjacent congruent rectangles upon drawing diagonals of all possible rectangles.
16
8, 28, 80, 178, 372, 654, 1124, 1782, 2724, 3914, 5580, 7626, 10352, 13590, 17540, 22210, 28040, 34670, 42760, 51962, 62612, 74494, 88508, 104042, 121912, 141534, 163664, 187942, 215636, 245490, 279260, 316022, 356456, 399898, 447612, 498698, 555352
OFFSET
1,1
LINKS
Lars Blomberg, Scott R. Shannon and N. J. A. Sloane, Graphical Enumeration and Stained Glass Windows, 1: Rectangular Grids, (2020). Also arXiv:2009.07918.
FORMULA
a(n) = (2*n + 2 + 3*A324042(n) + 4*A324043(n))/2 [Corrected by Chai Wah Wu, Aug 16 2021]
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
MATHEMATICA
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 *)
PROG
(Python)
from sympy import totient
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
CROSSREFS
A306302 gives number of regions in the figure.
This is column 1 of A331454.
Sequence in context: A134638 A293289 A305638 * A130129 A379763 A317032
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 04 2020
STATUS
approved