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-10 of 90 results. Next

A182834 Complement of A007590, except for initial zeros.

Original entry on oeis.org

1, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92
Offset: 1

Views

Author

Clark Kimberling, Jan 07 2011

Keywords

Comments

A245575(a(n)) mod 2 = 0, or, where even terms occur in A245575; a(A078633(n)) mod 2 = 0. - Reinhard Zumkeller, Aug 05 2014

Crossrefs

Programs

  • Haskell
    a182834 n = a000196 (2 * n - 2) + n  -- Reinhard Zumkeller, Aug 05 2014
    
  • Mathematica
      a=2; b=-2;
      Table[n+Floor[(a*n+b)^(1/2)],{n,80}]
      Table[n-1+Ceiling[(n*n-b)/a],{n,50}]
  • Python
    from math import isqrt
    def A182834(n): return n+isqrt(n-1<<1) # Chai Wah Wu, Jul 28 2022

Formula

a(n) = n + floor(sqrt(2n-2)).

A227972 Two column recursive array A(n,k), relating expressions based on half-squares (A007590) to each other and several other sequences, read by rows.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 4, 5, 7, 7, 10, 17, 24, 29, 41, 41, 58, 99, 140, 169, 239, 239, 338, 577, 816, 985, 1393, 1393, 1970, 3363, 4756, 5741, 8119, 8119, 11482, 19601, 27720, 33461, 47321, 47321, 66922, 114243, 161564, 195025, 275807, 275807, 390050, 665857, 941664, 1136689, 1607521
Offset: 1

Views

Author

Richard R. Forberg, Aug 01 2013

Keywords

Comments

The first column (k=1) holds the interleaved integer square roots of these two "Half-Square" expressions in ascending order: floor(m^2/2 + 1) for m=>0 and floor(m^2/2 - 1) for m=>1. The second column (k=2) holds the value of m that yields the corresponding integer square root.
The value of m for row n (at n mod 3 = 2) is the value of the square root for the next row (at n mod 3 = 0) which uses the other expression.
There are twice as many results for the expression floor(m^2/2 + 1) as for floor(m^2/2 - 1), interleaved consistently as two of every three results (as shown in the example below).
The first column, for n mod 3 = 1, produces A001541.
The first column, for n mod 3 = 2, produces A001653.
NOTE: Interleaving of the two sequences above is A079496.
The first column, for n mod 3 = 0, produces A002315 (NSW Numbers).
NOTE: Interleaving of A001541 and A002315 is A001333.
The second column, for n mod 3 = 1, produces A005319.
The second column, for n mod 3 = 2, produces A002315 (again).
NOTE: Interleaving of the two sequences above is A143608.
The second column, for n mod 3 = 0, produces A075870.
NOTE: Interleaving of A005319 and A075870 is A052542 = 2*A000129 (Pell)
The row sums at n mod 3 = 1 and n mod 3 = 0 are used in the recursion to produce values in subsequent rows of the array for both columns.
For rows at n mod 3 = 2, the ascending interleaved combination of A(n,1) and the row sum (of the same row) produces A000129 (Pell Numbers).
Row sums also hold all the integer square roots (as given in A001542) of the Half-Squares, (A007590), at n mod 3 = 2, and the corresponding values of m in the next row at n mod 3 = 0, corresponding to A001541.
The value of the floor of half the row sum, for n mod 3 =0 and n mod 3 = 1, produces A048739, giving the partial sums of A000129 (Pell Numbers), for the Pell Numbers produced through the prior row at n mod 3 = 2.
The value of half the row sum, for n mod 3 = 2, produces A001109 (without its initial 0). This subsequence is also produced from finding the integer square roots of A083374. The value of the indices of that sequence where these roots occur is given by A002315 (NSW Numbers).
The differences of two entries in row n equals the row sum for row n-3, consistently for all rows n > 3.
The ratio of the two entries in the same row converges to sqrt(2).
The ratio of two entries in the same column (either k=1 or k=2) converge as follows:
A(k,n)/A(k,n-1)--> sqrt(2) for n mod 3 = 0,
--> sqrt(2) + 1 for n mod 3 = 1,
--> sqrt(2)/2 + 1 for n mod 3 = 2.
A(k,n)/A(k,n-3)--> sqrt(8) + 3 for n mod 3 = 0, 1, or 2,
That last line means: A001541, A001653, A002315, A005319 and A075870 all have the convergence ratio of sqrt(8) + 3 for adjacent terms. In addition alternating Pell Numbers also converge to that ratio.

Examples

			The two column array with row number n and the row sum. An extra column on the right shows which expression is applicable to get that row's values: either floor(m^2/2 + 1) indicated as "+1",  or floor(m^2/2 - 1) indicated as "-1". (NOTE: The value of n is immaterial, except as a row number).
The array begins:
Row         k=1         k=2                   Applicable "Half-Square"
n          (sqrt)       (m)         Row Sum        Expression
1            1           0               1             +1
2            1           1               2             +1
3            1           2               3             -1
4            3           4               7             +1
5            5           7              12             +1
6            7          10              17             -1
7           17          24              41             +1
8           29          41              70             +1
9           41          58              99             -1
10          99         140             239             +1
11         169         239             408             +1
12         239         338             577             -1
13         577         816            1393             +1
14         985        1393            2378             +1
15        1393        1970            3363             -1
16        3363        4756            8119             +1
17        5741        8119           13860             +1
18        8119       11482           19601             -1
19       19601       27720           47321             +1
20       33461       47321           80782             +1
		

Crossrefs

Formula

Initialize row 1 as A(1,1) = 1 and A(1,2) = 0, then:
For rows at n mod 3 = 0: A(n,1) = A(n-1, 2)
A(n,2) = A(n, 1) + A(n-2, 1)
For rows at n mod 3 = 1: A(n,1) = A(n-1, 1) + A(n-1, 2)
A(n,2) = A(n, 1) + A(n-1, 1)
For rows at n mod 3 = 2: A(n,1) = A(n-1,1) + A(n-3, 1)
A(n,2) = A(n-1,1) + A(n-1, 2)
Empirical g.f.: -x*(2*x^11-x^10-x^9+x^8-4*x^7+3*x^6-2*x^5-x^4-x^3-x^2-1) / ((x^6-2*x^3-1)*(x^6+2*x^3-1)). - Colin Barker, Aug 08 2013

Extensions

Some additional comments by Richard R. Forberg, Aug 12 2013

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

A000982 a(n) = ceiling(n^2/2).

Original entry on oeis.org

0, 1, 2, 5, 8, 13, 18, 25, 32, 41, 50, 61, 72, 85, 98, 113, 128, 145, 162, 181, 200, 221, 242, 265, 288, 313, 338, 365, 392, 421, 450, 481, 512, 545, 578, 613, 648, 685, 722, 761, 800, 841, 882, 925, 968, 1013, 1058, 1105, 1152, 1201, 1250, 1301, 1352, 1405
Offset: 0

Views

Author

Keywords

Comments

a(n) = number of pairs (i,j) in [1..n] X [1..n] with integral arithmetic mean. Cf. A132188, A362931. - N. J. A. Sloane, Aug 28 2023
Also, floor( (n^2+1)/2 ). - N. J. A. Sloane, Feb 08 2019
Floor(arithmetic mean of next n numbers). - Amarnath Murthy, Mar 11 2003
Pairwise sums of repeated squares (A008794).
Also, number of topologies on n+1 unlabeled elements with exactly 4 elements in the topology. a(3) gives 4 elements a,b,c,d; the valid topologies are (0,a,ab,abcd), (0,a,abc,abcd), (0,ab,abc,abcd), (0,a,bcd,abcd) and (0,ab,cd,abcd), with a count of 5. - Jon Perry, Mar 05 2004
Partition n into two parts, say, r and s, so that r^2 + s^2 is minimal, then a(n) = r^2 + s^2. Geometrical significance: folding a rod with length n units at right angles in such a way that the end points are at the least distance, which is given by a(n)^(1/2) as the hypotenuse of a right triangle with the sum of the base and height = n units. - Amarnath Murthy, Apr 18 2004
Convolution of A002061(n)-0^n and (-1)^n. Convolution of n (A001477) with {1,0,2,0,2,0,2,...}. Partial sums of repeated odd numbers {0,1,1,3,3,5,5,...}. - Paul Barry, Jul 22 2004
The ratio of the sum of terms over the total number of terms in an n X n spiral. The sum of terms of an n X n spiral is A037270, or Sum_{k=0..n^2} k = (n^4 + n^2)/2 and the total number of terms is n^2. - William A. Tedeschi, Feb 27 2008
Starting with offset 1 = row sums of triangle A158946. - Gary W. Adamson, Mar 31 2009
Partial sums of A109613. - Reinhard Zumkeller, Dec 05 2009
Also the number of compositions of even natural numbers into 2 parts < n. For example a(3)=5 are the compositions (0,0), (0,2), (2,0), (1,1), (2,2) of even natural numbers into 2 parts < 3. a(4)=8 are the compositions (0,0), (0,2), (2,0), (1,1), (2,2), (1,3), (3,1), (3,3) of even natural numbers into 2 parts < 4. - Adi Dani, Jun 05 2011
A001105 and A001844 interleaved. - Omar E. Pol, Sep 18 2011
Number of (w,x,y) having all terms in {0,...,n} and w=average(x,y). - Clark Kimberling, May 15 2012
For n > 0, minimum number of lines necessary to get through all unit cubes of an n X n X n cube (see Kantor link). - Michel Marcus, Apr 13 2013
Sum_{n > 0} 1/a(n) = Sum_{n > 0} 1/(2*n^2) + Sum_{n >= 0} 1/(2*n + 2*n^2 + 1) = (zeta(2) + (Pi* tanh(Pi/2)))/2 = 2.26312655.... - Enrique Pérez Herrero, Jun 17 2013
For n > 1, a(n) is the edge cover number of the n X n king graph. - Eric W. Weisstein, Jun 20 2017
Also the number of vertices in the n X n black bishop graph. - Eric W. Weisstein, Jun 26 2017
The same sequence arises in the triangular array of the integers >= 1, according to a simple "zig-zag" rule for selection of terms. a(n-1) lies in the (n-1)-th row of the array, and the second row of that sub-array (with apex a(n-1)) contains just two numbers, one odd, one even. The one with opposite parity to a(n-1) is a(n). - David James Sycamore, Jul 29 2018
Size of minimal ternary 1-covering code with code length n, i.e., K_n(3,1). See Kalbfleisch and Stanton. - Patrick Wienhöft, Jan 29 2019
For n > 1, a(n-1) is the maximum number of inversions in a permutation consisting of a single n-cycle on n symbols. - M. Ryan Julian Jr., Sep 10 2019
Also the number of classes of convex inscribed polyominoes in a (2,n) rectangular grid; two polyominoes are in the same class if one of them can be obtained by a reflection or 180-degree rotation of the other. - Jean-Luc Manguin, Jan 29 2020
a(n) is the number of pairs (p,q) such that 1 <= p, p+1 < q <= n+2 and q <> 2*p. - César Eliud Lozada, Oct 25 2020
a(n) is the maximum number of copies of a 12 permutation pattern in an alternating (or zig-zag) permutation of length n+1. The maximum number of copies of 123 in an alternating permutation is motivated in the Notices reference, and the argument here is analogous. - Lara Pudwell, Dec 01 2020
It appears that a(n) is the largest number of nodes of an induced path in the n X n king graph. An induced path going in a simple spiraling pattern, starting in a corner, has a(n) nodes. For even n this is optimal, because an induced path can have at most two nodes in any 2 X 2 subsquare. For odd n, I cannot see how to prove that (n^2+1)/2 is best possible. See also A357501. - Pontus von Brömssen, Oct 02 2022 [Proved by Beluhov (2023). - Pontus von Brömssen, Jan 30 2023]
a(n) = n + 2*(n-2) + 2*(n-4) + 2*(n-6) + ... number of black squares on an n X n chessboard. - R. J. Mathar, Dec 03 2022

Examples

			G.f. = x + 2*x^2 + 5*x^3 + 8*x^4 + 13*x^5 + 18*x^6 + 25*x^7 + 32*x^8 + ...
Centrosymmetric 3 X 3 matrix: [[a,b,c],[d,e,d],[c,b,a]], a(3) = 3*(3-1)/2 + (3-1)/2 + 1 = (3^2+1)/2 = 5 from a,b,c,d,e. 4 X 4 case: [[a,b,c,d],[e,f,g,h],[h,g,f,e],[d,c,b,a]], a(4) = 4*4/2 = 8. - _Wolfdieter Lang_, Oct 12 2015
a(3) = 5. The alternating permutation of length 3 + 1 = 4 with the maximum number of copies of 123 is 1324. The five copies are 12, 13, 14, 23, and 24. - _Lara Pudwell_, Dec 01 2020
		

References

  • 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

Programs

Formula

a(2*n) = 2*n^2, a(2*n+1) = 2*n^2 + 2*n + 1.
G.f.: -x*(1+x^2) / ( (1+x)*(x-1)^3 ). - Simon Plouffe in his 1992 dissertation
From Benoit Cloitre, Nov 06 2002: (Start)
a(n) = (2*n^2 + 1 - (-1)^n) / 4.
a(0)=0, a(1)=1; for n>1, a(n+1) = n + 1 + max(2*floor(a(n)/2), 3*floor(a(n)/3)). (End)
G.f.: (x + x^2 + x^3 + x^4)/((1 - x)*(1 - x^2)^2), not reduced. - Len Smiley
a(n) = a(n-2) + 2n - 2. - Paul Barry, Jul 17 2004
From Paul Barry, Jul 22 2004: (Start)
G.f.: x*(1+x^2)/((1-x^2)*(1-x)^2) = x*(1+x^2)/((1+x)*(1-x)^3);
a(n) = Sum_{k=0..n} (k^2 - k + 1 - 0^k)*(-1)^(n-k);
a(n) = Sum_{k=0..n} (1 + (-1)^(n-k) - 0^(n-k))*k. (End)
From Reinhard Zumkeller, Feb 27 2006: (Start)
a(0) = 0, a(n+1) = a(n) + 2*floor(n/2) + 1.
a(n) = A116940(n) - A005843(n). (End)
Starting with offset 1, = row sums of triangle A134444. Also, with offset 1, = binomial transform of [1, 1, 2, -2, 4, -8, 16, -32, ...]. - Gary W. Adamson, Oct 25 2007
a(n) = floor((n^2+1)/2). - William A. Tedeschi, Feb 27 2008
a(n) = A004526(n+1) + A000217(n-1). - Yosu Yurramendi, Sep 12 2008, corrected by Klaus Purath, Jun 15 2021
From Jaume Oliver Lafont, Dec 05 2008: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) + 2.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). (End)
a(n) = A004526(n)^2 + A110654(n)^2. - Philippe Deléham, Mar 12 2009
a(n) = n^2 - floor(n^2/2). - Wesley Ivan Hurt, Jun 14 2013
Euler transform is length 4 sequence [2, 2, 0, -1].
a(n) = a(-n) for all n in Z. - Michael Somos, May 05 2015
a(n) is also the number of independent entries in a centrosymmetric n X n matrix: M(i, j) = M(n-i+1, n-j+1). - Wolfdieter Lang, Oct 12 2015
For n > 1, a(n+1)/a(n) = 3 - A081352(n-2)/a(n). - Miko Labalan, Mar 26 2016
E.g.f.: (1/2)*(x*(1 + x)*cosh(x) + (1 + x + x^2)*sinh(x)). - Stefano Spezia, Feb 03 2020
a(n) = binomial(n+1,2) - floor(n/2). - César Eliud Lozada, Oct 25 2020
From Klaus Purath, Jun 15 2021: (Start)
a(n-1) + a(n) = A002061(n).
a(n) = (a(n-1)^2 + 1) / a(n-2), n >= 3 odd.
a(n) = (a(n-1)^2 - (n-1)^2) / a(n-2), n >= 4 even. (End)

A052928 The even numbers repeated.

Original entry on oeis.org

0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, 32, 34, 34, 36, 36, 38, 38, 40, 40, 42, 42, 44, 44, 46, 46, 48, 48, 50, 50, 52, 52, 54, 54, 56, 56, 58, 58, 60, 60, 62, 62, 64, 64, 66, 66, 68, 68, 70, 70, 72, 72
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

a(n) is also the binary rank of the complete graph K(n). - Alessandro Cosentino (cosenal(AT)gmail.com), Feb 07 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 >= 6, a(n) 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=2. - Vladimir Shevelev, Apr 12 2010
a(n+2) is the number of symmetry allowed, linearly independent terms at n-th order in the series expansion of the (E+A)xe vibronic perturbation matrix, H(Q) (cf. Eisfeld & Viel). - Bradley Klee, Jul 21 2015
The arithmetic function v_2(n,1) as defined in A289187. - Robert Price, Aug 22 2017
For n > 1, also the chromatic number of the n X n white bishop graph. - Eric W. Weisstein, Nov 17 2017
For n > 2, also the maximum vertex degree of the n-polygon diagonal intersection graph. - Eric W. Weisstein, Mar 23 2018
For n >= 2, a(n+2) gives the minimum weight of a Boolean function of algebraic degree at most n-2 whose support contains n linearly independent elements. - Christof Beierle, Nov 25 2019

References

  • C. D. Godsil and G. Royle, Algebraic Graph Theory, Springer, 2001, page 181. - Alessandro Cosentino (cosenal(AT)gmail.com), Feb 07 2009
  • V. S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, 3(1992),15-19.

Crossrefs

First differences: A010673; partial sums: A007590; partial sums of partial sums: A212964(n+1).
Complement of A109613 with respect to universe A004526. - Guenther Schrack, Dec 07 2017
Is first differences of A099392. Fixed point sequence: A005843. - Guenther Schrack, May 30 2019
For n >= 3, A329822(n) gives the minimum weight of a Boolean function of algebraic degree at most n-3 whose support contains n linearly independent elements. - Christof Beierle, Nov 25 2019

Programs

  • Haskell
    a052928 = (* 2) . flip div 2
    a052928_list = 0 : 0 : map (+ 2) a052928_list
    -- Reinhard Zumkeller, Jun 20 2015
  • Magma
    [2*Floor(n/2) : n in [0..50]]; // Wesley Ivan Hurt, Sep 13 2014
    
  • Maple
    spec := [S,{S=Union(Sequence(Prod(Z,Z)),Prod(Sequence(Z),Sequence(Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    Flatten[Table[{2n, 2n}, {n, 0, 39}]] (* Alonso del Arte, Jun 24 2012 *)
    With[{ev=2Range[0,40]},Riffle[ev,ev]] (* Harvey P. Dale, May 08 2021 *)
    Table[Round[n + 1/2], {n, -1, 72}] (* Ed Pegg Jr, Jul 28 2025 *)
  • PARI
    a(n)=n\2*2 \\ Charles R Greathouse IV, Nov 20 2011
    

Formula

a(n) = 2*floor(n/2).
G.f.: 2*x^2/((-1+x)^2*(1+x)).
a(n) + a(n+1) + 2 - 2*n = 0.
a(n) = n - 1/2 + (-1)^n/2.
a(n) = n + Sum_{k=1..n} (-1)^k. - William A. Tedeschi, Mar 20 2008
a(n) = a(n-1) + a(n-2) - a(n-3). - R. J. Mathar, Feb 19 2010
a(n) = |A123684(n) - A064455(n)| = A032766(n) - A008619(n-1). - Jaroslav Krizek, Mar 22 2011
For n > 0, a(n) = floor(sqrt(n^2+(-1)^n)). - Francesco Daddi, Aug 02 2011
a(n) = Sum_{k>=0} A030308(n,k)*b(k) with b(0)=0 and b(k)=2^k for k>0. - Philippe Deléham, Oct 19 2011
a(n) = A109613(n) - 1. - M. F. Hasler, Oct 22 2012
a(n) = n - (n mod 2). - Wesley Ivan Hurt, Jun 29 2013
a(n) = a(a(n-1)) + a(n-a(n-1)) for n>2. - Nathan Fox, Jul 24 2016
a(n) = 2*A004526(n). - Filip Zaludek, Oct 28 2016
E.g.f.: x*exp(x) - sinh(x). - Ilya Gutkovskiy, Oct 28 2016
a(-n) = -a(n+1); a(n) = A005843(A004526(n)). - Guenther Schrack, Sep 11 2018
From Guenther Schrack, May 29 2019: (Start)
a(b(n)) = b(n) + ((-1)^b(n) - 1)/2 for any sequence b(n) of offset 0.
a(a(n)) = a(n), idempotent.
a(A086970(n)) = A124356(n-1) for n > 1.
a(A000124(n)) = A192447(n+1).
a(n)*a(n+1)/2 = A007590(n), also equals partial sums of a(n).
A007590(a(n)) = 2*A008794(n). (End)

Extensions

More terms from James Sellers, Jun 05 2000
Removed duplicate of recurrence; corrected original recurrence and g.f. against offset - R. J. Mathar, Feb 19 2010

A000212 a(n) = floor(n^2/3).

Original entry on oeis.org

0, 0, 1, 3, 5, 8, 12, 16, 21, 27, 33, 40, 48, 56, 65, 75, 85, 96, 108, 120, 133, 147, 161, 176, 192, 208, 225, 243, 261, 280, 300, 320, 341, 363, 385, 408, 432, 456, 481, 507, 533, 560, 588, 616, 645, 675, 705, 736, 768, 800, 833, 867, 901, 936
Offset: 0

Views

Author

Keywords

Comments

Let M_n be the n X n matrix of the following form: [3 2 1 0 0 0 0 0 0 0 / 2 3 2 1 0 0 0 0 0 0 / 1 2 3 2 1 0 0 0 0 0 / 0 1 2 3 2 1 0 0 0 0 / 0 0 1 2 3 2 1 0 0 0 / 0 0 0 1 2 3 2 1 0 0 / 0 0 0 0 1 2 3 2 1 0 / 0 0 0 0 0 1 2 3 2 1 / 0 0 0 0 0 0 1 2 3 2 / 0 0 0 0 0 0 0 1 2 3]. Then for n > 2 a(n) = det M_(n-2). - Benoit Cloitre, Jun 20 2002
Largest possible size for the directed Cayley graph on two generators having diameter n - 2. - Ralf Stephan, Apr 27 2003
It seems that for n >= 2, a(n) is the maximum number of non-overlapping 1 X 3 rectangles that can be packed into an n X n square. Rectangles can only be placed parallel to the sides of the square. Verified with Lobato's tool, see links. - Dmitry Kamenetsky, Aug 03 2009
Maximum number of edges in a K4-free graph with n vertices. - Yi Yang, May 23 2012
3a(n) + 1 = y^2 if n is not 0 mod 3 and 3a(n) = y^2 otherwise. - Jon Perry, Sep 10 2012
Apart from the initial term this is the elliptic troublemaker sequence R_n(1, 3) (also sequence R_n(2, 3)) 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
The number of partitions of 2n into exactly 3 parts. - Colin Barker, Mar 22 2015
a(n-1) is the maximum number of non-overlapping triples (i,k), (i+1, k+1), (i+2, k+2) in an n X n matrix. Details: The triples are distributed along the main diagonal and 2*(n-1) other diagonals. Their maximum number is floor(n/3) + 2*Sum_{k = 1..n-1} floor(k/3) = floor((n-1)^2/3). - Gerhard Kirchner, Feb 04 2017
Conjecture: a(n) is the number of intersection points of n cevians that cut a triangle into the maximum number of pieces (see A007980). - Anton Zakharov, May 07 2017
From Gus Wiseman, Oct 05 2020: (Start)
Also the number of unimodal triples (meaning the middle part is not strictly less than both of the other two) of positive integers summing to n + 1. The a(2) = 1 through a(6) = 12 triples are:
(1,1,1) (1,1,2) (1,1,3) (1,1,4) (1,1,5)
(1,2,1) (1,2,2) (1,2,3) (1,2,4)
(2,1,1) (1,3,1) (1,3,2) (1,3,3)
(2,2,1) (1,4,1) (1,4,2)
(3,1,1) (2,2,2) (1,5,1)
(2,3,1) (2,2,3)
(3,2,1) (2,3,2)
(4,1,1) (2,4,1)
(3,2,2)
(3,3,1)
(4,2,1)
(5,1,1)
(End)

Examples

			G.f. = x^2 + 3*x^3 + 5*x^4 + 8*x^5 + 12*x^6 + 16*x^7 + 21*x^8 + 27*x^9 + 33*x^10 + ...
From _Gus Wiseman_, Oct 07 2020: (Start)
The a(2) = 1 through a(6) = 12 partitions of 2*n into exactly 3 parts (Barker) are the following. The Heinz numbers of these partitions are given by the intersection of A014612 (triples) and A300061 (even sum).
  (2,1,1)  (2,2,2)  (3,3,2)  (4,3,3)  (4,4,4)
           (3,2,1)  (4,2,2)  (4,4,2)  (5,4,3)
           (4,1,1)  (4,3,1)  (5,3,2)  (5,5,2)
                    (5,2,1)  (5,4,1)  (6,3,3)
                    (6,1,1)  (6,2,2)  (6,4,2)
                             (6,3,1)  (6,5,1)
                             (7,2,1)  (7,3,2)
                             (8,1,1)  (7,4,1)
                                      (8,2,2)
                                      (8,3,1)
                                      (9,2,1)
                                      (10,1,1)
(End)
		

References

  • 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

Cf. A000290, A007590 (= R_n(2,4)), A002620 (= R_n(1,2)), A118015, A056827, A118013.
Cf. 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)), A033440, A033441, A033442, A033443, A033444.
Cf. A001353 and A004523 (first differences). A184535 (= R_n(2,5) = R_n(3,5)).
Cf. A238738. - Bruno Berselli, Apr 17 2015
Cf. A005408.
A000217(n-2) counts 3-part compositions.
A014612 ranks 3-part partitions, with strict case A007304.
A069905 counts the 3-part partitions.
A211540 counts strict 3-part partitions.
A337453 ranks strict 3-part compositions.
A001399(n-6)*4 is the strict version.
A001523 counts unimodal compositions, with strict case A072706.
A001840(n-4) is the non-unimodal version.
A001399(n-6)*2 is the strict non-unimodal version.
A007052 counts unimodal patterns.
A115981 counts non-unimodal compositions, ranked by A335373.
A011782 counts unimodal permutations.
A335373 is the complement of a ranking sequence for unimodal compositions.
A337459 ranks these compositions, with complement A337460.

Programs

  • Magma
    [Floor(n^2 / 3): n in [0..50]]; // Vincenzo Librandi, May 08 2011
    
  • Maple
    A000212:=(-1+z-2*z**2+z**3-2*z**4+z**5)/(z**2+z+1)/(z-1)**3; # Conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence with an additional leading 1.
    A000212 := proc(n) option remember; `if`(n<4, [0,0,1,3][n+1], a(n-1)+a(n-3) -a(n-4)+2) end; # Peter Luschny, Nov 20 2011
  • Mathematica
    Table[Quotient[n^2, 3], {n, 0, 59}] (* Michael Somos, Jan 22 2014 *)
  • PARI
    {a(n) = n^2 \ 3}; /* Michael Somos, Sep 25 2006 */
    
  • Python
    def A000212(n): return n**2//3 # Chai Wah Wu, Jun 07 2022

Formula

G.f.: x^2*(1+x)/((1-x)^2*(1-x^3)). - Franklin T. Adams-Watters, Apr 01 2002
Euler transform of length 3 sequence [ 3, -1, 1]. - Michael Somos, Sep 25 2006
G.f.: x^2 * (1 - x^2) / ((1 - x)^3 * (1 - x^3)). a(-n) = a(n). - Michael Somos, Sep 25 2006
a(n) = Sum_{k = 0..n} A011655(k)*(n-k). - Reinhard Zumkeller, Nov 30 2009
a(n) = a(n-1) + a(n-3) - a(n-4) + 2 for n >= 4. - Alexander Burstein, Nov 20 2011
a(n) = a(n-3) + A005408(n-2) for n >= 3. - Alexander Burstein, Feb 15 2013
a(n) = (n-1)^2 - a(n-1) - a(n-2) for n >= 2. - Richard R. Forberg, Jun 05 2013
Sum_{n >= 2} 1/a(n) = (27 + 6*sqrt(3)*Pi + 2*Pi^2)/36. - Enrique Pérez Herrero, Jun 29 2013
0 = a(n)*(a(n+2) + a(n+3)) + a(n+1)*(-2*a(n+2) - a(n+3) + a(n+4)) + a(n+2)*(a(n+2) - 2*a(n+3) + a(n+4)) for all n in Z. - Michael Somos, Jan 22 2014
a(n) = Sum_{k = 1..n} k^2*A049347(n+2-k). - Mircea Merca, Feb 04 2014
a(n) = Sum_{i = 1..n+1} (ceiling(i/3) + floor(i/3) - 1). - Wesley Ivan Hurt, Jun 06 2014
a(n) = Sum_{j = 1..n} Sum_{i=1..n} ceiling((i+j-n-1)/3). - Wesley Ivan Hurt, Mar 12 2015
a(n) = Sum_{i = 1..n} floor(2*i/3). - Wesley Ivan Hurt, May 22 2017
a(-n) = a(n). - Paul Curtz, Jan 19 2020
a(n) = A001399(2*n - 3). - Gus Wiseman, Oct 07 2020
a(n) = (1/6)*(2*n^2 - 3 + gcd(n,3)). - Ridouane Oudra, Apr 15 2021
E.g.f.: (exp(x)*(-2 + 3*x*(1 + x)) + 2*exp(-x/2)*cos(sqrt(3)*x/2))/9. - Stefano Spezia, Oct 24 2022
Sum_{n>=2} (-1)^n/a(n) = Pi/sqrt(3) - Pi^2/36 - 3/4. - Amiram Eldar, Dec 02 2022

Extensions

Edited by Charles R Greathouse IV, Apr 19 2010

A001542 a(n) = 6*a(n-1) - a(n-2) for n > 1, a(0)=0 and a(1)=2.

Original entry on oeis.org

0, 2, 12, 70, 408, 2378, 13860, 80782, 470832, 2744210, 15994428, 93222358, 543339720, 3166815962, 18457556052, 107578520350, 627013566048, 3654502875938, 21300003689580, 124145519261542, 723573111879672
Offset: 0

Views

Author

Keywords

Comments

Consider the equation core(x) = core(2x+1) where core(x) is the smallest number such that x*core(x) is a square: solutions are given by a(n)^2, n > 0. - Benoit Cloitre, Apr 06 2002
Terms > 0 give numbers k which are solutions to the inequality |round(sqrt(2)*k)/k - sqrt(2)| < 1/(2*sqrt(2)*k^2). - Benoit Cloitre, Feb 06 2006
Also numbers m such that A125650(6*m^2) is an even perfect square, where A124650(m) is a numerator of m*(m+3)/(4*(m+1)*(m+2)) = Sum_{k=1..m} 1/(k*(k+1)*(k+2)). Sequence A033581 is a bisection of A125651. - Alexander Adamchuk, Nov 30 2006
The upper principal convergents to 2^(1/2), beginning with 3/2, 17/12, 99/70, 577/408, comprise a strictly decreasing sequence; essentially, numerators = A001541 and denominators = {a(n)}. - Clark Kimberling, Aug 26 2008
Even Pell numbers. - Omar E. Pol, Dec 10 2008
Numbers k such that 2*k^2+1 is a square. - Vladimir Joseph Stephan Orlovsky, Feb 19 2010
These are the integer square roots of the Half-Squares, A007590(k), which occur at values of k given by A001541. Also the numbers produced by adding m + sqrt(floor(m^2/2) + 1) when m is in A002315. See array in A227972. - Richard R. Forberg, Aug 31 2013
A001541(n)/a(n) is the closest rational approximation of sqrt(2) with a denominator not larger than a(n), and 2*a(n)/A001541(n) is the closest rational approximation of sqrt(2) with a numerator not larger than 2*a(n). These rational approximations together with those obtained from the sequences A001653 and A002315 give a complete set of closest rational approximations of sqrt(2) with restricted numerator as well as denominator. - A.H.M. Smeets, May 28 2017
Conjecture: Numbers k such that c/m < k for all natural a^2 + b^2 = c^2 (Pythagorean triples), a < b < c and a+b+c = m. Numbers which correspondingly minimize c/m are A002939. - Lorraine Lee, Jan 31 2020
All of the positive integer solutions of a*b + 1 = x^2, a*c + 1 = y^2, b*c + 1 = z^2, x + z = 2*y, 0 < a < b < c are given by a=a(n), b=A005319(n), c=a(n+1), x=A001541(n), y=A001653(n+1), z=A002315(n) with 0 < n. - Michael Somos, Jun 26 2022

Examples

			G.f. = 2*x + 12*x^2 + 70*x^3 + 408*x^4 + 2378*x^5 + 13860*x^6 + ...
		

References

  • Jay Kappraff, Beyond Measure, A Guided Tour Through Nature, Myth and Number, World Scientific, 2002; pp. 480-481.
  • Thomas Koshy, Fibonacci and Lucas Numbers with Applications, 2001, Wiley, pp. 77-79.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 257-258.
  • P.-F. Teilhet, Query 2376, L'Intermédiaire des Mathématiciens, 11 (1904), 138-139. - N. J. A. Sloane, Mar 08 2022

Crossrefs

Bisection of Pell numbers A000129: {a(n)} and A001653(n+1), n >= 0.

Programs

  • GAP
    a:=[0,2];; for n in [3..20] do a[n]:=6*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Dec 23 2019
  • Haskell
    a001542 n = a001542_list !! n
    a001542_list =
       0 : 2 : zipWith (-) (map (6 *) $ tail a001542_list) a001542_list
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Magma
    I:=[0,2]; [n le 2 select I[n] else 6*Self(n-1) -Self(n-2): n in [1..20]]; // G. C. Greubel, Dec 23 2019
    
  • Maple
    A001542:=2*z/(1-6*z+z**2); # conjectured by Simon Plouffe in his 1992 dissertation
    seq(combinat:-fibonacci(2*n, 2), n = 0..20); # Peter Luschny, Jun 28 2018
  • Mathematica
    LinearRecurrence[{6, -1}, {0, 2}, 30] (* Harvey P. Dale, Jun 11 2011 *)
    Fibonacci[2*Range[0,20], 2] (* G. C. Greubel, Dec 23 2019 *)
    Table[2 ChebyshevU[-1 + n, 3], {n, 0, 20}] (* Herbert Kociemba, Jun 05 2022 *)
  • Maxima
    a[0]:0$
    a[1]:2$
    a[n]:=6*a[n-1]-a[n-2]$
    A001542(n):=a[n]$
    makelist(A001542(x),x,0,30); /* Martin Ettl, Nov 03 2012 */
    
  • PARI
    {a(n) = imag( (3 + 2*quadgen(8))^n )}; /* Michael Somos, Jan 20 2017 */
    
  • PARI
    vector(21, n, 2*polchebyshev(n-1, 2, 33) ) \\ G. C. Greubel, Dec 23 2019
    
  • Python
    l=[0, 2]
    for n in range(2, 51): l+=[6*l[n - 1] - l[n - 2], ]
    print(l) # Indranil Ghosh, Jun 06 2017
    
  • Sage
    [2*chebyshev_U(n-1,3) for n in (0..20)] # G. C. Greubel, Dec 23 2019
    

Formula

a(n) = 2*A001109(n).
a(n) = ((3+2*sqrt(2))^n - (3-2*sqrt(2))^n) / (2*sqrt(2)).
G.f.: 2*x/(1-6*x+x^2).
a(n) = sqrt(2*(A001541(n))^2 - 2)/2. - Barry E. Williams, May 07 2000
a(n) = (C^(2n) - C^(-2n))/sqrt(8) where C = sqrt(2) + 1. - Gary W. Adamson, May 11 2003
For all terms x of the sequence, 2*x^2 + 1 is a square. Limit_{n->oo} a(n)/a(n-1) = 3 + 2*sqrt(2). - Gregory V. Richardson, Oct 10 2002
For n > 0: a(n) = A001652(n) + A046090(n) - A001653(n); e.g., 70 = 119 + 120 - 169. Also a(n) = A001652(n - 1) + A046090(n - 1) + A001653(n - 1); e.g., 70 = 20 + 21 + 29. Also a(n)^2 + 1 = A001653(n - 1)*A001653(n); e.g., 12^2 + 1 = 145 = 5*29. Also a(n + 1)^2 = A084703(n + 1) = A001652(n)*A001652(n + 1) + A046090(n)*A046090(n + 1). - Charlie Marion, Jul 01 2003
a(n) = ((1+sqrt(2))^(2*n) - (1-sqrt(2))^(2*n))/(2*sqrt(2)). - Antonio Alberto Olivares, Dec 24 2003
2*A001541(k)*A001653(n)*A001653(n+k) = A001653(n)^2 + A001653(n+k)^2 + a(k)^2; e.g., 2*3*5*29 = 5^2 + 29^2 + 2^2; 2*99*29*5741 = 29^2 + 5741^2 + 70^2. - Charlie Marion, Oct 12 2007
a(n) = sinh(2*n*arcsinh(1))/sqrt(2). - Herbert Kociemba, Apr 24 2008
For n > 0, a(n) = A001653(n) + A002315(n-1). - Richard R. Forberg, Aug 31 2013
a(n) = 3*a(n-1) + 2*A001541(n-1); e.g., a(4) = 70 = 3*12 + 2*17. - Zak Seidov, Dec 19 2013
a(n)^2 + 1^2 = A115598(n)^2 + (A115598(n)+1)^2. - Hermann Stamm-Wilbrandt, Jul 27 2014
E.g.f.: exp(3*x)*sinh(2*sqrt(2)*x)/sqrt(2). - Ilya Gutkovskiy, Dec 07 2016
A007814(a(n)) = A001511(n). See Mathematical Reflections link. - Michel Marcus, Jan 06 2017
a(n) = -a(-n) for all n in Z. - Michael Somos, Jan 20 2017
From A.H.M. Smeets, May 28 2017: (Start)
A051009(n) = a(2^(n-2)).
a(2n) = 2*a(2)*A001541(n).
A001541(n)/a(n) > sqrt(2) > 2*a(n)/A001541(n). (End)
a(A298210(n)) = A002349(2*n^2). - A.H.M. Smeets, Jan 25 2018
a(n) = A000129(n)*A002203(n). - Adam Mohamed, Jul 20 2024

A074148 a(n) = n + floor(n^2/2).

Original entry on oeis.org

1, 4, 7, 12, 17, 24, 31, 40, 49, 60, 71, 84, 97, 112, 127, 144, 161, 180, 199, 220, 241, 264, 287, 312, 337, 364, 391, 420, 449, 480, 511, 544, 577, 612, 647, 684, 721, 760, 799, 840, 881, 924, 967, 1012, 1057, 1104, 1151, 1200, 1249, 1300, 1351, 1404, 1457
Offset: 1

Views

Author

Amarnath Murthy, Aug 28 2002

Keywords

Comments

Last term in each group in A074147.
Index of the last occurrence of n in A100795.
Equals row sums of an infinite lower triangular matrix with alternate columns of (1, 3, 5, 7, ...) and (1, 1, 1, ...). - Gary W. Adamson, May 16 2010
a(n) = A214075(n+2,2). - Reinhard Zumkeller, Jul 03 2012
The heart pattern appears in (n+1) X (n+1) coins. Abnormal orientation heart is A065423. Normal heart is A093005 (A074148 - A065423). Void is A007590. See illustration in links. - Kival Ngaokrajang, Sep 11 2013
a(n+1) is the smallest size of an n-prolific permutation; a permutation of s letters is n-prolific if each (s - n)-subset of the letters in its one-line notation forms a unique pattern. - David Bevan, Nov 30 2016
For n > 2, a(n-1) is the smallest size of a nontrivial permuted packing of diamond tiles with diagonal length n; a permuted packing is a translational packing for which the set of translations is the plot of a permutation. - David Bevan, Nov 30 2016
Also the length of a longest path in the (n+1) X (n+1) bishop and black bishop graphs. - Eric W. Weisstein, Mar 27 2018
Row sums of A143182 triangle - Nikita Sadkov, Oct 10 2018

Examples

			Equals row sums of the generating triangle:
   1;
   3,  1;
   5,  1,  1;
   7,  1,  3,  1;
   9,  1,  5,  1,  1;
  11,  1,  7,  1,  3,  1;
  13,  1,  9,  1,  5,  1,  1;
  15,  1, 11,  1,  7,  1,  3,  1;
  ...
Example: a(5) = 17 = (9 + 1 + 5 + 1 + 1). - _Gary W. Adamson_, May 16 2010
The smallest 1-prolific permutations are 3142 and its symmetries; a(2) = 4. The smallest 2-prolific permutations are 3614725 and its symmetries; a(3) = 7. - _David Bevan_, Nov 30 2016
		

Crossrefs

a(n) = A000982(n+1) - 1.
Antidiagonal sums of A237447 & A237448.

Programs

Formula

a(n) = (2*n^2 + 4*n + (-1)^n - 1)/4. - Vladeta Jovovic, Apr 06 2003
a(n) = A109225(n,2) for n > 1. - Reinhard Zumkeller, Jun 23 2005
a(n) = +2*a(n-1) - 2*a(n-3) + 1*a(n-4). - Joerg Arndt, Apr 02 2011
a(n) = a(n-2) + 2*n, a(0) = 0, a(1) = 1. - Paul Barry, Jul 17 2004
From R. J. Mathar, Aug 30 2008: (Start)
G.f.: x*(1 + 2*x - x^2)/((1 - x)^3*(1 + x)).
a(n) + a(n+1) = A028387(n).
a(n+1) - a(n) = A109613(n+1). (End)
a(n) = floor(n^4/(2n^2 + 1)) with offset 2..a(2) = 1. - Gary Detlefs, Feb 11 2010
a(n) = n + floor(n^2/2). - Wesley Ivan Hurt, Jun 14 2013
From Franck Maminirina Ramaharo, Jan 04 2019: (Start)
a(n) = n*(n + 1)/2 + floor(n/2) = A000217(n) + A004526(n).
E.g.f.: (exp(-x) - (1 - 6*x - 2*x^2)*exp(x))/4. (End)
Sum_{n>=1} 1/a(n) = 1 - cot(Pi/sqrt(2))*Pi/(2*sqrt(2)). - Amiram Eldar, Sep 16 2022

Extensions

More terms from Vladeta Jovovic, Apr 06 2003
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 31 2007
Further edited by N. J. A. Sloane, Sep 06 2008 at the suggestion of R. J. Mathar
Description simplified by Eric W. Weisstein, Mar 27 2018

A137932 Terms in an n X n spiral that do not lie on its principal diagonals.

Original entry on oeis.org

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
Offset: 0

Views

Author

William A. Tedeschi, Feb 29 2008

Keywords

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

Examples

			a(0) = 0^2 - (2(0) - mod(0,2)) = 0.
a(3) = 3^2 - (2(3) - mod(3,2)) = 4.
		

Crossrefs

Cf. A042948.
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.
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.

Programs

Formula

a(n) = n^2 - (2*n - mod(n,2)) = n^2 - A042948(n).
a(n) = 2*A007590(n-1). - Enrique Pérez Herrero, Jul 04 2012
G.f.: -4*x^3 / ( (1+x)*(x-1)^3 ). a(n) = 4*A002620(n-1). - R. J. Mathar, Jul 06 2012
From Bob Selcoe, Feb 12 2015: (Start)
a(n) = (n-1)^2 when n is odd; a(n) = (n-1)^2 - 1 when n is even.
a(n) = A002378(n) - A047238(n+1). (End)
From Amiram Eldar, Mar 20 2022: (Start)
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

A130519 a(n) = Sum_{k=0..n} floor(k/4). (Partial sums of A002265.)

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 4, 6, 8, 10, 12, 15, 18, 21, 24, 28, 32, 36, 40, 45, 50, 55, 60, 66, 72, 78, 84, 91, 98, 105, 112, 120, 128, 136, 144, 153, 162, 171, 180, 190, 200, 210, 220, 231, 242, 253, 264, 276, 288, 300, 312, 325, 338, 351, 364, 378, 392, 406, 420, 435, 450
Offset: 0

Views

Author

Hieronymus Fischer, Jun 01 2007

Keywords

Comments

Complementary to A130482 with respect to triangular numbers, in that A130482(n) + 4*a(n) = n(n+1)/2 = A000217(n).
Disregarding the first three 0's the resulting sequence a'(n) is the sum of the positive integers <= n that have the same residue modulo 4 as n. This is the additive counterpart of the quadruple factorial numbers. - Peter Luschny, Jul 06 2011
From Heinrich Ludwig, Dec 23 2017: (Start)
Column sums of (shift of rows = 4):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
1 2 3 4 5 6 7 8 9 10 ...
1 2 3 4 5 6 ...
1 2 ...
.......................................
---------------------------------------
1 2 3 4 6 8 10 12 15 18 21 24 28 32 ...
shift of rows = 1 see A000217
shift of rows = 2 see A002620
shift of rows = 3 see A001840
shift of rows = 5 see A130520
(End)
Conjecture: a(n+2) is the maximum effective weight of a numerical semigroup S of genus n (see Nathan Pflueger). - Stefano Spezia, Jan 04 2019

Examples

			G.f. = x^4 + 2*x^5 + 3*x^6 + 4*x^7 + 6*x^8 + 8*x^9 + 10*x^10 + 12*x^11 + ...
[ n] a(n)
---------
[ 4] 1
[ 5] 2
[ 6] 3
[ 7] 4
[ 8] 1 + 5
[ 9] 2 + 6
[10] 3 + 7
[11] 4 + 8
		

Crossrefs

Programs

  • GAP
    a:=List([0..65],n->Sum([0..n],k->Int(k/4)));; Print(a); # Muniru A Asiru, Jan 04 2019
    
  • Magma
    [Round(n*(n-2)/8): n in [0..70]]; // Vincenzo Librandi, Jun 25 2011
    
  • Maple
    quadsum := n -> add(k, k = select(k -> k mod 4 = n mod 4, [$1 .. n])):
    A130519 := n ->`if`(n<3,0,quadsum(n-3)); seq(A130519(n),n=0..58); # Peter Luschny, Jul 06 2011
  • Mathematica
    a[ n_] := Quotient[ (n - 1)^2, 8]; (* Michael Somos, Oct 14 2011 *)
  • Maxima
    makelist(floor((n-1)^2/8), n, 0, 70); /* Stefano Spezia, Jan 04 2019 */
    
  • PARI
    {a(n) = (n - 1)^2 \ 8}; /* Michael Somos, Oct 14 2011 */
    
  • Python
    def A130519(n): return (n-1)**2>>3  # Chai Wah Wu, Jul 30 2022

Formula

G.f.: x^4/((1-x^4)*(1-x)^2) = x^4/((1+x)*(1+x^2)*(1-x)^3).
a(n) = +2*a(n-1) -1*a(n-2) +1*a(n-4) -2*a(n-5) +1*a(n-6).
a(n) = floor(n/4)*(n - 1 - 2*floor(n/4)) = A002265(n)*(n - 1 - 2*A002265(n)).
a(n) = (1/2)*A002265(n)*(n - 2 + A010873(n)).
a(n) = floor((n-1)^2/8). - Mitch Harris, Sep 08 2008
a(n) = round(n*(n-2)/8) = round((n^2-2*n-1)/8) = ceiling((n+1)*(n-3)/8). - Mircea Merca, Nov 28 2010
a(n) = A001972(n-4), n>3. - Franklin T. Adams-Watters, Jul 10 2009
a(n) = a(n-4)+n-3, n>3. - Mircea Merca, Nov 28 2010
Euler transform of length 4 sequence [ 2, 0, 0, 1]. - Michael Somos, Oct 14 2011
a(n) = a(2-n) for all n in Z. - Michael Somos, Oct 14 2011
a(n) = A214734(n, 1, 4). - Renzo Benedetti, Aug 27 2012
a(4n) = A000384(n), a(4n+1) = A001105(n), a(4n+2) = A014105(n), a(4n+3) = A046092(n). - Philippe Deléham, Mar 26 2013
a(n) = Sum_{i=1..ceiling(n/2)-1} (i mod 2) * (n - 2*i - 1). - Wesley Ivan Hurt, Jan 23 2014
a(n) = ( 2*n^2-4*n-1+(-1)^n+2*((-1)^((2*n-1+(-1)^n)/4)-(-1)^((6*n-1+(-1)^n)/4)) )/16 = ( 2*n*(n-2) - (1-(-1)^n)*(1-2*i^(n*(n-1))) )/16, where i=sqrt(-1). - Luce ETIENNE, Aug 29 2014
E.g.f.: (1/8)*((- 1 + x)*x*cosh(x) + 2*sin(x) + (- 1 - x + x^2)*sinh(x)). - Stefano Spezia, Jan 15 2019
a(n) = (A002620(n-1) - A011765(n+1)) / 2, for n > 0. - Yuchun Ji, Feb 05 2021
Sum_{n>=4} 1/a(n) = Pi^2/12 + 5/2. - Amiram Eldar, Aug 13 2022

Extensions

Partially edited by R. J. Mathar, Jul 11 2009
Showing 1-10 of 90 results. Next