|
|
A137932
|
|
Terms in an n X n spiral that do not lie on its principal diagonals.
|
|
32
|
|
|
0, 0, 0, 4, 8, 16, 24, 36, 48, 64, 80, 100, 120, 144, 168, 196, 224, 256, 288, 324, 360, 400, 440, 484, 528, 576, 624, 676, 728, 784, 840, 900, 960, 1024, 1088, 1156, 1224, 1296, 1368, 1444, 1520, 1600, 1680, 1764, 1848, 1936, 2024, 2116, 2208, 2304, 2400, 2500, 2600, 2704, 2808
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
The count of terms not on the principal diagonals is always even.
The last digit is the repeating pattern 0,0,0,4,8,6,4,6,8,4, which is palindromic if the leading 0's are removed, 4864684.
The sum of the last digits is 40, which is the count of the pattern times 4.
A 4 X 4 spiral is the only spiral, aside from a 0 X 0, whose count of terms that do not lie on its principal diagonals equal the count of terms that do [A137932(4) = A042948(4)] making the 4 X 4 the "perfect spiral".
Yet another property is mod(a(n), A042948(n)) = 0 iff n is even. This is a large family that includes the 4 X 4 spiral.
a(n) is the maximum number of queens of one color that can coexist without attacking one queen of the opponent's color on an [n+1] X [n+1] chessboard, when the lone queen is in the most vulnerable position on the board, i.e., on a center square. - Bob Selcoe, Feb 12 2015
Also the circumference of the (n-1) X (n-1) grid graph for n > 2. - Eric W. Weisstein, Mar 25 2018
Also the crossing number of the complete bipartite graph K_{5,n}. - Eric W. Weisstein, Sep 11 2018
|
|
LINKS
|
Eric Weisstein's World of Mathematics, Grid Graph.
|
|
FORMULA
|
a(n) = n^2 - (2*n - mod(n,2)) = n^2 - A042948(n).
a(n) = (n-1)^2 when n is odd; a(n) = (n-1)^2 - 1 when n is even.
Sum_{n>=3} 1/a(n) = Pi^2/24 + 1/4.
Sum_{n>=3} (-1)^(n+1)/a(n) = Pi^2/24 - 1/4. (End)
E.g.f.: x*(x - 1)*cosh(x) + (x^2 - x + 1)*sinh(x). - Stefano Spezia, Oct 17 2022
|
|
EXAMPLE
|
a(0) = 0^2 - (2(0) - mod(0,2)) = 0.
a(3) = 3^2 - (2(3) - mod(3,2)) = 4.
|
|
MAPLE
|
|
|
MATHEMATICA
|
LinearRecurrence[{2, 0, -2, 1}, {0, 0, 4, 8}, 20] (* Eric W. Weisstein, Sep 11 2018 *)
CoefficientList[Series[-((4 x^2)/((-1 + x)^3 (1 + x))), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 11 2018 *)
|
|
PROG
|
(Python) a = lambda n: n**2 - (2*n - (n%2))
(PARI) A137932(n)={ return(n^2 - (2*n-n%2))} ;
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|