OFFSET
1,2
COMMENTS
Conjecture [False!]: Draw the segments joining every lattice point on axis X with every lattice point on axis Y for 1 <= x <= n and 1 <= y <= n. The number of regions formed with these segments and axis X and Y is a(n). - César Eliud Lozada, Feb 14 2013
The above conjecture appears to be wrong. The number of regions formed by this construction is given in A332953, which differs from this sequence for n > 5. - Scott R. Shannon, Mar 04 2020
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
César Eliud Lozada, Counting regions [Warning: Although the drawings here appear to be correct for n <= 5, the generalization to higher n fails - see Comment above and A332953. - N. J. A. Sloane, Mar 04 2020]
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = |b(n)|^2, where b(n) = 3b(n-1) - 3b(n-2) + b(n-3) for n >= 4; b(1)=1, b(2)=2+i, b(3)=3+3i (the recurrence relation follows from the minimal polynomial t^3 - 3t^2 + 3t - 1 of the matrix M).
a(n) = n^2*(n^2 - 2*n + 5)/4. - T. D. Noe, Feb 09 2007
O.g.f.: x*(1 + 3*x^2 + 2*x^3)/(1-x)^5. - R. J. Mathar, Dec 05 2007
a(n) = binomial(n,2)^2 + n^2, n > 1. - Gary Detlefs, Nov 23 2011
E.g.f.: x*(4 +6*x +4*x^2 +x^3)*exp(x)/4. - G. C. Greubel, Feb 22 2019
EXAMPLE
a(5)=25 because M^5 = [1,0,0; 5,1,0; 5+10i, 5i, 1] and |5+10i|^2 = 125.
MAPLE
b[1]:=1: b[2]:=2+I: b[3]:=3+3*I: for n from 4 to 45 do b[n]:=3*b[n-1]-3*b[n-2]+b[n-3] od: seq(abs(b[j])^2, j=1..45);
with(linalg): M[1]:=matrix(3, 3, [1, 0, 0, 1, 1, 0, 1, I, 1]): for n from 2 to 45 do M[n]:=multiply(M[1], M[n-1]) od: seq(abs(M[j][3, 1])^2, j=1..45);
seq(sum((binomial(n, m))^2, m=1..2), n=1..37); # Zerinvary Lajos, Jun 19 2008
# alternative Maple program:
a:= n-> abs((<<1|0|0>, <1|1|0>, <1|I|1>>^n)[3, 1])^2:
seq(a(n), n=1..40); # Alois P. Heinz, Mar 09 2020
MATHEMATICA
Table[n^2(n^2-2n+5)/4, {n, 40}] (* Vincenzo Librandi, Feb 14 2012 *)
PROG
(GAP) List([1..40], n-> n^2*(n^2-2*n+5)/4) # Muniru A Asiru, Feb 22 2019
(PARI) vector(40, n, n^2*(n^2-2*n+5)/4) \\ G. C. Greubel, Feb 22 2019
(Magma) [n^2*(n^2-2*n+5)/4: n in [1..40]]; // G. C. Greubel, Feb 22 2019
(Sage) [n^2*(n^2-2*n+5)/4 for n in (1..40)] # G. C. Greubel, Feb 22 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Nov 28 2006
EXTENSIONS
Edited by Emeric Deutsch, Dec 27 2006
Definition revised by N. J. A. Sloane, Mar 05 2020
STATUS
approved