cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-9 of 9 results.

A002620 Quarter-squares: a(n) = floor(n/2)*ceiling(n/2). Equivalently, a(n) = floor(n^2/4).

Original entry on oeis.org

0, 0, 1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, 42, 49, 56, 64, 72, 81, 90, 100, 110, 121, 132, 144, 156, 169, 182, 196, 210, 225, 240, 256, 272, 289, 306, 324, 342, 361, 380, 400, 420, 441, 462, 484, 506, 529, 552, 576, 600, 625, 650, 676, 702, 729, 756, 784, 812
Offset: 0

Views

Author

Keywords

Comments

b(n) = a(n+2) is the number of multigraphs with loops on 2 nodes with n edges [so g.f. for b(n) is 1/((1-x)^2*(1-x^2))]. Also number of 2-covers of an n-set; also number of 2 X n binary matrices with no zero columns up to row and column permutation. - Vladeta Jovovic, Jun 08 2000
a(n) is also the maximal number of edges that a triangle-free graph of n vertices can have. For n = 2m, the maximum is achieved by the bipartite graph K(m, m); for n = 2m + 1, the maximum is achieved by the bipartite graph K(m, m + 1). - Avi Peretz (njk(AT)netvision.net.il), Mar 18 2001
a(n) is the number of arithmetic progressions of 3 terms and any mean which can be extracted from the set of the first n natural numbers (starting from 1). - Santi Spadaro, Jul 13 2001
This is also the order dimension of the (strong) Bruhat order on the Coxeter group A_{n-1} (the symmetric group S_n). - Nathan Reading (reading(AT)math.umn.edu), Mar 07 2002
Let M_n denote the n X n matrix m(i,j) = 2 if i = j; m(i, j) = 1 if (i+j) is even; m(i, j) = 0 if i + j is odd, then a(n+2) = det M_n. - Benoit Cloitre, Jun 19 2002
Sums of pairs of neighboring terms are triangular numbers in increasing order. - Amarnath Murthy, Aug 19 2002
Also, from the starting position in standard chess, minimum number of captures by pawns of the same color to place n of them on the same file (column). Beyond a(6), the board and number of pieces available for capture are assumed to be extended enough to accomplish this task. - Rick L. Shepherd, Sep 17 2002
For example, a(2) = 1 and one capture can produce "doubled pawns", a(3) = 2 and two captures is sufficient to produce tripled pawns, etc. (Of course other, uncounted, non-capturing pawn moves are also necessary from the starting position in order to put three or more pawns on a given file.) - Rick L. Shepherd, Sep 17 2002
Terms are the geometric mean and arithmetic mean of their neighbors alternately. - Amarnath Murthy, Oct 17 2002
Maximum product of two integers whose sum is n. - Matthew Vandermast, Mar 04 2003
a(n+2) gives number of non-symmetric partitions of n into at most 3 parts, with zeros used as padding. E.g., a(7) = 12 because we can write 5 = 5 + 0 + 0 = 0 + 5 + 0 = 4 + 1 + 0 = 1 + 4 + 0 = 1 + 0 + 4 = 3 + 2 + 0 = 2 + 3 + 0 = 2 + 0 + 3 = 2 + 2 + 1 = 2 + 1 + 2 = 3 + 1 + 1 = 1 + 3 + 1. - Jon Perry, Jul 08 2003
a(n-1) gives number of distinct elements greater than 1 of non-symmetric partitions of n into at most 3 parts, with zeros used as padding, appear in the middle. E.g., 5 = 5 + 0 + 0 = 0 + 5 + 0 = 4 + 1 + 0 = 1 + 4 + 0 = 1 + 0 + 4 = 3 + 2 + 0 = 2 + 3 + 0 = 2 + 0 + 3 = 2 + 2 + 1 = 2 + 1 + 2 = 3 + 1 + 1 = 1 + 3 + 1. Of these, 050, 140, 320, 230, 221, 131 qualify and a(4) = 6. - Jon Perry, Jul 08 2003
Union of square numbers (A000290) and oblong numbers (A002378). - Lekraj Beedassy, Oct 02 2003
Conjectured size of the smallest critical set in a Latin square of order n (true for n <= 8). - Richard Bean, Jun 12 2003 and Nov 18 2003
a(n) gives number of maximal strokes on complete graph K_n, when edges on K_n can be assigned directions in any way. A "stroke" is a locally maximal directed path on a directed graph. Examples: n = 3, two strokes can exist, "x -> y -> z" and " x -> z", so a(3) = 2. n = 4, four maximal strokes exist, "u -> x -> z" and "u -> y" and "u -> z" and "x -> y -> z", so a(4) = 4. - Yasutoshi Kohmoto, Dec 20 2003
Number of symmetric Dyck paths of semilength n+1 and having three peaks. E.g., a(4) = 4 because we have U*DUUU*DDDU*D, UU*DUU*DDU*DD, UU*DDU*DUU*DD and UUU*DU*DU*DDD, where U = (1, 1), D = (1, -1) and * indicates a peak. - Emeric Deutsch, Jan 12 2004
Number of valid inequalities of the form j + k < n + 1, where j and k are positive integers, j <= k, n >= 0. - Rick L. Shepherd, Feb 27 2004
See A092186 for another application.
Also, the number of nonisomorphic transversal combinatorial geometries of rank 2. - Alexandr S. Radionov (rasmailru(AT)mail.ru), Jun 02 2004
a(n+1) is the transform of n under the Riordan array (1/(1-x^2), x). - Paul Barry, Apr 16 2005
1, 2, 4, 6, 9, 12, 16, 20, 25, 30, ... specifies the largest number of copies of any of the gifts you receive on the n-th day in the "Twelve Days of Christmas" song. For example, on the fifth day of Christmas, you have 9 French hens. - Alonso del Arte, Jun 17 2005
a(n+1) is the number of noncongruent integer-sided triangles with largest side n. - David W. Wilson [Comment corrected Sep 26 2006]
A quarter-square table can be used to multiply integers since n*m = a(n+m) - a(n-m) for all integer n, m. - Michael Somos, Oct 29 2006
The sequence is the size of the smallest strong critical set in a Latin square of order n. - G.H.J. van Rees (vanrees(AT)cs.umanitoba.ca), Feb 16 2007
Maximal number of squares (maximal area) in a polyomino with perimeter 2n. - Tanya Khovanova, Jul 04 2007
For n >= 3 a(n-1) is the number of bracelets with n+3 beads, 2 of which are red, 1 of which is blue. - Washington Bomfim, Jul 26 2008
Equals row sums of triangle A122196. - Gary W. Adamson, Nov 29 2008
Also a(n) is the number of different patterns of a 2-colored 3-partition of n. - Ctibor O. Zizka, Nov 19 2014
Also a(n-1) = C(((n+(n mod 2))/2), 2) + C(((n-(n mod 2))/2), 2), so this is the second diagonal of A061857 and A061866, and each even-indexed term is the average of its two neighbors. - Antti Karttunen
Equals triangle A171608 * ( 1, 2, 3, ...). - Gary W. Adamson, Dec 12 2009
a(n) gives the number of nonisomorphic faithful representations of the Symmetric group S_3 of dimension n. Any faithful representation of S_3 must contain at least one copy of the 2-dimensional irrep, along with any combination of the two 1-dimensional irreps. - Andrew Rupinski, Jan 20 2011
a(n+2) gives the number of ways to make change for "c" cents, letting n = floor(c/5) to account for the 5-repetitive nature of the task, using only pennies, nickels and dimes (see A187243). - Adam Sasson, Mar 07 2011
a(n) belongs to the sequence if and only if a(n) = floor(sqrt(a(n))) * ceiling(sqrt(a(n))), that is, a(n) = k^2 or a(n) = k*(k+1), k >= 0. - Daniel Forgues, Apr 17 2011
a(n) is the sum of the positive integers < n that have the opposite parity as n.
Deleting the first 0 from the sequence results in a sequence b = 0, 1, 2, 4, ... such that b(n) is sum of the positive integers <= n that have the same parity as n. The sequence b(n) is the additive counterpart of the double factorial. - Peter Luschny, Jul 06 2011
Third outer diagonal of Losanitsch's Triangle, A034851. - Fred Daniel Kline, Sep 10 2011
Written as a(1) = 1, a(n) = a(n-1) + ceiling (a(n-1)) this is to ceiling as A002984 is to floor, and as A033638 is to round. - Jonathan Vos Post, Oct 08 2011
a(n-2) gives the number of distinct graphs with n vertices and n regions. - Erik Hasse, Oct 18 2011
Construct the n-th row of Pascal's triangle (A007318) from the preceding row, starting with row 0 = 1. a(n) counts the total number of additions required to compute the triangle in this way up to row n, with the restrictions that copying a term does not count as an addition, and that all additions not required by the symmetry of Pascal's triangle are replaced by copying terms. - Douglas Latimer, Mar 05 2012
a(n) is the sum of the positive differences of the parts in the partitions of n+1 into exactly 2 parts. - Wesley Ivan Hurt, Jan 27 2013
a(n) is the maximum number of covering relations possible in an n-element graded poset. For n = 2m, this bound is achieved for the poset with two sets of m elements, with each point in the "upper" set covering each point in the "lower" set. For n = 2m+1, this bound is achieved by the poset with m nodes in an upper set covering each of m+1 nodes in a lower set. - Ben Branman, Mar 26 2013
a(n+2) is the number of (integer) partitions of n into 2 sorts of 1's and 1 sort of 2's. - Joerg Arndt, May 17 2013
Alternative statement of Oppermann's conjecture: For n>2, there is at least one prime between a(n) and a(n+1). - Ivan N. Ianakiev, May 23 2013. [This conjecture was mentioned in A220492, A222030. - Omar E. Pol, Oct 25 2013]
For any given prime number, p, there are an infinite number of a(n) divisible by p, with those a(n) occurring in evenly spaced clusters of three as a(n), a(n+1), a(n+2) for a given p. The divisibility of all a(n) by p and the result are given by the following equations, where m >= 1 is the cluster number for that p: a(2m*p)/p = p*m^2 - m; a(2m*p + 1)/p = p*m^2; a(2m*p + 2)/p = p*m^2 + m. The number of a(n) instances between clusters is 2*p - 3. - Richard R. Forberg, Jun 09 2013
Apart from the initial term this is the elliptic troublemaker sequence R_n(1,2) in the notation of Stange (see Table 1, p.16). For other elliptic troublemaker sequences R_n(a,b) see the cross references below. - Peter Bala, Aug 08 2013
a(n) is also the total number of twin hearts patterns (6c4c) packing into (n+1) X (n+1) coins, the coins left is A042948 and the voids left is A000982. See illustration in links. - Kival Ngaokrajang, Oct 24 2013
Partitions of 2n into parts of size 1, 2 or 4 where the largest part is 4, i.e., A073463(n,2). - Henry Bottomley, Oct 28 2013
a(n+1) is the minimum length of a sequence (of not necessarily distinct terms) that guarantees the existence of a (not necessarily consecutive) subsequence of length n in which like terms appear consecutively. This is also the minimum cardinality of an ordered set S that ensures that, given any partition of S, there will be a subset T of S so that the induced subpartition on T avoids the pattern ac/b, where a < b < c. - Eric Gottlieb, Mar 05 2014
Also the number of elements of the list 1..n+1 such that for any two elements {x,y} the integer (x+y)/2 lies in the range ]x,y[. - Robert G. Wilson v, May 22 2014
Number of lattice points (x,y) inside the region of the coordinate plane bounded by x <= n, 0 < y <= x/2. For a(11)=30 there are exactly 30 lattice points in the region below:
6| .
.| . |
5| .+__+
.| . | | |
4| .+__++__+
.| . | | | | |
3| .+__++__++__+
.| . | | | | | | |
2| .+__++__++__++__+
.| . | | | | | | | | |
1| .+__++__++__++__++__+
.|. | | | | | | | | | | |
0|.+__++__++__++__++__++_________
0 1 2 3 4 5 6 7 8 9 10 11 .. n
0 0 1 2 4 6 9 12 16 20 25 30 .. a(n) - Wesley Ivan Hurt, Oct 26 2014
a(n+1) is the greatest integer k for which there exists an n x n matrix M of nonnegative integers with every row and column summing to k, such that there do not exist n entries of M, all greater than 1, and no two of these entries in the same row or column. - Richard Stanley, Nov 19 2014
In a tiling of the triangular shape T_N with row length k for row k = 1, 2, ..., N >= 1 (or, alternatively row length N = 1-k for row k) with rectangular tiles, there can appear rectangles (i, j), N >= i >= j >= 1, of a(N+1) types (and their transposed shapes obtained by interchanging i and j). See the Feb 27 2004 comment above from Rick L. Shepherd. The motivation to look into this came from a proposal of Kival Ngaokrajang in A247139. - Wolfdieter Lang, Dec 09 2014
Every positive integer is a sum of at most four distinct quarter-squares; see A257018. - Clark Kimberling, Apr 15 2015
a(n+1) gives the maximal number of distinct elements of an n X n matrix which is symmetric (w.r.t. the main diagonal) and symmetric w.r.t. the main antidiagonal. Such matrices are called bisymmetric. See the Wikipedia link. - Wolfdieter Lang, Jul 07 2015
For 2^a(n+1), n >= 1, the number of binary bisymmetric n X n matrices, see A060656(n+1) and the comment and link by Dennis P. Walsh. - Wolfdieter Lang, Aug 16 2015
a(n) is the number of partitions of 2n+1 of length three with exactly two even entries (see below example). - John M. Campbell, Jan 29 2016
a(n) is the sum of the asymmetry degrees of all 01-avoiding binary words of length n. The asymmetry degree of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. a(6) = 9 because the 01-avoiding binary words of length 6 are 000000, 100000, 110000, 111000, 111100, 111110, and 111111, and the sum of their asymmetry degrees is 0 + 1 + 2 + 3 + 2 + 1 + 0 = 9. Equivalently, a(n) = Sum_{k>=0} k*A275437(n,k). - Emeric Deutsch, Aug 15 2016
a(n) is the number of ways to represent all the integers in the interval [3,n+1] as the sum of two distinct natural numbers. E.g., a(7)=12 as there are 12 different ways to represent all the numbers in the interval [3,8] as the sum of two distinct parts: 1+2=3, 1+3=4, 1+4=5, 1+5=6, 1+6=7, 1+7=8, 2+3=5, 2+4=6, 2+5=7, 2+6=8, 3+4=7, 3+5=8. - Anton Zakharov, Aug 24 2016
a(n+2) is the number of conjugacy classes of involutions (considering the identity as an involution) in the hyperoctahedral group C_2 wreath S_n. - Mark Wildon, Apr 22 2017
a(n+2) is the maximum number of pieces of a pizza that can be made with n cuts that are parallel or perpendicular to each other. - Anton Zakharov, May 11 2017
Also the matching number of the n X n black bishop graph. - Eric W. Weisstein, Jun 26 2017
The answer to a question posed by W. Mantel: a(n) is the maximum number of edges in an n-vertex triangle-free graph. Also solved by H. Gouwentak, J. Teixeira de Mattes, F. Schuh and W. A. Wythoff. - Charles R Greathouse IV, Feb 01 2018
Number of nonisomorphic outer planar graphs of order n >= 3, size n+2, and maximum degree 4. - Christian Barrientos and Sarah Minion, Feb 27 2018
Maximum area of a rectangle with perimeter 2n and sides of integer length. - André Engels, Jul 29 2018
Also the crossing number of the complete bipartite graph K_{3,n+1}. - Eric W. Weisstein, Sep 11 2018
a(n+2) is the number of distinct genotype frequency vectors possible for a sample of n diploid individuals at a biallelic genetic locus with a specified major allele. Such vectors are the lists of nonnegative genotype frequencies (n_AA, n_AB, n_BB) with n_AA + n_AB + n_BB = n and n_AA >= n_BB. - Noah A Rosenberg, Feb 05 2019
a(n+2) is the number of distinct real spectra (eigenvalues repeated according to their multiplicity) for an orthogonal n X n matrix. The case of an empty spectrum list is logically counted as one of those possibilities, when it exists. Thus a(n+2) is the number of distinct reduced forms (on the real field, in orthonormal basis) for elements in O(n). - Christian Devanz, Feb 13 2019
a(n) is the number of non-isomorphic asymmetric graphs that can be created by adding a single edge to a path on n+4 vertices. - Emma Farnsworth, Natalie Gomez, Herlandt Lino, and Darren Narayan, Jul 03 2019
a(n+1) is the number of integer triangles with largest side n. - James East, Oct 30 2019
a(n) is the number of nonempty subsets of {1,2,...,n} that contain exactly one odd and one even number. For example, for n=7, a(7)=12 and the 12 subsets are {1,2}, {1,4}, {1,6}, {2,3}, {2,5}, {2,7}, {3,4}, {3,6}, {4,5}, {4,7}, {5,6}, {6,7}. - Enrique Navarrete, Dec 16 2019
Aside from the first two terms, a(n) enumerates the number of distinct normal ordered terms in the expansion of the differential operator (x + d/dx)^m associated to the Hermite polynomials and the Heisenberg-Weyl algebra. It also enumerates the number of distinct monomials in the bivariate polynomials corresponding to the partial sums of the series for cos(x+y) and sin(x+y). Cf. A344678. - Tom Copeland, May 27 2021
a(n) is the maximal number of negative products a_i * a_j (1 <= i <= j <= n), where all a_i are real numbers. - Logan Pipes, Jul 08 2021
From Allan Bickle, Dec 20 2021: (Start)
a(n) is the maximum product of the chromatic numbers of a graph of order n-1 and its complement. The extremal graphs are characterized in the papers of Finck (1968) and Bickle (2023).
a(n) is the maximum product of the degeneracies of a graph of order n+1 and its complement. The extremal graphs are characterized in the paper of Bickle (2012). (End)
a(n) is the maximum number m such that m white rooks and m black rooks can coexist on an n-1 X n-1 chessboard without attacking each other. - Aaron Khan, Jul 13 2022
Partial sums of A004526. - Bernard Schott, Jan 06 2023
a(n) is the number of 231-avoiding odd Grassmannian permutations of size n. - Juan B. Gil, Mar 10 2023
a(n) is the number of integer tuples (x,y) satisfying n + x + y >= 0, 25*n + x - 11*y >=0, 25*n - 11*x + y >=0, n + x + y == 0 (mod 12) , 25*n + x - 11*y == 0 (mod 5), 25*n - 11*x + y == 0 (mod 5) . For n=2, the sole solution is (x,y) = (0,0) and so a(2) = 1. For n = 3, the a(3) = 2 solutions are (-3, 2) and (2, -3). - Jeffery Opoku, Feb 16 2024
Let us consider triangles whose vertices are the centers of three squares constructed on the sides of a right triangle. a(n) is the integer part of the area of these triangles, taken without repetitions and in ascending order. See the illustration in the links. - Nicolay Avilov, Aug 05 2024
For n>=2, a(n) is the indendence number of the 2-token graph F_2(P_n) of the path graph P_n on n vertices. (Alternatively, as noted by Peter Munn, F_2(P_n) is the nXn square lattice, or grid, graph diminished by a cut across the diagonal.) - Miquel A. Fiol, Oct 05 2024
For n >= 1, also the lower matching number of the n-triangular honeycomb rook graph. - Eric W. Weisstein, Dec 14 2024
a(n-1) is also the minimal number of edges that a graph of n vertices must have such that any 3 vertices share at least one edge. - Ruediger Jehn, May 20 2025
a(n) is the number of edges of the antiregular graph A_n. This is the unique connected graph with n vertices and degrees 1 to n-1 (floor(n/2) repeated). - Allan Bickle, Jun 15 2025

Examples

			a(3) = 2, floor(3/2)*ceiling(3/2) = 2.
[ n] a(n)
---------
[ 2] 1
[ 3] 2
[ 4] 1 + 3
[ 5] 2 + 4
[ 6] 1 + 3 + 5
[ 7] 2 + 4 + 6
[ 8] 1 + 3 + 5 + 7
[ 9] 2 + 4 + 6 + 8
From _Wolfdieter Lang_, Dec 09 2014: (Start)
Tiling of a triangular shape T_N, N >= 1 with rectangles:
N=5, n=6: a(6) = 9 because all the rectangles (i, j) (modulo transposition, i.e., interchange of i and j) which are of use are:
  (5, 1)                ;  (1, 1)
  (4, 2), (4, 1)        ;  (2, 2), (2, 1)
                        ;  (3, 3), (3, 2), (3, 1)
That is (1+1) + (2+2) + 3 = 9 = a(6). Partial sums of 1, 1, 2, 2, 3, ... (A004526). (End)
Bisymmetric matrices B: 2 X 2, a(3) = 2 from B[1,1] and B[1,2]. 3 X 3, a(4) = 4 from B[1,1], B[1,2], B[1,3], and B[2,2]. - _Wolfdieter Lang_, Jul 07 2015
From _John M. Campbell_, Jan 29 2016: (Start)
Letting n=5, there are a(n)=a(5)=6 partitions of 2n+1=11 of length three with exactly two even entries:
(8,2,1) |- 2n+1
(7,2,2) |- 2n+1
(6,4,1) |- 2n+1
(6,3,2) |- 2n+1
(5,4,2) |- 2n+1
(4,4,3) |- 2n+1
(End)
From _Aaron Khan_, Jul 13 2022: (Start)
Examples of the sequence when used for rooks on a chessboard:
.
A solution illustrating a(5)=4:
  +---------+
  | B B . . |
  | B B . . |
  | . . W W |
  | . . W W |
  +---------+
.
A solution illustrating a(6)=6:
  +-----------+
  | B B . . . |
  | B B . . . |
  | B B . . . |
  | . . W W W |
  | . . W W W |
  +-----------+
(End)
		

References

  • Sergei Abramovich, Combinatorics of the Triangle Inequality: From Straws to Experimental Mathematics for Teachers, Spreadsheets in Education (eJSiE), Vol. 9, Issue 1, Article 1, 2016. See Fig. 3.
  • G. L. Alexanderson et al., The William Powell Putnam Mathematical Competition - Problems and Solutions: 1965-1984, M.A.A., 1985; see Problem A-1 of 27th Competition.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 73, problem 25.
  • Michael Doob, The Canadian Mathematical Olympiad -- L'Olympiade Mathématique du Canada 1969-1993, Canadian Mathematical Society -- Société Mathématique du Canada, Problème 9, 1970, pp 22-23, 1993.
  • H. J. Finck, On the chromatic numbers of a graph and its complement. Theory of Graphs (Proc. Colloq., Tihany, 1966) Academic Press, New York (1968), 99-113.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 99.
  • D. E. Knuth, The art of programming, Vol. 1, 3rd Edition, Addison-Wesley, 1997, Ex. 36 of section 1.2.4.
  • J. Nelder, Critical sets in Latin squares, CSIRO Division of Math. and Stats. Newsletter, Vol. 38 (1977), p. 4.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A087811 is another version of this sequence.
Differences of A002623. Complement of A049068.
a(n) = A014616(n-2) + 2 = A033638(n) - 1 = A078126(n) + 1. Cf. A055802, A055803.
Antidiagonal sums of array A003983.
Cf. A033436 - A033444. - Reinhard Zumkeller, Nov 30 2009
Elliptic troublemaker sequences: A000212 (= R_n(1,3) = R_n(2,3)), A007590 (= R_n(2,4)), A030511 (= R_n(2,6) = R_n(4,6)), A033436 (= R_n(1,4) = R_n(3,4)), A033437 (= R_n(1,5) = R_n(4,5)), A033438 (= R_n(1,6) = R_n(5,6)), A033439 (= R_n(1,7) = R_n(6,7)), A184535 (= R_n(2,5) = R_n(3,5)).
Cf. A077043, A060656 (2^a(n)), A344678.
Cf. A250000 (queens on a chessboard), A176222 (kings on a chessboard), A355509 (knights on a chessboard).
Maximal product of k positive integers with sum n, for k = 2..10: this sequence (k=2), A006501 (k=3), A008233 (k=4), A008382 (k=5), A008881 (k=6), A009641 (k=7), A009694 (k=8), A009714 (k=9), A354600 (k=10).

Programs

  • GAP
    # using the formula by Paul Barry
    A002620 := List([1..10^4], n-> (2*n^2 - 1 + (-1)^n)/8); # Muniru A Asiru, Feb 01 2018
    
  • Haskell
    a002620 = (`div` 4) . (^ 2) -- Reinhard Zumkeller, Feb 24 2012
    
  • Magma
    [ Floor(n/2)*Ceiling(n/2) : n in [0..40]];
    
  • Maple
    A002620 := n->floor(n^2/4); G002620 := series(x^2/((1-x)^2*(1-x^2)),x,60);
    with(combstruct):ZL:=[st,{st=Prod(left,right),left=Set(U,card=r),right=Set(U,card=1)}, unlabeled]: subs(r=1,stack): seq(count(subs(r=2,ZL),size=m),m=0..57) ; # Zerinvary Lajos, Mar 09 2007
  • Mathematica
    Table[Ceiling[n/2] Floor[n/2], {n, 0, 56}] (* Robert G. Wilson v, Jun 18 2005 *)
    LinearRecurrence[{2, 0, -2, 1}, {0, 0, 1, 2}, 60] (* Harvey P. Dale, Oct 05 2012 *)
    Table[Floor[n^2/4], {n, 0, 20}] (* Eric W. Weisstein, Sep 11 2018 *)
    Floor[Range[0, 20]^2/4] (* Eric W. Weisstein, Sep 11 2018 *)
    CoefficientList[Series[-(x^2/((-1 + x)^3 (1 + x))), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 11 2018 *)
    Table[Floor[n^2/2]/2, {n, 0, 56}] (* Clark Kimberling, Dec 05 2021 *)
  • Maxima
    makelist(floor(n^2/4),n,0,50); /* Martin Ettl, Oct 17 2012 */
    
  • PARI
    a(n)=n^2\4
    
  • PARI
    (t(n)=n*(n+1)/2);for(i=1,50,print1(",",(-1)^i*sum(k=1,i,(-1)^k*t(k))))
    
  • PARI
    a(n)=n^2>>2 \\ Charles R Greathouse IV, Nov 11 2009
    
  • PARI
    x='x+O('x^100); concat([0, 0], Vec(x^2/((1-x)^2*(1-x^2)))) \\ Altug Alkan, Oct 15 2015
    
  • Python
    def A002620(n): return (n**2)>>2 # Chai Wah Wu, Jul 07 2022
  • Sage
    def A002620():
         x, y = 0, 1
         yield x
         while true:
             yield x
             x, y = x + y, x//y + 1
    a = A002620(); print([next(a) for i in range(58)]) # Peter Luschny, Dec 17 2015
    

Formula

a(n) = (2*n^2-1+(-1)^n)/8. - Paul Barry, May 27 2003
G.f.: x^2/((1-x)^2*(1-x^2)) = x^2 / ( (1+x)*(1-x)^3 ). - Simon Plouffe in his 1992 dissertation, leading zeros dropped
E.g.f.: exp(x)*(2*x^2+2*x-1)/8 + exp(-x)/8.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Jaume Oliver Lafont, Dec 05 2008
a(-n) = a(n) for all n in Z.
a(n) = a(n-1) + floor(n/2), n > 0. Partial sums of A004526. - Adam Kertesz, Sep 20 2000
a(n) = a(n-1) + a(n-2) - a(n-3) + 1 [with a(-1) = a(0) = a(1) = 0], a(2k) = k^2, a(2k-1) = k(k-1). - Henry Bottomley, Mar 08 2000
0*0, 0*1, 1*1, 1*2, 2*2, 2*3, 3*3, 3*4, ... with an obvious pattern.
a(n) = Sum_{k=1..n} floor(k/2). - Yong Kong (ykong(AT)curagen.com), Mar 10 2001
a(n) = n*floor((n-1)/2) - floor((n-1)/2)*(floor((n-1)/2)+ 1); a(n) = a(n-2) + n-2 with a(1) = 0, a(2) = 0. - Santi Spadaro, Jul 13 2001
Also: a(n) = binomial(n, 2) - a(n-1) = A000217(n-1) - a(n-1) with a(0) = 0. - Labos Elemer, Apr 26 2003
a(n) = Sum_{k=0..n} (-1)^(n-k)*C(k, 2). - Paul Barry, Jul 01 2003
a(n) = (-1)^n * partial sum of alternating triangular numbers. - Jon Perry, Dec 30 2003
a(n) = A024206(n+1) - n. - Philippe Deléham, Feb 27 2004
a(n) = a(n-2) + n - 1, n > 1. - Paul Barry, Jul 14 2004
a(n+1) = Sum_{i=0..n} min(i, n-i). - Marc LeBrun, Feb 15 2005
a(n+1) = Sum_{k = 0..floor((n-1)/2)} n-2k; a(n+1) = Sum_{k=0..n} k*(1-(-1)^(n+k-1))/2. - Paul Barry, Apr 16 2005
a(n) = A108561(n+1,n-2) for n > 2. - Reinhard Zumkeller, Jun 10 2005
1 + 1/(1 + 2/(1 + 4/(1 + 6/(1 + 9/(1 + 12/(1 + 16/(1 + ...))))))) = 6/(Pi^2 - 6) = 1.550546096730... - Philippe Deléham, Jun 20 2005
a(n) = Sum_{k=0..n} Min_{k, n-k}, sums of rows of the triangle in A004197. - Reinhard Zumkeller, Jul 27 2005
For n > 2 a(n) = a(n-1) + ceiling(sqrt(a(n-1))). - Jonathan Vos Post, Jan 19 2006
Sequence starting (2, 2, 4, 6, 9, ...) = A128174 (as an infinite lower triangular matrix) * vector [1, 2, 3, ...]; where A128174 = (1; 0,1; 1,0,1; 0,1,0,1; ...). - Gary W. Adamson, Jul 27 2007
a(n) = Sum_{i=k..n} P(i, k) where P(i, k) is the number of partitions of i into k parts. - Thomas Wieder, Sep 01 2007
a(n) = sum of row (n-2) of triangle A115514. - Gary W. Adamson, Oct 25 2007
For n > 1: gcd(a(n+1), a(n)) = a(n+1) - a(n). - Reinhard Zumkeller, Apr 06 2008
a(n+3) = a(n) + A000027(n) + A008619(n+1) = a(n) + A001651(n+1) with a(1) = 0, a(2) = 0, a(3) = 1. - Yosu Yurramendi, Aug 10 2008
a(2n) = A000290(n). a(2n+1) = A002378(n). - Gary W. Adamson, Nov 29 2008
a(n+1) = a(n) + A110654(n). - Reinhard Zumkeller, Aug 06 2009
a(n) = Sum_{k=0..n} (k mod 2)*(n-k); Cf. A000035, A001477. - Reinhard Zumkeller, Nov 05 2009
a(n-1) = (n*n - 2*n + n mod 2)/4. - Ctibor O. Zizka, Nov 23 2009
a(n) = round((2*n^2-1)/8) = round(n^2/4) = ceiling((n^2-1)/4). - Mircea Merca, Nov 29 2010
n*a(n+2) = 2*a(n+1) + (n+2)*a(n). Holonomic Ansatz with smallest order of recurrence. - Thotsaporn Thanatipanonda, Dec 12 2010
a(n+1) = (n*(2+n) + n mod 2)/4. - Fred Daniel Kline, Sep 11 2011
a(n) = A199332(n, floor((n+1)/2)). - Reinhard Zumkeller, Nov 23 2011
a(n) = floor(b(n)) with b(n) = b(n-1) + n/(1+e^(1/n)) and b(0)= 0. - Richard R. Forberg, Jun 08 2013
a(n) = Sum_{i=1..floor((n+1)/2)} (n+1)-2i. - Wesley Ivan Hurt, Jun 09 2013
a(n) = floor((n+2)/2 - 1)*(floor((n+2)/2)-1 + (n+2) mod 2). - Wesley Ivan Hurt, Jun 09 2013
Sum_{n>=2} 1/a(n) = 1 + zeta(2) = 1+A013661. - Enrique Pérez Herrero, Jun 30 2013
Empirical: a(n-1) = floor(n/(e^(4/n)-1)). - Richard R. Forberg, Jul 24 2013
a(n) = A007590(n)/2. - Wesley Ivan Hurt, Mar 08 2014
A237347(a(n)) = 3; A235711(n) = A003415(a(n)). - Reinhard Zumkeller, Mar 18 2014
A240025(a(n)) = 1. - Reinhard Zumkeller, Jul 05 2014
0 = a(n)*a(n+2) + a(n+1)*(-2*a(n+2) + a(n+3)) for all integers n. - Michael Somos, Nov 22 2014
a(n) = Sum_{j=1..n} Sum_{i=1..n} ceiling((i+j-n-1)/2). - Wesley Ivan Hurt, Mar 12 2015
a(4n+1) = A002943(n) for all n>=0. - M. F. Hasler, Oct 11 2015
a(n+2)-a(n-2) = A004275(n+1). - Anton Zakharov, May 11 2017
a(n) = floor(n/2)*floor((n+1)/2). - Bruno Berselli, Jun 08 2017
a(n) = a(n-3) + floor(3*n/2) - 2. - Yuchun Ji, Aug 14 2020
a(n)+a(n+1) = A000217(n). - R. J. Mathar, Mar 13 2021
a(n) = A004247(n,floor(n/2)). - Logan Pipes, Jul 08 2021
a(n) = floor(n^2/2)/2. - Clark Kimberling, Dec 05 2021
Sum_{n>=2} (-1)^n/a(n) = Pi^2/6 - 1. - Amiram Eldar, Mar 10 2022

A005581 a(n) = (n-1)*n*(n+4)/6.

Original entry on oeis.org

0, 0, 2, 7, 16, 30, 50, 77, 112, 156, 210, 275, 352, 442, 546, 665, 800, 952, 1122, 1311, 1520, 1750, 2002, 2277, 2576, 2900, 3250, 3627, 4032, 4466, 4930, 5425, 5952, 6512, 7106, 7735, 8400, 9102, 9842, 10621, 11440, 12300, 13202, 14147, 15136, 16170
Offset: 0

Views

Author

Keywords

Comments

A class of Boolean functions of n variables and rank 2.
Also, number of inscribable triangles within a (n+4)-gon sharing with them its vertices but not its sides. - Lekraj Beedassy, Nov 14 2003
a(n) = A111808(n,3) for n > 2. - Reinhard Zumkeller, Aug 17 2005
If X is an n-set and Y a fixed 2-subset of X then a(n-2) is equal to the number of (n-3)-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
The sequence starting with offset 2 = binomial transform of [2, 5, 4, 1, 0, 0, 0, ...]. - Gary W. Adamson, Mar 20 2009
Let I=I_n be the n X n identity matrix and P=P_n be the incidence matrix of the cycle (1,2,3,...,n). Then, for n >= 4, a(n-4) is the number of (0,1) n X n matrices A <= P^(-1) + I + P having exactly two 1's in every row and column with perA=8. - Vladimir Shevelev, Apr 12 2010
Also arises as the number of triples of edges which can be chosen as the cut-points in the "three-opt" heuristic for a traveling salesman problem on (n+4) nodes. - James McDermott, Jul 10 2015
a(n) = risefac(n, 3)/3! - n is for n >= 1 also the number of independent components of a symmetric traceless tensor of rank 3 and dimension n. Here risefac is the rising factorial. - Wolfdieter Lang, Dec 10 2015
For n >= 2, a(n) is the number of characters in a word Q formed by concatenating all 'directed' ( left to right or vice versa), unrearranged subwords, from length 1 to (n-1), of a length (n-1) word q- allowing for the appearance of repeated subwords- and simply inserting an extra character for all subwords thus concatenated. - Christopher Hohl, May 30 2019

Examples

			In hexagon ABCDEF, the "interior" triangles are ACE and BDF, and a(6-4)=a(2)=2. - _Toby Gottfried_, Nov 12 2011
G.f. = 2*x^2 + 7*x^3 + 16*x^4 + 30*x^5 + 50*x^6 + 77*x^7 + 112*x^8 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), Table 22.7, p. 797.
  • Joseph D. Konhauser, Dan Velleman and Stan Wagon,, Which Way Did the Bicycle Go?, MAA, 1996, p. 177.
  • V. S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, Vol. 3 (1992), pp. 15-19. - Vladimir Shevelev, Apr 12 2010
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. M. Yaglom and I. M. Yaglom, Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #51 (the case k=3) (First published: San Francisco: Holden-Day, Inc., 1964).

Crossrefs

Programs

Formula

G.f.: (x^2)*(2-x)/(1-x)^4.
a(n) = binomial(n+1, n-2) + binomial(n, n-2).
a(n) = A027907(n, 3), n >= 0 (fourth column of trinomial coefficients). - N. J. A. Sloane, May 16 2003
Convolution of {1, 2, 3, ...} with {2, 3, 4, ...}. - Jon Perry, Jun 25 2003
a(n+2) = 2*te(n) - te(n-1), e.g., a(5) = 2*te(3) - te(2) = 2*20 - 10 = 30, where te(n) are the tetrahedral numbers A000292. - Jon Perry, Jul 23 2003
a(n) is the coefficient of x^3 in the expansion of (1+x+x^2)^n. For example, a(1)=0 since (1+x+x^2)^1=1+x+x^2. - Peter C. Heinig (algorithms(AT)gmx.de), Apr 09 2007
E.g.f.: (x^2 + x^3/6) * exp(x). - Michael Somos, Apr 13 2007
a(n) = - A005586(-4-n) for all n in Z. - Michael Somos, Apr 13 2007
a(n) = C(4+n,3)-(n+4)*(n+1), since C(4+n,3) = number of all triangles in (n+4)-gon, and (n+4)*(n+1)=number of triangles with at least one of the edges included. Example: n=0,in a square, all 4 possible triangles include some of the square's edges and C(4+n,3)-(n+4)*(n+1)=4-4*1=0 = number of other triangles = a(0). - Toby Gottfried, Nov 12 2011
a(n) = 2*binomial(n,2) + binomial(n,3). - Vladimir Shevelev and Peter J. C. Moses, Jun 22 2012
a(0)=0, a(1)=0, a(2)=2, a(3)=7, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Harvey P. Dale, Sep 22 2012
a(n) = A000292(n-1) + A000217(n-1) for all n in Z. - Michael Somos, Jul 29 2015
a(n+2) = -A127672(6+n, n), n >= 0, with A127672 giving the coefficients of Chebyshev's C polynomials. See the Abramowitz-Stegun reference. - Wolfdieter Lang, Dec 10 2015
a(n) = GegenbauerC(N, -n, -1/2) where N = 3 if 3Peter Luschny, May 10 2016
From Amiram Eldar, Jan 09 2022: (Start)
Sum_{n>=2} 1/a(n) = 163/200.
Sum_{n>=2} (-1)^n/a(n) = 12*log(2)/5 - 253/200. (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 01 2000

A103889 Odd and even positive integers swapped.

Original entry on oeis.org

2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19, 22, 21, 24, 23, 26, 25, 28, 27, 30, 29, 32, 31, 34, 33, 36, 35, 38, 37, 40, 39, 42, 41, 44, 43, 46, 45, 48, 47, 50, 49, 52, 51, 54, 53, 56, 55, 58, 57, 60, 59, 62, 61, 64, 63, 66, 65, 68, 67, 70, 69, 72, 71
Offset: 1

Views

Author

Zak Seidov, Feb 20 2005

Keywords

Comments

For n >= 5, also the number of (undirected) Hamiltonian cycles in the (n-2)-Moebius ladder. - Eric W. Weisstein, May 06 2019
For n >= 4, also the number of (undirected) Hamiltonian cycles in the (n-1)-prism graph. - Eric W. Weisstein, May 06 2019
The lexicographically first involution of the natural numbers with no fixed points. - Alexander Fraebel, Sep 08 2020

Crossrefs

Essentially the same as A014681.
Odd numbers: A005408. Even numbers: A005843.
Cf. A004442.

Programs

  • Haskell
    import Data.List (transpose)
    a103889 n = n - 1 + 2 * mod n 2
    a103889_list = concat $ transpose [tail a005843_list, a005408_list]
    -- Reinhard Zumkeller, Jun 23 2013, Feb 21 2011
    
  • Magma
    [n eq 1 select 2 else -Self(n-1)+2*n-1: n in [1..72]];
    
  • Mathematica
    Table[{n + 1, n}, {n, 1, 100, 2}] // Flatten
    Table[n - (-1)^n, {n, 25}] (* Eric W. Weisstein, May 06 2019 *)
  • PARI
    a(n)=n-1+if(n%2,2) \\ Charles R Greathouse IV, Feb 24 2011
    
  • Python
    def a(n): return n+1 if n&1 else n-1
    print([a(n) for n in range(1, 73)]) # Michael S. Branicky, May 03 2023

Formula

a(2k) = 2k-1 = A005408(k), a(2k-1) = 2k = A005843(k), k=1, 2, ...
O.g.f.: x*(x^2-x+2)/((x-1)^2*(1+x)). - R. J. Mathar, Apr 06 2008
a(n) = n-1+2*(n mod 2). - Rolf Pleisch, Apr 22 2008
a(n) = 2*n-a(n-1)-1 (with a(1)=2). - Vincenzo Librandi, Nov 16 2010
From Bruno Berselli, Nov 16 2010: (Start)
a(n) = n - (-1)^n.
a(n) - a(n-1) - a(n-2) + a(n-3) = 0 for n > 3.
(a(n) - 1)*(a(n-1) + 1) = 2*A176222(n+1) for n > 1.
(a(n) - 1)*(a(n-3) + 1) = 2*A176222(n) for n > 3. (End)
E.g.f.: 1 - exp(-x) + x*exp(x). - Stefano Spezia, May 03 2023

A250000 Peaceable coexisting armies of queens: the maximum number m such that m white queens and m black queens can coexist on an n X n chessboard without attacking each other.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 7, 9, 12, 14, 17, 21, 24, 28, 32
Offset: 1

Views

Author

Don Knuth, Aug 01 2014

Keywords

Comments

Comments from N. J. A. Sloane, May 22 2019: (Start)
The earliest reference known for this problem is Ainley (1977) - see reference and excerpts below. He found constructions for n <= 30 which have never been surpassed (except for n=27 - see Knuth's comment below), and he gave a general construction (the 4-pentagon or "4-blob" construction) which achieves a lower bound of 7*n^2/48.
Most of the results described in the examples and comments below (with the exception of the optimality proofs and the enumeration of different solutions) are rediscoveries of Ainley's work.
Ainley's values for n = 1 through 30 are 0, 0, 1, 2, 4, 5, 7, 9, 12, 14, 17, 21, 24, 28, 32, 37, 42, 47, 52, 58, 64, 70, 77, 84, 91, 98, 105, 114, 122, 131. (End)
Sequence A260680 counts the inequivalent configurations or "solutions" corresponding to the maximum number a(n) of queens of each color. Two solutions are regarded as equivalent if one can be obtained from the other by rotations, reflections, or interchanging the colors (a group of order 16).
For the number of inequivalent solutions see A260680.
From Bob Selcoe, Feb 09 2015: (Start)
For n = 4m, a generalized quasi-symmetric pattern of queen arrangements exists showing that a(n) >= ceiling((n+4)(n-2)/8) + floor((n-4)^2/64) == (m+1)(2m-1) + A002620(m-1).
For n = 4m-1, a slightly different pattern exists showing that a(n) >= m(2m-1) + A002620(m).
Both patterns are difficult to describe easily: as m increases, each depends on slight variations to standard arrangements of opposing queens in "blocks" on opposite corners of the chessboard, plus an additional block arrangement which is "forced" by virtue of the corner blocks. See below for examples of boards for n = {12,16,20,24} that show the pattern for n = 4m.
For all n >= 16, a(n) > ceiling(9n^2/64), which is the best asymptotic lower bound presently known.
It is likely that similar "block" patterns exist for n = {4m+1, 4m+2}.
(End)
Comments from Benoit Jubin, Feb 24 2015: (Start)
By modifying the Pratt-Selcoe configuration, I improved the best known lower bound from a(n) > (9/4)*(n/4)^2 to a(n) > (7/3)*(n/4)^2.
I have been sloppy with side effects, but to be on the safe side, let's say a(n) > (7/3)*(floor(n/4))^2 - (3+8*sqrt(2)/3)*ceiling(n/4), where the coefficient 3+8*sqrt(2)/3 is a perimeter that you can compute from the following description.
The configuration in the limit n = infinity is as follows: denoting by x,y in [0,1] the coordinates on the chessboard, the queens of one color are in the two regions x < 1/4, y < 1/2, x < y < x+1/3 and 1/2 < x < 3/4, y < x-1/3, y < 1-x and the queens of the other color are obtained by central symmetry.
As you can guess, I obtained these coefficients by equalizing the lengths of the "opposite" boundaries of the armies (this already improves (by 1) on the "Board 4" example of the webpage).
Using an easy upper bound, one has asymptotically
(2+1/3)*(n/4)^2 < a(n) < 4*(n/4)^2.
Nov 20 2018: Benoit Jubin explained how his upper bound was obtained, as follows:
Let's replace the queens with "amicable rooks". Say white rooks together control a columns and b rows, and the number of white (or black) rooks is N. Then N <= ab (the white constraint) and N <= (n-a)(n-b) (the black constraint). Therefore the largest value than N can take is upper-bounded by setting ab = (n-a)(n-b), so a = b = n/2 and N <= n^2/4. (End)
From Daniel Forgues, Feb 27 2015: (Start)
Observation: Suppose n >= 2 (omitting the 1 X 1 board):
for n = 2k, k >= 1, the values of a(n) are
{0, 2, 5, 9, 14, 21, ...}
for n = 2k+1, k >= 1, the values are
{1, 4, 7, 12, 17, 24, ...}
and then a(2k+1) - a(2k), k >= 1, yields
{1, 2, 2, 3, 3, 3, ...}.
(End)
From Peter Karpov, Apr 03 2016: (Start)
It appears that the maximal asymptotic density of one color for a configuration consisting of two pentagonal regions and their antipodal counterparts (with respect to the center) is 7/48.
Empirical observation: except for two small cases (n = 5, 9), the known values are given by a(n) = floor(7*n^2/48) (see A286283).
(End)
On a board with a maximal set of coexisting armies of queens, is every cell not occupied by a queen attacked by at least one queen of either color? - David A. Corneth, Oct 16 2018
This was problem C1 in Stephen Ainley's 1977 book cited below. His solution on page 31 exhibited precisely the construction rediscovered by Jubin in 2015. On pages 31 and 32 he listed his best results for n up to 30; these agree with a[n] for n up to 13, and with floor(7*n^2/48) for n from 14 to 30, EXCEPT that his best for n=27 was 105 (not 106). He also remarked that one could squeeze in another queen of one color when n is 4, 6, 8, 10, 11, 13, 14, 15, 19, 22, 26, 29. [When n=27, his best was 105 white queens and 107 black queens.] - Don Knuth, Apr 27 2019
The basic configuration of the "cracked block" solution for the n=20, 58-queen arrangement (see May 23 2017 example) is generalizable for all n = 16k+4, k >= 1. While the pattern is difficult to describe briefly enough for this site (each block can be broken down into component sections, each of these described in relation to n), all such n X n boards include the "corner" blocks extending n/4 squares east-to-west and n/2 squares north-to-south, while the "center" blocks extend n/4 squares east-to-west, starting n/4 + 1 squares from the nearest corner. The center white piece and "cracks" (as shown in the n=20 example) appear at the same relative positions in every board. - Bob Selcoe, May 16 2019
It is possible to construct a 15 X 15 board with 32 queens of one color and 34 of another (improving on Ainley's observation of 32 and 33 - see Knuth's Apr 27 2019 comment). Call the larger armies "aggressors". What might be the sequence of largest aggressors, for all optimal A250000(n)? Note that 34 may not be the largest possible aggressor for n=15. - Bob Selcoe, May 29 2019

Examples

			Some examples, in increasing order of size of board.
n=3: There is a unique solution (up to obvious symmetries):
+-------+
| W . . |
| . . . |
| . B . |
+-------+
n=4: There are ten inequivalent solutions, up to obvious symmetries (_Rob Pratt_, Jul 29 2015, with two more discovered by _Benoit Jubin_, Mar 17 2019; total of 10 confirmed by _Rob Pratt_, Mar 18 2019):
----------------------------------------------------------
|..B.||.B..||.B..||....||.BB.||..B.||...W||..B.|..B.|..W.|
|....||.B..||...B||.B.B||....||.B..||.B..||...B|B...|B...|
|...B||....||....||....||....||...W||..B.||.W..|...W|...B|
|WW..||W.W.||W.W.||W.W.||W..W||W...||W...||W...|.W..|.W..|
----------------------------------------------------------
n=5: One of the three solutions for n=5 puts one set of four queens in the corners and the other set in the squares a knight's move away, as follows:
+-----------+
| W . . . W |
| . . B . . |
| . B . B . |
| . . B . . |
| W . . . W |
+-----------+
There are two other solutions (up to symmetry) for n=5 (found by _Rob Pratt_, circa Sep 2014):
+-----------+
| . . B . B |
| W . . . . |
| . . B . B |
| W . . . . |
| . W . W . |
+-----------+
.
+-----------+
| . W . W . |
| . . W . . |
| B . . . B |
| . . W . . |
| B . . . B |
+-----------+
n=6: A solution for n=6:
+-------------+
| . W W . . . |
| . . W . . W |
| . . . . . W |
| . . . . . . |
| B . . . B . |
| B . . B B . |
+-------------+
n=8: a(8) = 9:
+-----------------+
| . . W W . . . . |
| . . W W . . . W |
| . . W . . . W W |
| . . . . . . W W |
| . B . . . . . . |
| B B . . . . . . |
| B B . . . B . . |
| B . . . B B . . | - _Rob Pratt_, Jul 29 2015
+-----------------+
n=9: A solution from _Bob Selcoe_, Feb 07 2015:
+-------------------+
| . B . B . B . B . |
| . . B . . . B . . |
| W . . . W . . . W |
| . . B . . . B . . |
| W . . . W . . . W |
| . . B . . . B . . |
| W . . . W . . . W |
| . . B . . . B . . |
| W . . . W . . . W |
+-------------------+
A solution for n=12 (from Prestwich/Beck paper):
+-------------------------+
| . . . B B B . . . . . B |
| . . . B B B . . . . B . |
| . . . B B B . . . B . B |
| . . . . B . . . . . B B |
| . . . . . . . . . B B B |
| . . . . . . . . . B B . |
| . . W . . . W . . . . . |
| . W W . . . . . . . . . |
| W W W . . . . . W . . . |
| W W . . . . . W W . . . |
| W . W . . . W W W . . . |
| . W . . . . W W W . . . |
+-------------------------+
A solution for n=13 (from Prestwich/Beck paper):
+---------------------------+
| B . . . B . B . . . B . B |
| . . W . . . . . W . . . . |
| . W . W . W . W . W . W . |
| . . W . . . . . W . . . . |
| B . . . B . B . . . B . B |
| . . W . . . . . W . . . . |
| B . . . B . B . . . B . B |
| . . W . . . . . W . . . . |
| . W . W . W . W . W . W . |
| . . W . . . . . W . . . . |
| B . . . B . B . . . B . B |
| . . W . . . . . W . . . . |
| B . . . B . B . . . B . B |
+---------------------------+
From _Bob Selcoe_, Feb 07 2015: (Start)
An alternative solution for n=13:
+---------------------------+
| . B . B . B . B . B . B . |
| . . B . . . B . . . B . . |
| W . . . W . . . W . . . W |
| . . B . . . B . . . B . . |
| W . . . W . . . W . . . W |
| . . B . . . B . . . B . . |
| W . . . W . . . W . . . W |
| . . B . . . B . . . B . . |
| W . . . W . . . W . . . W |
| . . B . . . B . . . B . . |
| W . . . W . . . W . . . W |
| . . B . . . B . . . B . . |
| W . . . W . . . W . . . W |
+---------------------------+
n=15, a fully symmetrical optimal configuration from _Paul Tabatabai_, Oct 16 2018:
+-------------------------------+
| B . B . B . . . . . B . B . B |
| . . . . . . W W W . . . . . . |
| B . B . B . . . . . B . B . B |
| . . . . . . W . W . . . . . . |
| B . B . . . . . . . . . B . B |
| . . . . . . W . W . . . . . . |
| . W . W . W . W . W . W . W . |
| . W . . . . W . W . . . . W . |
| . W . W . W . W . W . W . W . |
| . . . . . . W . W . . . . . . |
| B . B . . . . . . . . . B . B |
| . . . . . . W . W . . . . . . |
| B . B . B . . . . . B . B . B |
| . . . . . . W W W . . . . . . |
| B . B . B . . . . . B . B . B |
+-------------------------------+
n=17: A 42-queen arrangement (the best presently known) for n=17, from _Rob Pratt_, Feb 07 2014:
+-----------------------------------+
| . . . . W W W W W . . . . . . . . |
| . . . . W W W W W . . . . . . . . |
| . . . . W W W W W . . . . . . . W |
| . . . . W W W W . . . . . . . W W |
| . . . . W W W . . . . . . . W W W |
| . . . . . W . . . . . . . W W W W |
| . . . . . . . . . . . . . W W W W |
| . . . . . . . . . . . . . W W W . |
| . . . . . . . . . . . . . W W . . |
| . . B B . . . . . . . . . . . . . |
| . B B B . . . . . . . . . . . . . |
| B B B B . . . . . . . . . . . . . |
| B B B B . . . . . . . B . . . . . |
| B B B B . . . . . . B B B . . . . |
| B B B B . . . . . B B B B . . . . |
| B B B . . . . . . B B B B . . . . |
| B B . . . . . . . B B B B . . . . |
+-----------------------------------+
From _Bob Selcoe_, Feb 09 2015: (Start)
Two alternative 42-queen arrangements for n=17 (inspired by _Rob Pratt_). Other arrangements exist.
Alternative 1:
+-----------------------------------+
| . . . . . W W W W W . . . . . . . |
| . . . . . W W W W W . . . . . . . |
| . . . . . W W W W W . . . . . . W |
| . . . . . W W W W . . . . . . W W |
| . . . . . W W W . . . . . . W W W |
| . . . . . . W . . . . . . W W W W |
| . . . . . . . . . . . . . W W W W |
| . . . . . . . . . . . . . W W W . |
| . . . . . . . . . . . . . W W . . |
| . . . B B . . . . . . . . . . . . |
| . . B B B . . . . . . . . . . . . |
| . B B B B . . . . . . . . . . . . |
| B B B B B . . . . . . B B . . . . |
| B B B B B . . . . . B B B . . . . |
| B B B B . . . . . . B B B . . . . |
| B B B . . . . . . . B B B . . . . |
| B B . . . . . . . . B B B . . . . |
+-----------------------------------+
Alternative 2:
+-----------------------------------+
| . . . . W W W W . . . . . . . . W |
| . . . . W W W W . . . . . . . W W |
| . . . . W W W W . . . . . . W W W |
| . . . . W W W W . . . . . W W W W |
| . . . . . W W . . . . . . W W W W |
| . . . . . . . . . . . . . W W W W |
| . . . . . . . . . . . . . W W W . |
| . . . . . . . . . . . . . W W . . |
| . . . . . . . . . . . . . W . . . |
| . . B B . . . . . . . . . . . . . |
| . B B B . . . . . . . . . . . . . |
| B B B B . . . . . . . B . . . . . |
| B B B B . . . . . . B B B . . . . |
| B B B . . . . . . B B B B . . . . |
| B B . . . . . . B B B B B . . . . |
| B . . . . . . . B B B B B . . . . |
| . . . . . . . . B B B B B . . . . |
+-----------------------------------+
Example of an alternative n=20, 58-queen arrangement with "cracked" blocks from _Bob Selcoe_, May 23 2017:
+-----------------------------------------+
| . . . . . W W W W W . . . . . . . . W . |
| . . . . . W W W W W . . . . . . . W . W |
| . . . . . W W W W W . . . . . . W . W W |
| . . . . . W W W W W . . . . . W . W W W |
| . . . . . W W W W . . . . . . . W W W W |
| . . . . . W W W . . . . . . . W W W W W |
| . . . . . . W . . . . . . . . W W W W . |
| . . . . . . . . . . . . . . . W W W . . |
| . . . . . . . . . . . . . . . W W . . . |
| . . . . . . . . . W . . . . . W . . . . |
| . . . B B . . . . . . . . . . . . . . . |
| . . B B B . . . . . . . . . . . . . . . |
| . B B B B . . . . . . . . . . . . . . . |
| B B B B B . . . . . . . B . . . . . . . |
| B B B B . . . . . . . B B B . . . . . . |
| B B B . B . . . . . B B B B B . . . . . |
| B B . B . . . . . . B B B B B . . . . . |
| B . B . . . . . . . B B B B B . . . . . |
| . B . . . . . . . . B B B B B . . . . . |
| B . . . . . . . . . B B B B B . . . . . |
+-----------------------------------------+
Pattern for n = 4m; four chessboards total.
Board 1: n=12, a(12)=21:
+-------------------------+
| . . . W W W . . . . . . |
| . . . W W W . . . . . W |
| . . . W W W . . . . W W |
| . . . . W . . . . W W W |
| . . . . . . . . . W W W |
| . . . . . . . . . W W . |
| . . B . . . . . . . . . |
| . B B . . . . . . . . . |
| B B B . . . . . B . . . |
| B B B . . . . B B . . . |
| B B . . . . B B B . . . |
| B . . . . . B B B . . . |
+-------------------------+
Board 2: n=16, 37-queen arrangement:
+---------------------------------+
| . . . . W W W W . . . . . . . . |
| . . . . W W W W . . . . . . . W |
| . . . . W W W W . . . . . . W W |
| . . . . W W W W . . . . . W W W |
| . . . . . W W . . . . . W W W W |
| . . . . . . . . . . . . W W W W |
| . . . . . . . . . . . . W W W . |
| . . . . . . . . . . . . W W . . |
| . . . B . . . . . . . . . . . . |
| . . B B . . . . . . . . . . . . |
| . B B B . . . . . . . . . . . . |
| B B B B . . . . . . B B . . . . |
| B B B B . . . . . B B B . . . . |
| B B B . . . . . B B B B . . . . |
| B B . . . . . . B B B B . . . . |
| B . . . . . . . B B B B . . . . |
+---------------------------------+
Board 3: n=20, 58-queen arrangement:
+-----------------------------------------+
| . . . . . W W W W W . . . . . . . . . . |
| . . . . . W W W W W . . . . . . . . . W |
| . . . . . W W W W W . . . . . . . . W W |
| . . . . . W W W W W . . . . . . . W W W |
| . . . . . W W W W W . . . . . . W W W W |
| . . . . . . W W W . . . . . . W W W W W |
| . . . . . . . W . . . . . . . W W W W W |
| . . . . . . . . . . . . . . . W W W W . |
| . . . . . . . . . . . . . . . W W W . . |
| . . . . . . . . . . . . . . . W W . . . |
| . . . . B . . . . . . . . . . . . . . . |
| . . . B B . . . . . . . . . . . . . . . |
| . . B B B . . . . . . . . . . . . . . . |
| . B B B B . . . . . . . . B . . . . . . |
| B B B B B . . . . . . . B B B . . . . . |
| B B B B B . . . . . . B B B B . . . . . |
| B B B B . . . . . . B B B B B . . . . . |
| B B B . . . . . . . B B B B B . . . . . |
| B B . . . . . . . . B B B B B . . . . . |
| B . . . . . . . . . B B B B B . . . . . |
+-----------------------------------------+
Board 4: n=24, 83-queen arrangement:
+-------------------------------------------------+
| . . . . . . W W W W W W . . . . . . . . . . . . |
| . . . . . . W W W W W W . . . . . . . . . . . W |
| . . . . . . W W W W W W . . . . . . . . . . W W |
| . . . . . . W W W W W W . . . . . . . . . W W W |
| . . . . . . W W W W W W . . . . . . . . W W W W |
| . . . . . . W W W W W W . . . . . . . W W W W W |
| . . . . . . . W W W W . . . . . . . W W W W W W |
| . . . . . . . . W W . . . . . . . . W W W W W W |
| . . . . . . . . . . . . . . . . . . W W W W W . |
| . . . . . . . . . . . . . . . . . . W W W W . . |
| . . . . . . . . . . . . . . . . . . W W W . . . |
| . . . . . . . . . . . . . . . . . . W W . . . . |
| . . . . . B . . . . . . . . . . . . . . . . . . |
| . . . . B B . . . . . . . . . . . . . . . . . . |
| . . . B B B . . . . . . . . . . . . . . . . . . |
| . . B B B B . . . . . . . . . . . . . . . . . . |
| . B B B B B . . . . . . . . . B B . . . . . . . |
| B B B B B B . . . . . . . . B B B B . . . . . . |
| B B B B B B . . . . . . . B B B B B . . . . . . |
| B B B B B . . . . . . . B B B B B B . . . . . . |
| B B B B . . . . . . . . B B B B B B . . . . . . |
| B B B . . . . . . . . . B B B B B B . . . . . . |
| B B . . . . . . . . . . B B B B B B . . . . . . |
| B . . . . . . . . . . . B B B B B B . . . . . . |
+-------------------------------------------------+
(End)
Example of an alternative n=20, 58-queen arrangement with "cracked" blocks from _Bob Selcoe_, May 23 2017:
+-----------------------------------------+
| . . . . . W W W W W . . . . . . . . W . |
| . . . . . W W W W W . . . . . . . W . W |
| . . . . . W W W W W . . . . . . W . W W |
| . . . . . W W W W W . . . . . W . W W W |
| . . . . . W W W W . . . . . . . W W W W |
| . . . . . W W W . . . . . . . W W W W W |
| . . . . . . W . . . . . . . . W W W W . |
| . . . . . . . . . . . . . . . W W W . . |
| . . . . . . . . . . . . . . . W W . . . |
| . . . . . . . . . W . . . . . W . . . . |
| . . . B B . . . . . . . . . . . . . . . |
| . . B B B . . . . . . . . . . . . . . . |
| . B B B B . . . . . . . . . . . . . . . |
| B B B B B . . . . . . . B . . . . . . . |
| B B B B . . . . . . . B B B . . . . . . |
| B B B . B . . . . . B B B B B . . . . . |
| B B . B . . . . . . B B B B B . . . . . |
| B . B . . . . . . . B B B B B . . . . . |
| . B . . . . . . . . B B B B B . . . . . |
| B . . . . . . . . . B B B B B . . . . . |
+-----------------------------------------+
.
n = 24: An 84-queen arrangement found by _Benoit Jubin_, Feb 24 2015 (see Comments above).
+-------------------------------------------------+
| . . . . . . W W W W W W . . . . . . . . . . . . |
| . . . . . . W W W W W W . . . . . . . . . . . W |
| . . . . . . W W W W W W . . . . . . . . . . W W |
| . . . . . . W W W W W W . . . . . . . . . W W W |
| . . . . . . W W W W W W . . . . . . . . W W W W |
| . . . . . . W W W W W . . . . . . . . W W W W W |
| . . . . . . . W W W . . . . . . . . W W W W W W |
| . . . . . . . . W . . . . . . . . . W W W W W W |
| . . . . . . . . . . . . . . . . . . W W W W W W |
| . . . . . . . . . . . . . . . . . . W W W W W . |
| . . . . . . . . . . . . . . . . . . W W W W . . |
| . . . . . . . . . . . . . . . . . . W W W . . . |
| . . . . B B . . . . . . . . . . . . . . . . . . |
| . . . B B B . . . . . . . . . . . . . . . . . . |
| . . B B B B . . . . . . . . . . . . . . . . . . |
| . B B B B B . . . . . . . . . . . . . . . . . . |
| B B B B B B . . . . . . . . . . B . . . . . . . |
| B B B B B B . . . . . . . . . B B B . . . . . . |
| B B B B B B . . . . . . . . B B B B . . . . . . |
| B B B B B . . . . . . . . B B B B B . . . . . . |
| B B B B . . . . . . . . B B B B B B . . . . . . |
| B B B . . . . . . . . . B B B B B B . . . . . . |
| B B . . . . . . . . . . B B B B B B . . . . . . |
| B . . . . . . . . . . . B B B B B B . . . . . . |
+-------------------------------------------------+
.
A solution for n = 27 with 106 queens found by _Dmitry Kamenetsky_, Oct 18 2019
+-------------------------------------------------------+
| . . . . . . . . . . . . W W W W W W W . . . . . . . . |
| . . . . . . . . . . . . W W W W W W W . . . . . . . . |
| W . . . . . . . . . . . W W W W W W W . . . . . . . . |
| W W . . . . . . . . . . W W W W W W W . . . . . . . . |
| W W W . . . . . . . . . W W W W W W W . . . . . . . . |
| W W W W . . . . . . . . . W W W W W W . . . . . . . . |
| W W W W W . . . . . . . . . W W W W W . . . . . . . . |
| W W W W W W . . . . . . . . . W W W . . . . . . . . . |
| W W W W W W . . . . . . . . . . W . W . . . . . . . . |
| W W W W W W . . . . . . . . . . . W . . . . . . . . . |
| W W W W W W . . . . . . . . . . . . . . . . . . . . . |
| . W W W W W . . . . . . . . . . . . . . . . . . . . . |
| . . W W W W . . . . . . . . . . . . . . . . . . . . . |
| . . . W W W . . . . . . . . . . . . . . . . . . . . . |
| . . . . W W . . . . . . W . . . . . . . . . . . . . . |
| . . . . . . . . . . . . . . . . . . . B B B B . . . . |
| . . . . . . . . . . . . . . . . . . . B B B B B . . . |
| . . . . . . . . . . . . . . . . . . . B B B B B B . . |
| . . . . . . . B . . . . . . . . . . . B B B B B B B . |
| . . . . . . B . B . . . . . . . . . . B B B B B B B B |
| . . . . . . . B B B . . . . . . . . . B B B B B B B B |
| . . . . . . B B B B B . . . . . . . . . B B B B B B B |
| . . . . . . B B B B B B . . . . . . . . . B B B B B B |
| . . . . . . B B B B B B . . . . . . . . . . B B B B B |
| . . . . . . B B B B B B . . . . . . . . . . . B B B B |
| . . . . . . B B B B B B . . . . . . . . . . . . B B B |
| . . . . . . B B B B B B . . . . . . . . . . . . . B B |
+-------------------------------------------------------+
		

References

  • Stephen Ainley, Mathematical Puzzles. London: G Bell & Sons, 1977.
  • Donald E. Knuth, Satisfiability, Fascicle 6, volume 4 of The Art of Computer Programming. Addison-Wesley, 2015, page 180, Problem 488; see also pp. 282-283.

Crossrefs

A260680 gives number of solutions.
Cf. A002620, A274947, A274948, A286283 (lower bound).
See A000170, A002562, A319284, etc., for the classic non-attacking queens problem.
See also A279405 (torus version), A176222 (peaceable kings), A002620 (peaceable rooks), A355509 (peaceable knights).

Formula

There is an asymptotic lower bound of (9/64)*n^2. But see Comments for a better lower bound.

Extensions

Uniqueness of n = 5 example corrected by Rob Pratt, Nov 30 2014
a(12)-a(13) obtained from Prestwich/Beck paper by Rob Pratt, Nov 30 2014
More examples from Rob Pratt, Dec 01 2014
a(1)-a(13) confirmed and bounds added for n = 14 to 20 obtained via integer linear programming by Rob Pratt, Dec 01 2014
28 <= a(14) <= 43, 32 <= a(15) <= 53, 37 <= a(16) <= 64, 42 <= a(17) <= 72, 47 <= a(18) <= 81, 52 <= a(19) <= 90, 58 <= a(20) <= 100. - Rob Pratt, Dec 01 2014
Bounds obtained by simulated annealing: a(21) >= 64, a(22) >= 70, a(23) >= 77, a(24) >= 84. - Peter Karpov, Apr 03 2016
a(14)-a(15) from Paul Tabatabai using integer programming, Oct 16 2018
Edited by N. J. A. Sloane, Nov 18 2018 to include comments from Benoit Jubin, Feb 24 2015 which were posted to the Sequence Fans Mailing List but were not added to this entry until today.
Counts for n=4 edited by N. J. A. Sloane, Mar 19 2019. See A260680 for more information.

A005582 a(n) = n*(n+1)*(n+2)*(n+7)/24.

Original entry on oeis.org

0, 2, 9, 25, 55, 105, 182, 294, 450, 660, 935, 1287, 1729, 2275, 2940, 3740, 4692, 5814, 7125, 8645, 10395, 12397, 14674, 17250, 20150, 23400, 27027, 31059, 35525, 40455, 45880, 51832, 58344, 65450, 73185, 81585, 90687, 100529, 111150, 122590, 134890
Offset: 0

Views

Author

Keywords

Comments

a(n) = number of Dyck (n+2)-paths with exactly 2 rows of peaks. A row of peaks is a maximal sequence of peaks all at the same height and 2 units apart. For example, UDUDUD ( = /\/\/\ ) contains exactly one row of peaks, as does UUUDDD, but UDUUDDUD has three and a(1)=2 counts UDUUDD, UUDDUD. - David Callan, Mar 02 2005
If X is an n-set and Y a fixed 2-subset of X then a(n-4) is equal to the number of (n-4)-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
Let I=I_n be the n X n identity matrix and P=P_n be the incidence matrix of the cycle (1,2,3,...,n). Then, for n>=7, a(n-7) is the number of (0,1) n X n matrices A<=P^(-1)+I+P having exactly two 1's in every row and column with perA=16. - Vladimir Shevelev, Apr 12 2010
Row 2 of the convolution array A213550. - Clark Kimberling, Jun 20 2012
a(n-1) = risefac(n, 4)/4! - risefac(n, 2)/2! is for n >= 1 also the number of independent components of a symmetric traceless tensor of rank 4 and dimension n. Here risefac is the rising factorial. - Wolfdieter Lang, Dec 10 2015
Consider the array formed by the second polygonal numbers of increasing rank:
A000217(-1-n): 0, 1, 3, 6, 10, 15, ...
A000270(-1-n): 1, 4, 9, 16, 25, 36, ...
A000326(-1-n): 2, 7, 15, 26, 40, 57, ...
A000384(-1-n): 3, 10, 21, 36, 55, 78, ...
Then the antidiagonal sums yield this sequence. - Michael Somos, Nov 23 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), Table 22.7, p. 797.
  • Vladimir S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, 3(1992),15-19. [From Vladimir Shevelev, Apr 12 2010]
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. M. Yaglom and I. M. Yaglom: Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #51 (the case k=4) (First published: San Francisco: Holden-Day, Inc., 1964)

Crossrefs

Partial sums of A005581.

Programs

  • Maple
    [seq(binomial(n,4)+2*binomial(n,3), n=2..43)]; # Zerinvary Lajos, Jul 26 2006
    seq((n+4)*binomial(n,4)/n, n=3..43); # Zerinvary Lajos, Feb 28 2007
    A005582:=(-2+z)/(z-1)**5; # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Table[n(n+1)(n+2)(n+7)/24,{n,0,40}] (* Harvey P. Dale, Jun 01 2012 *)
  • PARI
    concat(0, Vec(x*(2-x)/(1-x)^5 + O(x^100))) \\ Altug Alkan, Dec 10 2015

Formula

a(n) = binomial(n+3, n-1) + binomial(n+2, n-1).
a(n) = binomial(n,4) + 2*binomial(n,3), n>=2. - Zerinvary Lajos, Jul 26 2006
From Colin Barker, Jan 28 2012: (Start)
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: x*(2-x)/(1-x)^5. (End)
a(n) = Sum_{k=1..n} ( Sum_{i=1..k} i(n-k+2) ). - Wesley Ivan Hurt, Sep 26 2013
a(n+1) = A127672(8+n, n), n >= 0, with the Chebyshev C-polynomial coefficients A127672(n, k). See the Abramowitz-Stegun reference. - Wolfdieter Lang, Dec 10 2015
E.g.f.: (1/24)*x*(48 + 60*x + 16*x^2 + x^3)*exp(x). - G. C. Greubel, Jul 01 2017
Sum_{n>=1} 1/a(n) = 853/1225. - Amiram Eldar, Jan 02 2021
a(n) = A005587(-7-n) for all n in Z. - Michael Somos, Nov 23 2021

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 01 2000

A331432 Triangle T(n,k) (n >= k >= 0) read by rows: T(n,0) = (1+(-1)^n)/2; for k>=1, set T(0,k) = 0, S(n,k) = binomial(n,k)*binomial(n+k+1,k), and for n>=1, T(n,k) = S(n,k)-T(n-1,k).

Original entry on oeis.org

1, 0, 3, 1, 5, 10, 0, 10, 35, 35, 1, 14, 91, 189, 126, 0, 21, 189, 651, 924, 462, 1, 27, 351, 1749, 4026, 4290, 1716, 0, 36, 594, 4026, 13299, 22737, 19305, 6435, 1, 44, 946, 8294, 36751, 89375, 120835, 85085, 24310, 0, 55, 1430, 15730, 89375, 289003, 551837, 615043, 369512, 92378, 1, 65, 2080, 27950, 197275, 811733, 2047123, 3203837, 3031678, 1587222, 352716
Offset: 0

Views

Author

N. J. A. Sloane, Jan 17 2020

Keywords

Comments

The scanned pages of Ser are essentially illegible, and the book is out of print and hard to locate.
For Table IV on page 93, it is simplest to ignore the minus signs. The present triangle then matches all the given terms in that triangle, so it seems best to define the triangle by the recurrences given here, and to conjecture (strongly) that this is the same as Ser's triangle.

Examples

			Triangle begins:
  1;
  0,  3;
  1,  5,   10;
  0, 10,   35,    35;
  1, 14,   91,   189,    126;
  0, 21,  189,   651,    924,    462;
  1, 27,  351,  1749,   4026,   4290,    1716;
  0, 36,  594,  4026,  13299,  22737,   19305,    6435;
  1, 44,  946,  8294,  36751,  89375,  120835,   85085,   24310;
  0, 55, 1430, 15730,  89375, 289003,  551837,  615043,  369512,   92378;
  1, 65, 2080, 27950, 197275, 811733, 2047123, 3203837, 3031678, 1587222, 352716;
		

References

  • J. Ser, Les Calculs Formels des Séries de Factorielles. Gauthier-Villars, Paris, 1933, p. 93.

Crossrefs

Columns 1 and 2 are A176222 and A331429; the last three diagonals are A002739, A002737, A001700.
Taking the component-wise sums of the rows by pairs give the triangle in A178303.
Ser's tables I and III are A331430 and A331431 (both are still mysterious).

Programs

  • Maple
    SS := (n,k)->binomial(n,k)*binomial(n+k+1,k);
    T4:=proc(n,k) local i; global SS; option remember;
    if k=0 then return((1+(-1)^n)/2); fi;
    if n=0 then 0 else SS(n,k)-T4(n-1,k); fi; end;
    rho:=n->[seq(T4(n,k),k=0..n)];
    for n from 0 to 14 do lprint(rho(n)); od:
  • Mathematica
    T[n_, k_]:= T[n, k]= If[n<0, 0, If[k==0, (1 + (-1)^n)/2, Binomial[n, k]*Binomial[n+k+1, k] - T[n-1, k]]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 21 2022 *)
  • Sage
    def T(n,k): # A331432
        if (n<0): return 0
        elif (k==0): return ((n+1)%2)
        else: return binomial(n,k)*binomial(n+k+1,k) - T(n-1,k)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 21 2022

Formula

T(n, k) = binomial(n,k)*binomial(n+k+1,k) - T(n-1, k), with T(n, 0) = (1 + (-1)^n)/2.
T(n, 0) = A000035(n+1).
T(n, 1) = A176222(n).
T(n, 2) = A331429(n).
T(n, n-2) = A002739(n).
T(n, n-1) = A002737(n).
T(n, n) = A001700(n).

A265208 Total number T(n,k) of lambda-parking functions induced by all partitions of n into exactly k distinct parts; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 3, 3, 0, 4, 5, 0, 5, 10, 0, 6, 14, 16, 0, 7, 21, 25, 0, 8, 27, 43, 0, 9, 36, 74, 0, 10, 44, 107, 125, 0, 11, 55, 146, 189, 0, 12, 65, 207, 307, 0, 13, 78, 267, 471, 0, 14, 90, 342, 786, 0, 15, 105, 436, 1058, 1296, 0, 16, 119, 538, 1490, 1921
Offset: 0

Views

Author

Alois P. Heinz, Dec 04 2015

Keywords

Comments

Differs from A265020 first at T(5,2). See example.

Examples

			T(5,2) = 10: There are two partitions of 5 into 2 distinct parts: [2,3], [1,4]. Together they have 10 lambda-parking functions: [1,1], [1,2], [1,3], [1,4], [2,1], [2,2], [2,3], [3,1], [3,2], [4,1]. Here [1,1], [1,2], [1,3], [2,1], [3,1] are induced by both partitions. But they are counted only once.
T(6,1) = 6: [1], [2], [3], [4], [5], [6].
T(6,2) = 14: [1,1], [1,2], [1,3], [1,4], [1,5], [2,1], [2,2], [2,3], [2,4], [3,1], [3,2], [4,1], [4,2], [5,1].
T(6,3) = 16: [1,1,1], [1,1,2], [1,1,3], [1,2,1], [1,2,2], [1,2,3], [1,3,1], [1,3,2], [2,1,1], [2,1,2], [2,1,3], [2,2,1], [2,3,1], [3,1,1], [3,1,2], [3,2,1].
Triangle T(n,k) begins:
00 :  1;
01 :  0,  1;
02 :  0,  2;
03 :  0,  3,   3;
04 :  0,  4,   5;
05 :  0,  5,  10;
06 :  0,  6,  14,  16;
07 :  0,  7,  21,  25;
08 :  0,  8,  27,  43;
09 :  0,  9,  36,  74;
10 :  0, 10,  44, 107,  125;
11 :  0, 11,  55, 146,  189;
12 :  0, 12,  65, 207,  307;
13 :  0, 13,  78, 267,  471;
14 :  0, 14,  90, 342,  786;
15 :  0, 15, 105, 436, 1058, 1296;
16 :  0, 16, 119, 538, 1490, 1921;
		

Crossrefs

Columns k=0-2 give: A000007, A000027, A176222(n+1).
Row sums give A265202.
Cf. A000217, A000272, A003056, A206735 (the same for general partitions), A265020, A265145.

Programs

  • Maple
    b:= proc(p, g, n, i, t) option remember; `if`(g=0, 0, p!/g!*x^p)+
          `if`(n (p-> seq(coeff(p, x, i), i=0..degree(p)))(
            `if`(n=0, 1, b(0$2, n, 1$2))):
    seq(T(n), n=0..25);
  • Mathematica
    b[p_, g_, n_, i_, t_] := b[p, g, n, i, t] = If[g==0, 0, p!/g!*x^p] + If[nJean-François Alcover, Feb 02 2017, translated from Maple *)

Formula

T(A000217(n),n) = A000272(n+1).

A355509 Peaceable coexisting armies of knights: a(n) is the maximum number m such that m white knights and m black knights can coexist on an n X n chessboard without attacking each other.

Original entry on oeis.org

0, 2, 3, 6, 10, 14, 18, 24, 32, 40, 50, 60, 72, 84, 98, 112, 128, 144, 162, 180, 200, 220, 242, 264, 288, 312, 338, 364, 392, 420, 450, 480, 512, 544, 578, 612, 648, 684, 722, 760, 800, 840, 882, 924, 968, 1012, 1058, 1104, 1152, 1200, 1250, 1300, 1352, 1404
Offset: 1

Views

Author

Aaron Khan, Jul 04 2022

Keywords

Comments

After the first 7 terms, the first differences are terms of A052928: for n >= 8, a(n) - a(n-1) = A052928(n-1).
The increase in differences going from an even n to an odd n, but not from an odd n to an even n, is due to the differing optimal layouts for odd vs. even n values. See example section for a(7) and a(8).

Examples

			Examples for n=2 to n=6 have been included as they do not follow the general formula.
.
A solution illustrating a(2)=2:
  +-----+
  | B B |
  | W W |
  +-----+
.
A solution illustrating a(3)=3:
  +-------+
  | . . . |
  | B B W |
  | W W B |
  +-------+
.
A solution illustrating a(4)=6:
  +---------+
  | B B . W |
  | W W . B |
  | B B . W |
  | W W . B |
  +---------+
.
A solution illustrating a(5)=10:
  +-----------+
  | W B W B W |
  | W B W B W |
  | . . . . . |
  | B W B W B |
  | B W B W B |
  +-----------+
.
A solution illustrating a(6)=14:
  +-------------+
  | B B W W B B |
  | W W B B W W |
  | B . . . . B |
  | W . . . . W |
  | B B W W B B |
  | W W B B W W |
  +-------------+
.
Examples for n=7 and n=8 are provided, as while both follow the same formula, the layout for even values of n differs from the layout for odd values of n (related to the fact that, for even values of n, the floor function rounds down a non-integer value).
.
A solution illustrating a(7)=18:
  +---------------+
  | B B B B B B B |
  | B B B B B B B |
  | B . B . B . B |
  | . . . . . . . |
  | W . W . W . W |
  | W W W W W W W |
  | W W W W W W W |
  +---------------+
.
A solution illustrating a(8)=24:
  +-----------------+
  | B B B B B B B B |
  | B B B B B B B B |
  | B B B B B B B B |
  | . . . . . . . . |
  | . . . . . . . . |
  | W W W W W W W W |
  | W W W W W W W W |
  | W W W W W W W W |
  +-----------------+
		

Crossrefs

Cf. A007590, A052928, A176222 (peaceable kings), A250000 (peaceable queens), A002620 (peaceable rooks).

Formula

For n > 6, a(n) = floor(((n-1)^2)/2).
G.f.: x^2*(2 - x + 2*x^3 - 2*x^4 - x^5 + 2*x^6 + 2*x^7 - 2*x^8)/((1 - x)^3*(1 + x)). - Stefano Spezia, Jul 05 2022

A373417 Triangle T(n,k) for the number of permutations in symmetric group S_n with (n-k) fixed points and an even number of non-fixed point cycles. Equivalent to the number of cycles of n items with cycle type defined by non-unity partitions of k<=n that contain an even number of parts.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 1, 0, 0, 0, 15, 20, 1, 0, 0, 0, 45, 120, 130, 1, 0, 0, 0, 105, 420, 910, 924, 1, 0, 0, 0, 210, 1120, 3640, 7392, 7413, 1, 0, 0, 0, 378, 2520, 10920, 33264, 66717, 66744, 1, 0, 0, 0, 630, 5040, 27300, 110880, 333585, 667440, 667476
Offset: 0

Views

Author

Keywords

Comments

A343418(n) + a(n) = A098825(n) = partial derangement "rencontres" triangle.
A343418(n) - a(n) = (k-1) * binomial(n,k) = A127717(n-1,k-1).
Difference of 1st and 2nd leading diagonals (n > 0).
T(n,n) - T(n,n-1) = -1,0,0,3,5,10,14,21,27,36,44,...
= (-1) + (1+0) + (3+2) + (5+4) + (7+6) + (9+8) + ...
Cf. A176222(n) with 2 terms -1,0 prepended (moving its offset from 3 to 1).

Examples

			Triangle array T(n,k):
  n:  {k<=n}
  0:  {1}
  1:  {1, 0}
  2:  {1, 0, 0}
  3:  {1, 0, 0, 0}
  4:  {1, 0, 0, 0,   3}
  5:  {1, 0, 0, 0,  15,   20}
  6:  {1, 0, 0, 0,  45,  120,   130}
  7:  {1, 0, 0, 0, 105,  420,   910,    924}
  8:  {1, 0, 0, 0, 210, 1120,  3640,   7392,   7413}
  9:  {1, 0, 0, 0, 378, 2520, 10920,  33264,  66717,  66744}
  10: {1, 0, 0, 0, 630, 5040, 27300, 110880, 333585, 667440, 667476}
T(n,0) = 1 due to sole permutation in S_n with n fixed points, namely the identity permutation, with 0 non-fixed point cycles, an even number. (T(0,0)=1 relies on S_0 containing an empty permutation.)
T(n,1) = 0 due to no permutations in S_n with (n-1) fixed points.
T(n,2) = T(n,3) = 0 due to only non-unity partitions of 2 and 3 being of odd length, namely the trivial partitions (2),(3).
Example:
T(4,4) = 3 since S_4 contains 3 permutations with 0 fixed points and an even number of non-fixed point cycles, namely the derangements: (12)(34),(13)(24),(14)(23).
Worked Example:
T(7,6) = 910 permutations in S_7 with 1 fixed point and an even number of non-fixed point cycles.
T(7,6) = 910 possible (4,2)- and (3,3)-cycles of 7 items.
N(n,y) = possible y-cycles of n items.
N(n,y) = (n!/(n-k)!) / (M(y) * s(y)).
y = partition of k<=n with q parts = (p_1, p_2, ..., p_i, ..., p_q)
s.t. k = Sum_{i=1..q} p_i.
Or:
y = partition of k<=n with d distinct parts, each with multiplicity m_j = (y_1^m_1, y_2^m_2, ..., y_j^m_j, ..., y_d^m_d)
s.t. k = Sum_{j=1..d} m_j*y_j.
M(y) = Product_{i=1..q} p_i = Product_{j=1..d} y_j^m_j.
s(y) = Product_{j=1..d} m_j! ("symmetry of repeated parts").
Note: (n!/(n-k)!) / s(y) = multinomial(n, {m_j}).
Therefore:
T(7,6) = N(7,y=(4,2)) + N(7,y=(3^2))
       = (7!/(4*2)) + (7!/(3^2)/2!)
       = 7! * (1/8 + 1/18)
       = 5040 * (13/72)
T(7,6) = 910.
		

Crossrefs

Cf. A373418 (odd case), A373339 (row sums), A216778 (main diagonal).

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, t, add(expand(`if`(j>1, x^j, 1)*
          b(n-j, irem(t+signum(j-1), 2)))*binomial(n-1, j-1)*(j-1)!, j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Jun 04 2024
  • Mathematica
    Table[Table[n!/(n-k)!/2 * (Sum[(-1)^j/j!, {j, 0, k}] - ((k - 1)/k!)), {k, 0, n}], {n, 0, 10}]

Formula

T(n,k) = (n!/(n-k)!/2) * (Sum_{j=0..k} (-1)^j/j! - (k-1)/k!) Cf. Sum_{j=0..k} (-1)^j/j! = A053557(k) / A053556(k).
Showing 1-9 of 9 results.