OFFSET
0,3
COMMENTS
Number of crossings in a grid formed by drawing n parallel infinite-length lines perpendicular to the previous number of lines.
The sum of odd integers <= n is m^2 where m = round(n/2) is their number. The sum of even integers <= n is k(k+1) where k = floor(n/2) is their number. So a(n) = m^2*k(k+1), where the factor m appears three times. - M. F. Hasler, Dec 19 2019
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-1,-5,5,1,-3,1).
FORMULA
G.f.: 2*(x^2+x+1)*x^2/((x+1)^2*(1-x)^5).
a(n) = 2 * A007009(n-1) for n>1.
a(2k+i) = (k+i)^3 (k+1-i), with i = 0 or 1. - M. F. Hasler, Dec 19 2019
MATHEMATICA
CoefficientList[Series[2 (x^2 + x + 1) x^2/((x + 1)^2*(1 - x)^5), {x, 0, 45}], x] (* Michael De Vlieger, Dec 22 2019 *)
LinearRecurrence[{3, -1, -5, 5, 1, -3, 1}, {0, 0, 2, 8, 24, 54, 108}, 50] (* Harvey P. Dale, Dec 29 2021 *)
PROG
(PARI) apply( A330520(n)=n\2*(n\2+1)*(n\/2)^2, [0..99]) \\ M. F. Hasler, Dec 19 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
J. Stauduhar, Dec 17 2019
STATUS
approved