login
A113754
Number of possible squares on an n^2 X n^2 grid.
1
1, 30, 285, 1496, 5525, 16206, 40425, 89440, 180441, 338350, 597861, 1005720, 1623245, 2529086, 3822225, 5625216, 8087665, 11389950, 15747181, 21413400, 28686021, 37910510, 49485305, 63866976, 81575625, 103200526, 129406005, 160937560, 198628221, 243405150
OFFSET
1,2
FORMULA
a(n) = n^2*(n^2+1)*(2*n^2+1)/6.
a(n) = Sum_{k=1..n^2} k^2. - L. Edson Jeffery, Sep 05 2013; corrected by Bruno Berselli, Sep 06 2013
G.f.: x*(1+x)*(1+4*x+x^2)*(1+18*x+x^2) / (1-x)^7. - Colin Barker, Mar 22 2016
EXAMPLE
a(2) = 30 because 4^2+3^2+2^2+1^2 = 30.
MAPLE
seq((n^2)*(n^2+1)*(2*n^2+1)/6, n=1..40);
MATHEMATICA
For[n = 1, n < 30, n++, Print[n^2(n^2 + 1)(2n^2 + 1)/6]] (Steinerberger)
PROG
(PARI) Vec(x*(1+x)*(1+4*x+x^2)*(1+18*x+x^2)/(1-x)^7 + O(x^50)) \\ Colin Barker, Mar 22 2016
(Python)
def a(n): return n**2 * (n**2+1) * (2*n**2+1) // 6
print([a(n) for n in range(1, 31)]) # Michael S. Branicky, Jan 30 2021
CROSSREFS
Sequence in context: A259455 A270852 A229427 * A129029 A101381 A061605
KEYWORD
nonn,easy
AUTHOR
Robin Hallett (hallettr(AT)uogueplh.ca), Jan 18 2006
EXTENSIONS
More terms from Stefan Steinerberger, Jan 21 2006
STATUS
approved