

A331757


Number of edges in a figure made up of a row of n adjacent congruent rectangles upon drawing diagonals of all possible rectangles.


15



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS



FORMULA

For n > 1, a(n) = 2*(n*(n+3) + Sum_{i=2..floor(n/2)} (n+1i)*(n+1+i)*phi(i) + Sum_{i=floor(n/2)+1..n} (n+1i)*(2*n+2i)*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+1i)*(n+1+i) for i in range(2, n//2+1)) + sum(totient(i)*(n+1i)*(2*n+2i) for i in range(n//2+1, n+1))) # Chai Wah Wu, Aug 16 2021


CROSSREFS

A306302 gives number of regions in the figure.


KEYWORD

nonn


AUTHOR



STATUS

approved



