# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a137932 Showing 1-1 of 1 %I A137932 #81 Oct 17 2022 07:07:07 %S A137932 0,0,0,4,8,16,24,36,48,64,80,100,120,144,168,196,224,256,288,324,360, %T A137932 400,440,484,528,576,624,676,728,784,840,900,960,1024,1088,1156,1224, %U A137932 1296,1368,1444,1520,1600,1680,1764,1848,1936,2024,2116,2208,2304,2400,2500,2600,2704,2808 %N A137932 Terms in an n X n spiral that do not lie on its principal diagonals. %C A137932 The count of terms not on the principal diagonals is always even. %C A137932 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. %C A137932 The sum of the last digits is 40, which is the count of the pattern times 4. %C A137932 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". %C A137932 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. %C A137932 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 %C A137932 Also the circumference of the (n-1) X (n-1) grid graph for n > 2. - _Eric W. Weisstein_, Mar 25 2018 %C A137932 Also the crossing number of the complete bipartite graph K_{5,n}. - _Eric W. Weisstein_, Sep 11 2018 %H A137932 Enrique Pérez Herrero, Table of n, a(n) for n = 0..5000 %H A137932 Kival Ngaokrajang, Illustration of initial terms. %H A137932 Eric Weisstein's World of Mathematics, Complete Bipartite Graph. %H A137932 Eric Weisstein's World of Mathematics, Graph Circumference. %H A137932 Eric Weisstein's World of Mathematics, Graph Crossing Number. %H A137932 Eric Weisstein's World of Mathematics, Grid Graph. %H A137932 Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1). %F A137932 a(n) = n^2 - (2*n - mod(n,2)) = n^2 - A042948(n). %F A137932 a(n) = 2*A007590(n-1). - _Enrique Pérez Herrero_, Jul 04 2012 %F A137932 G.f.: -4*x^3 / ( (1+x)*(x-1)^3 ). a(n) = 4*A002620(n-1). - _R. J. Mathar_, Jul 06 2012 %F A137932 From _Bob Selcoe_, Feb 12 2015: (Start) %F A137932 a(n) = (n-1)^2 when n is odd; a(n) = (n-1)^2 - 1 when n is even. %F A137932 a(n) = A002378(n) - A047238(n+1). (End) %F A137932 From _Amiram Eldar_, Mar 20 2022: (Start) %F A137932 Sum_{n>=3} 1/a(n) = Pi^2/24 + 1/4. %F A137932 Sum_{n>=3} (-1)^(n+1)/a(n) = Pi^2/24 - 1/4. (End) %F A137932 E.g.f.: x*(x - 1)*cosh(x) + (x^2 - x + 1)*sinh(x). - _Stefano Spezia_, Oct 17 2022 %e A137932 a(0) = 0^2 - (2(0) - mod(0,2)) = 0. %e A137932 a(3) = 3^2 - (2(3) - mod(3,2)) = 4. %p A137932 A137932:=n->2*floor((n-1)^2/2); seq(A137932(n), n=0..50); # _Wesley Ivan Hurt_, Apr 19 2014 %t A137932 Table[2 Floor[(n - 1)^2/2], {n, 0, 20}] (* _Enrique Pérez Herrero_, Jul 04 2012 *) %t A137932 2 Floor[(Range[20] - 1)^2/2] (* _Eric W. Weisstein_, Sep 11 2018 *) %t A137932 Table[n^2 - 2 n + (1 - (-1)^n)/2, {n, 20}] (* _Eric W. Weisstein_, Sep 11 2018 *) %t A137932 LinearRecurrence[{2, 0, -2, 1}, {0, 0, 4, 8}, 20] (* _Eric W. Weisstein_, Sep 11 2018 *) %t A137932 CoefficientList[Series[-((4 x^2)/((-1 + x)^3 (1 + x))), {x, 0, 20}], x] (* _Eric W. Weisstein_, Sep 11 2018 *) %o A137932 (Python) a = lambda n: n**2 - (2*n - (n%2)) %o A137932 (PARI) A137932(n)={ return(n^2 - (2*n-n%2))} ; %o A137932 print(vector(30,n,A137932(n-1))); /* _R. J. Mathar_, May 12 2014 */ %Y A137932 Cf. A042948. %Y A137932 Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951. %Y A137932 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. %Y A137932 Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335. %K A137932 nonn,easy %O A137932 0,4 %A A137932 _William A. Tedeschi_, Feb 29 2008 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE