

A189416


Number of parallelograms on an n X n grid.


4



0, 1, 22, 158, 674, 2159, 5664, 13004, 26904, 51401, 92094, 156710, 255090, 400359, 608656, 900100, 1299336, 1836461, 2546550, 3472162, 4661898, 6173123, 8071952, 10434600, 13346080, 16905033, 21221558, 26419338, 32636098, 40027283, 48761448
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


LINKS

Table of n, a(n) for n=1..31.
Nathaniel Johnston, C program for computing terms
Eric Weisstein's World of Mathematics, Parallelogram


FORMULA

a(n) = Sum_{a=1..n1} Sum_{b=1..n1} (na)*(nb)*(2*a*b  gcd(a,b)).  Andrew Howroyd, Sep 19 2017


MATHEMATICA

a[n_] := Sum[(na)*(nb)*(2*a*b  GCD[a, b]), {a, 1, n1}, {b, 1, n1}];
Array[a, 31] (* JeanFrançois Alcover, Oct 08 2017, translated from PARI *)


PROG

(PARI) a(n) = sum(a=1, n1, sum(b=1, n1, (na)*(nb)*(2*a*b  gcd(a, b)) )); \\ Andrew Howroyd, Sep 19 2017


CROSSREFS

Cf. A186434, A189413, A189414.
Sequence in context: A224257 A244868 A223913 * A224185 A185859 A173393
Adjacent sequences: A189413 A189414 A189415 * A189417 A189418 A189419


KEYWORD

nonn


AUTHOR

Martin Renner, Apr 21 2011


EXTENSIONS

a(6)a(31) from Nathaniel Johnston, Apr 24 2011


STATUS

approved



