OFFSET
0,2
COMMENTS
Squares of positive integers (plus 1 if n is odd). - Wesley Ivan Hurt, Oct 10 2013
a(n) is the maximum total number of queens that can coexist without attacking each other on an [n+3] X [n+3] chessboard, when the lone queen is in the most vulnerable position on the board. Specifically, the lone queen will placed in any center position, facing an opponent's "army" of size a(n)-1 == A137932(n+2). - Bob Selcoe, Feb 12 2015
a(n) is also the edge chromatic number of the complement of the (n+2) X (n+2) rook graph. - Eric W. Weisstein, Jan 31 2024
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Edge Chromatic Number
Eric Weisstein's World of Mathematics, Rook Complement Graph
Eric Weisstein's World of Mathematics, Rook Graph
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = (3 + 4*n + 2*n^2 - (-1)^n)/2.
E.g.f.: exp(x)*(2 + 3*x + x^2) - cosh(x). The sequence 1,1,5,9,... is given by n^2+(1+(-1)^n)/2 with e.g.f. exp(1+x+x^2)*exp(x)-sinh(x). - Paul Barry, Sep 02 2003 and Sep 19 2003
a(0)=1, a(1)=5, a(2)=9, a(3)=17, a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Harvey P. Dale, Jan 29 2012
a(n)+(-1)^n = A137928(n+1). - Philippe Deléham, Feb 17 2012
G.f.: (1 + 3*x - x^2 + x^3)/((1-x)^3*(1+x)). - Colin Barker, Mar 18 2012
From Bob Selcoe, Feb 12 2015: (Start)
a(n) = A137932(n+2) + 1.
a(n) = (n+1)^2 when n is even; a(n) = (n+1)^2 + 1 when n is odd.
(End)
Sum_{n>=0} 1/a(n) = Pi*coth(Pi/2)/4 + Pi^2/8 - 1/2. - Amiram Eldar, Jul 07 2022
MAPLE
MATHEMATICA
With[{nn = 60}, Riffle[Range[1, nn, 2]^2, 4 Range[nn]^2 + 1]] (* Harvey P. Dale, Jan 29 2012 *)
LinearRecurrence[{2, 0, -2, 1}, {1, 5, 9, 17}, 60] (* Harvey P. Dale, Jan 29 2012 *)
Table[(3 + 4 n + 2 n^2 - (-1)^n)/2, {n, 0, 50}] (* Wesley Ivan Hurt, Oct 10 2013 *)
Table[Mod[n, 2] + (n + 1)^2, {n, 0, 20}] (* Eric W. Weisstein, Jan 31 2024 *)
PROG
(Magma) [(3+4*n+2*n^2-(-1)^n)/2: n in [0..50]]; // Vincenzo Librandi, Sep 06 2011
CROSSREFS
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Mar 19 2003
STATUS
approved