OFFSET
0,5
COMMENTS
Also number of non-attacking kings on (n-1) X (n-1) board (cf. A030978). - Koksal Karakus (karakusk(AT)hotmail.com), May 27 2002
Also the independence number and clique covering number of the (n-1) X (n-1) king graph. - Eric W. Weisstein, Jun 20 2017
Maximum number of 2 X 2 tiles that fit on an n X n board. - Jon Perry, Aug 10 2003
(n)-(1) + (n-1)-(2) + (n-3)-(3) + ... + (n-r)-(r) ... n terms. E.g., 5-1+4-2+3 = 9, 6-1+5-2+4-3 = 9, 7-1+6-2+5-3+4 = 16, 8-1+7-2+6-3+5-4 = 16. - Amarnath Murthy, Jul 24 2005
The smallest possible number of white cells in a solution to an n X n nurikabe grid. - Tanya Khovanova, Feb 24 2009
(1 + x + 4*x^2 + 4*x^3 + 9*x^4 + ...) = (1/(1-x))*(1 + 3*x^2 + 5*x^4 + 7*x^6 + ...). - Gary W. Adamson, Apr 07 2010
If the set {1,2,...,n} is divided in half (a part having size ceiling(n/2) and the rest), then a(n+1) is the largest possible difference between the totals of these parts. - Vladimir Shevelev, Oct 14 2017
a(n+1) is the sum of the smallest parts of the partitions of 2n into two odd parts. - Wesley Ivan Hurt, Dec 06 2017
a(n-1) is the largest number of single cells of an n X n grid that share no edge or vertex with each other or those of the grid perimeter. - Stefano Spezia, Jul 30 2021
The binomial transform is 0, 0, 1, 4, 14, 44, 128, 352, 928, 2368, 5888... (see A007466). - R. J. Mathar, Feb 25 2023
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Stefano Spezia, Illustration of initial terms
Eric Weisstein's World of Mathematics, Clique Covering Number.
Eric Weisstein's World of Mathematics, King Graph.
Eric Weisstein's World of Mathematics, Kings Problem.
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
G.f.: x^2*(1 + x^2)/((1 - x)*(1 - x^2)^2).
a(n) = floor(n/2)^2.
From Paul Barry, May 31 2003: (Start)
a(n) = (2*n - 1)*(-1)^n/8 + (2*n^2 - 2*n + 1)/8.
a(n+1) = Sum_{k=0..n} k*(1-(-1)^k)/2. (End)
a(n) = A182579(n,n-2) for n > 1. - Reinhard Zumkeller, May 07 2012
a(n) = Sum_{i=1..n-1; i odd} i. - Olivier Pirson, Nov 06 2017
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n > 4. - Iain Fox, Dec 08 2017
E.g.f.: ((x^2 - x)*cosh(x) + (1 + x + x^2)*sinh(x))/4. - Stefano Spezia, Oct 07 2018
MAPLE
MATHEMATICA
With[{sq = Range[0, 30]^2}, Riffle[sq, sq]] (* Harvey P. Dale, Nov 20 2015 *)
Table[Floor[n/2]^2, {n, 0, 49}] (* Michael De Vlieger, Oct 21 2016 *)
Table[(2 n - 1) (-1)^n/8 + (2 n^2 - 2 n + 1)/8, {n, 0, 49}] (* Michael De Vlieger, Oct 21 2016 *)
CoefficientList[Series[x^2*(1 + x^2)/((1 - x) (1 - x^2)^2), {x, 0, 49}], x] (* Michael De Vlieger, Oct 21 2016 *)
CoefficientList[Series[((x^2-x)Cosh[x]+(1+x+x^2)Sinh[x])/4, {x, 0, 50}], x]*Table[k!, {k, 0, 50}] (* Stefano Spezia, Oct 07 2018 *)
PROG
(Magma) [(2*n-1)*(-1)^n/8+(2*n^2-2*n +1)/8: n in [0..60]]; // Vincenzo Librandi, Aug 21 2011
(PARI) a(n)=(n\2)^2 \\ Charles R Greathouse IV, Sep 24 2015
(PARI) first(n) = Vec(x^2*(1 + x^2)/((1 - x)*(1 - x^2)^2) + O(x^n), -n) \\ Iain Fox, Dec 08 2017
(GAP) Flat(List([0..24], n->[n^2, n^2])); # Muniru A Asiru, Oct 09 2018
(Sage) [((-1)^n*(2*n-1) +(2*n^2-2*n +1))/8 for n in (0..50)] # G. C. Greubel, Sep 11 2019
(Python)
def A008794(n): return (n//2)**2 # Chai Wah Wu, Jun 07 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved