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.

A309805 Maximum number of nonattacking kings placeable on a hexagonal board with edge-length n in Glinski's hexagonal chess.

Original entry on oeis.org

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

Views

Author

Sangeet Paul, Aug 17 2019

Keywords

Examples

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

Crossrefs

Partial sums of A133090.

Programs

  • 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 *)
  • 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

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)