login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A309805
Maximum number of nonattacking kings placeable on a hexagonal board with edge-length n in Glinski's hexagonal chess.
3
1, 2, 7, 10, 19, 24, 37, 44, 61, 70, 91, 102, 127, 140, 169, 184, 217, 234, 271, 290, 331, 352, 397, 420, 469, 494, 547, 574, 631, 660, 721, 752, 817, 850, 919, 954, 1027, 1064, 1141, 1180, 1261, 1302, 1387, 1430, 1519, 1564, 1657, 1704, 1801, 1850, 1951, 2002
OFFSET
1,2
FORMULA
a(n) = n^2 - floor(n/2) - floor(n/2)^2.
From Stefano Spezia, Aug 18 2019 (Start)
G.f.: - (1 + x + 3*x^2 + x^3)/((- 1 + x)^3*(1 + x)^2).
E.g.f.: (1/8)*exp(-x)*(-1 + 2*x + exp(2*x)*(1 + 4*x + 6*x^2)).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 5.
a(n) = (1/16)*(3 + (-1)^(1+2*n) - 4*n + 12*n^2 - 2*(-1)^n*(1 + 2*n)).
a(2*n-1) = A003215(n).
a(2*n) = A049450(n).
(End)
EXAMPLE
a(1) = 1
.
o
.
a(2) = 2
.
. .
o . o
. .
.
a(3) = 7
.
o . o
. . . .
o . o . o
. . . .
o . o
.
a(4) = 10
.
. . . .
o . o . o
. . . . . .
o . o . o . o
. . . . . .
o . o . o
. . . .
.
MATHEMATICA
nn:=51; CoefficientList[Series[- (1 + x + 3*x^2 + x^3)/((- 1 + x)^3*(1 + x)^2), {x, 0, nn}], x] (* Georg Fischer, May 10 2020 *)
PROG
(PARI) a(n) = n^2 - (n\2) - (n\2)^2; \\ Andrew Howroyd, Aug 17 2019
(Python)
def A309805(n): return n**2-(m:=n>>1)*(m+1) # Chai Wah Wu, Apr 04 2024
CROSSREFS
Partial sums of A133090.
Sequence in context: A240469 A257335 A152211 * A125852 A368824 A336903
KEYWORD
nonn,easy
AUTHOR
Sangeet Paul, Aug 17 2019
STATUS
approved