|
|
A000982
|
|
a(n) = ceiling(n^2/2).
(Formerly M1348 N0517)
|
|
110
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
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
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
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
|
|
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).
|
|
LINKS
|
Eric Weisstein's World of Mathematics, Topology
|
|
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
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
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)
a(0) = 0, a(n+1) = a(n) + 2*floor(n/2) + 1.
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) = a(n-1) + a(n-2) - a(n-3) + 2.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). (End)
Euler transform is length 4 sequence [2, 2, 0, -1].
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
E.g.f.: (1/2)*(x*(1 + x)*cosh(x) + (1 + x + x^2)*sinh(x)). - Stefano Spezia, Feb 03 2020
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)
|
|
EXAMPLE
|
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
|
|
MAPLE
|
|
|
MATHEMATICA
|
Accumulate[Join[{0}, (# - Boole[EvenQ[#]] &) /@ Range[80]]] (* Alonso del Arte, Sep 11 2019 *)
|
|
PROG
|
(Haskell)
(PARI) x='x+O('x^100); concat([0], Vec(x*(1+x^2)/((1+x)*(1-x)^3))) \\ Altug Alkan, Oct 12 2015
(Scala) (((1 to 49) by 2) flatMap { List.fill(2)(_) }).scanLeft(0)(_ + _) // Alonso del Arte, Sep 11 2019
(Python)
|
|
CROSSREFS
|
Cf. A000096, A000217, A001105, A001477, A001844, A002061, A004526, A005843, A007590, A008794, A037270, A081352, A109613, A110654, A116940, A134444, A158946, A168380, A357501.
|
|
KEYWORD
|
nonn,easy,changed
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|